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 + } + }) + } }); }, // 查询农户列表