From 4962f8b000c9fcf3c5858fb6f1c017341d7b5158 Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 21 Feb 2022 09:26:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 40 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index cb4ce3d3..eef83073 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -954,25 +954,27 @@ } this.qlrform={} listSuyqr(params).then((response) => { - this.qlrform = response.rows[0] - this.zjlxOptions.map(res => { - if(res.dictValue == this.qlrform.dbrzjlx){ - this.qlrform.dbrzjlxName = res.dictLabel - } - if(res.dictValue == this.qlrform.dlrzjlx){ - this.qlrform.dlrzjlxName = res.dictLabel - } - }) - this.suyqxzOptions.map(res => { - if(res.dictValue == this.qlrform.suyqxz){ - this.qlrform.suyqxzName = res.dictLabel - } - }) - this.sjlyOptions.map(res => { - if(res.dictValue == this.qlrform.sjly){ - this.qlrform.sjlyName = res.dictLabel - } - }) + if(response.rows.length>0){ + this.qlrform = response.rows[0] + this.zjlxOptions.map(res => { + if(res.dictValue == this.qlrform.dbrzjlx){ + this.qlrform.dbrzjlxName = res.dictLabel + } + if(res.dictValue == this.qlrform.dlrzjlx){ + this.qlrform.dlrzjlxName = res.dictLabel + } + }) + this.suyqxzOptions.map(res => { + if(res.dictValue == this.qlrform.suyqxz){ + this.qlrform.suyqxzName = res.dictLabel + } + }) + this.sjlyOptions.map(res => { + if(res.dictValue == this.qlrform.sjly){ + this.qlrform.sjlyName = res.dictLabel + } + }) + } }); }, // 查询农户列表