From e8f736fce824800f44c10dd827778f27e700b4dc Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Sat, 7 May 2022 18:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E8=BF=94=E8=B4=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppMonitoringObject/Add.vue | 34 +++++++++------- .../AppMonitoringObject/MonitorIncome.vue | 40 ++++++++++++------- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 9979fc90..6eb0093a 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -711,20 +711,26 @@ export default { getInfo(id) { this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { if (res?.data) { - res.data.basicsCheckList = res.data.basicsCheck.split(',') - res.data.basicsCheckList.map((item, index) => { - this.basicsCheckList[index].checked = true - }) - res.data.guaranteeCheckList = res.data.guaranteeCheck.split(',') - res.data.guaranteeCheckList.map((item, index) => { - this.guaranteeCheckList[index].checked = true - }) - - res.data.healthyStatusList = res.data.healthyStatus.split(',') - this.helthList.map(items => { - items.checked = res.data.healthyStatusList.includes(items.dictValue) - }) - + if(res.data.basicsCheckList) { + res.data.basicsCheckList = res.data.basicsCheck.split(',') + res.data.basicsCheckList.map((item, index) => { + this.basicsCheckList[index].checked = true + }) + } + if(res.data.guaranteeCheckLis) { + res.data.guaranteeCheckList = res.data.guaranteeCheck.split(',') + res.data.guaranteeCheckList.map((item, index) => { + this.guaranteeCheckList[index].checked = true + }) + } + + if(res.data.healthyStatusList) { + res.data.healthyStatusList = res.data.healthyStatus.split(',') + this.helthList.map(items => { + items.checked = res.data.healthyStatusList.includes(items.dictValue) + }) + } + this.form = { ...this.form, ...res.data } if (this.form.photo) { diff --git a/src/apps/AppMonitoringObject/MonitorIncome.vue b/src/apps/AppMonitoringObject/MonitorIncome.vue index 53c56882..6437d5db 100644 --- a/src/apps/AppMonitoringObject/MonitorIncome.vue +++ b/src/apps/AppMonitoringObject/MonitorIncome.vue @@ -7,7 +7,7 @@ 工资性收入(元)
-
@@ -18,7 +18,7 @@ 生产经营收入(元)
-
@@ -29,7 +29,7 @@ 计划生育金(元)
-
@@ -40,7 +40,7 @@ 资产收益扶贫分红收入
-
@@ -51,7 +51,7 @@ 养老保险金(元)
-
@@ -64,7 +64,7 @@ 低保金(元)
-
@@ -75,7 +75,7 @@ 特困供养金(元)
-
@@ -86,7 +86,7 @@ 生态补偿金(元)
-
@@ -97,7 +97,7 @@ 财产性收入(元)
-
@@ -108,7 +108,7 @@ 其他财产性收入
-
@@ -119,7 +119,7 @@ 转移性收入(元)
-
@@ -130,7 +130,7 @@ 其他转移性收入(元)
-
@@ -141,7 +141,7 @@ 生产经营性支出(元)
-
@@ -152,7 +152,7 @@ 纳入监测对象的收入参考范围
-
@@ -163,7 +163,7 @@ 纳入监测对象的人均收入参考范围
-
@@ -214,8 +214,18 @@ export default { methods: { getInfo(id) { + this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { + // var arr = ['income1','income2','income3','income4','income5','income6','income8','income9','income10','income11','income12','income13','income14','income15'] + // var newArr = {} if (res.code === 0) { + // for(let key in res.data) { + // if(arr.includes(key)) { + // newArr = res.data[key] == 0? '':res.data[key] + // } + // } + // this.form = {...newArr} + this.form = { ...this.form, ...res.data