From 9786978f3f85a78bad49af416590805151a1f207 Mon Sep 17 00:00:00 2001 From: jsy_zjg <31502350@qq.com> Date: Fri, 22 Nov 2024 11:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/system/land.js | 8 ++++++++ pages/work/land/create-new.vue | 22 ++++++++++------------ pages/work/land/index.vue | 19 ++++++++++--------- store/modules/system/land.js | 14 +++++++++++++- 4 files changed, 41 insertions(+), 22 deletions(-) diff --git a/api/system/land.js b/api/system/land.js index 5da672d..45cba83 100644 --- a/api/system/land.js +++ b/api/system/land.js @@ -20,6 +20,14 @@ export function getLandInfo(param) { }) } +//查询地块编码排序 +export function getLandNum() { + return request({ + url: '/system/land/getLandNum', + method: 'get' + }) +} + // 新增地块 export function addLand (data) { return request({ diff --git a/pages/work/land/create-new.vue b/pages/work/land/create-new.vue index 3f81aa8..f1f3b7c 100644 --- a/pages/work/land/create-new.vue +++ b/pages/work/land/create-new.vue @@ -178,8 +178,9 @@ }, onLoad(data) { //获取数据字典 - this.getDictList("custom_soil_type") - this.getDictList("custom_water_source_type") + this.getDictList("custom_soil_type"); + this.getDictList("custom_water_source_type"); + if (data) { if (data.companyObj) { let companyAllObj = JSON.parse(decodeURIComponent(data.companyObj)); @@ -212,8 +213,10 @@ title: "修改地块" }) } + }else{ + this.getLandNum(); + this.getChargeList(); } - this.getChargeList(); } }, methods: { @@ -376,16 +379,11 @@ getLandNum() { plugin.modal.loading("获取地块编号中!") store - .dispatch("onGetLandNum") + .dispatch("getLandNum") .then(res => { - landInfo.value.landNum = res.data.landNum - landInfo.value.orderNum = res.data.orderNum - }) - .catch(error => { - plugin.modal.msgError("获取地块编号失败!") - }) - .finally(() => { - plugin.modal.closeLoading() + console.log(res) + this.landInfo.landNum = res.data.landNum + this.landInfo.orderNum = res.data.orderNum }) } } diff --git a/pages/work/land/index.vue b/pages/work/land/index.vue index d1e8541..a10ddd8 100644 --- a/pages/work/land/index.vue +++ b/pages/work/land/index.vue @@ -15,7 +15,7 @@