From c6f20924c2acb4b0f9e7c9bd2fe471da84b3ef4c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 21 Jun 2022 10:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=91=E7=9A=84=E7=BB=84=E7=BB=87=E7=BA=A7?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiSearch.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 8bfeb169..791eb7bb 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -506,10 +506,22 @@ export default { } }, handleChangeAgency(val) { - this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; - console.log('this.form.AGENCY_ID', this.form.AGENCY_ID) + let obj = this.$refs["myCascader"].getCheckedNodes()[0].data + if (obj) { + if(obj.level === 'grid'){ + this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.form.AGENCY_ID='' + }else{ + this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.form.GRID_ID = '' + } + + }else{ + this.form.AGENCY_ID='' + this.form.GRID_ID = '' + } + this.form.VILLAGE_ID = '' - this.form.GRID_ID = '' this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = ''