diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 71f20f306..c8b6b9a07 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -833,10 +833,18 @@ export default { } else { agencyIdTemp = this.form.agencyId[this.form.agencyId.length - 1] } + const gridIdQuery = ''; + const agencyIdQuery = this.form.agencyId[0]; + if (this.form.agencyId.length >= 2) { + lastIndex = this.form.agencyId.length - 1; + agencyIdQuery= this.form.agencyId[lastIndex - 1]; + gridIdQuery = this.form.agencyId[lastIndex]; + } + this.$http .post('/actual/base/communityQuarters/listQuartersOptions', { - gridId: this.form.agencyId[1], - agencyId: this.form.agencyId[0], + gridId: gridIdQuery, + agencyId: agencyIdQuery, // agencyId: user.agencyId }) .then(({ data: res }) => {