diff --git a/src/views/modules/custom/gridoperatorinfo.vue b/src/views/modules/custom/gridoperatorinfo.vue index 37831178..e2d0beda 100755 --- a/src/views/modules/custom/gridoperatorinfo.vue +++ b/src/views/modules/custom/gridoperatorinfo.vue @@ -153,25 +153,25 @@ export default { }, watch: { 'ids': function (val) { - if (val.length === 0) { + if (val.length === 0 || val.length === 1) { this.dataForm.streetId = '' this.dataForm.communityId = '' this.dataForm.gridId = '' } - if (val.length === 1) { - this.dataForm.streetId = this.ids[0] + if (val.length === 2) { + this.dataForm.streetId = this.ids[1] this.dataForm.communityId = '' this.dataForm.gridId = '' } - if (val.length === 2) { - this.dataForm.streetId = this.ids[0] - this.dataForm.communityId = this.ids[1] + if (val.length === 3) { + this.dataForm.streetId = '' + this.dataForm.communityId = this.ids[2] this.dataForm.gridId = '' } - if (val.length === 3) { - this.dataForm.streetId = this.ids[0] - this.dataForm.communityId = this.ids[1] - this.dataForm.gridId = this.ids[2] + if (val.length === 4) { + this.dataForm.streetId = '' + this.dataForm.communityId = '' + this.dataForm.gridId = this.ids[3] } } },