修改地块

This commit is contained in:
jsy_zjg 2024-11-22 11:21:43 +08:00
parent 9786978f3f
commit cba68e8cf8
2 changed files with 5 additions and 7 deletions

View File

@ -3,7 +3,6 @@ import request from '@/utils/request'
// 查询列表
export function getLandList(data) {
console.log(data)
return request({
url: '/system/land/app/getLandList',
method: 'get',

View File

@ -8,7 +8,7 @@
<u--input v-model="landInfo.landName" border="none" placeholder="请选择地块名称"></u--input>
</u-form-item>
<u-line color="#D2D2D2"></u-line>
<u-form-item class="form-item" label="地块编号" prop="landNum" labelWidth="100px" required>
<u-form-item class="form-item" label="地块编号" prop="landNum" labelWidth="100px" required>
<u--input v-model="landInfo.landNum" border="none" placeholder="请输入地块编号"></u--input>
</u-form-item>
<u-line color="#D2D2D2"></u-line>
@ -180,7 +180,7 @@
//
this.getDictList("custom_soil_type");
this.getDictList("custom_water_source_type");
if (data) {
if (data.companyObj) {
let companyAllObj = JSON.parse(decodeURIComponent(data.companyObj));
@ -213,7 +213,7 @@
title: "修改地块"
})
}
}else{
} else {
this.getLandNum();
this.getChargeList();
}
@ -350,12 +350,12 @@
enableButterflyValve: this.landInfo.enableButterflyValve,
enableAutoRefresh: this.landInfo.enableAutoRefresh,
}
if(this.landInfo.id){
if (this.landInfo.id) {
landConfig.id = this.landInfo.landConfig.id;
}
this.landInfo.landConfig = landConfig;
if (this.landInfo.id) {
//
store.dispatch("updateLand", this.landInfo).then(res => {
plugin.modal.showToast("提交成功")
@ -381,7 +381,6 @@
store
.dispatch("getLandNum")
.then(res => {
console.log(res)
this.landInfo.landNum = res.data.landNum
this.landInfo.orderNum = res.data.orderNum
})