This commit is contained in:
Iruka 2025-01-23 11:21:44 +08:00
parent be7220a679
commit 81045815dc
2 changed files with 16 additions and 1 deletions

View File

@ -59,4 +59,12 @@ export function getLandAndDevice(query) {
method: 'get',
params: query
})
}
//获取地块配置
export function getLandConfig(id) {
return request({
url: `/system/land/getLandConfig/${id}`,
method: 'get'
})
}

View File

@ -37,6 +37,9 @@
</template>
<script>
import {
getLandConfig
} from "@/api/system/land";
import * as isApi from '@/api/irrigate/irrigateScenario.js'
export default {
@ -132,7 +135,11 @@
}
} else {
if (getApp().ijs.land) {
this.formData.landId = getApp().ijs.land.id;
const landId = getApp().ijs.land.id;
const res = await getLandConfig(landId);
this.formData.landId = landId;
this.formData.pressureMin = res.data?.pressureMin || null;
this.formData.pressureMax = res.data?.pressureMax || null;
}
}
uni.hideLoading()