From 6ca6232e48d73cd447f326b872a06faf6af448ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com> Date: Mon, 16 Mar 2020 09:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/custom/gridoperatorinfo.vue | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/views/modules/custom/gridoperatorinfo.vue b/src/views/modules/custom/gridoperatorinfo.vue index 9291c17a..15dd5e16 100755 --- a/src/views/modules/custom/gridoperatorinfo.vue +++ b/src/views/modules/custom/gridoperatorinfo.vue @@ -136,7 +136,10 @@ export default { deleteIsBatch: true }, dataForm: { - id: '' + id: '', + streetId: '', + communityId: '', + gridId: '' }, ids: [], options: [], @@ -154,25 +157,20 @@ export default { }, watch: { 'ids': function (val) { - if (val.length === 0 || val.length === 1) { - this.dataForm.streetId = '' - this.dataForm.communityId = '' - this.dataForm.gridId = '' - } - if (val.length === 2) { - this.dataForm.streetId = this.ids[1] + if (val.length == 0 || val.length == 1) { + this.dataForm.streetId = val[0] this.dataForm.communityId = '' this.dataForm.gridId = '' } - if (val.length === 3) { + if (val.length == 2) { this.dataForm.streetId = '' - this.dataForm.communityId = this.ids[2] + this.dataForm.communityId = val[1] this.dataForm.gridId = '' } - if (val.length === 4) { + if (val.length == 3) { this.dataForm.streetId = '' this.dataForm.communityId = '' - this.dataForm.gridId = this.ids[3] + this.dataForm.gridId = val[2] } } },