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 = ''