diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index dff365634..9c9887eb7 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -147,6 +147,87 @@ class="u-item-width-daterange u-data-tag" placeholder="结束日期" :picker-options="pickerOptionsEnd"> + + 所属组织: + + + + + + 所属房屋: + + + + + + + + + + + + + + + + + + + @@ -671,7 +752,6 @@ export default { 'agencyId ': 'like' }, sarr: [], - level: '', showSmartSearchForm: false, formType: 'add', @@ -844,13 +924,27 @@ export default { // console.log('formcccc---', this.form) this.getOrgTreeList() this.getEducation() - this.getValiheList() this.getDictList() this.getHousehold() this.getNationality() this.getCareerStatus() if (this.columnName) this.handleChangeForm(this.columnName) }, + mounted(){ + this.$EventBus.$on('handleClickResiTree', (val) => { + if(val.type === 'agency'){ + this.form.agencyId = val.id; + this.optionsV = []; + this.getValiheList(); + }else if(val.type === 'neighborHood'){ + this.form.villageId = val.id; + this.handleChangeV(val.id) + }else if(val.type === 'building'){ + this.form.buildId = val.id; + this.handleChangeB(val.id) + } + }) + }, methods: { handleCategoryChange(newVal, oldVal) { let formCopy = JSON.parse(JSON.stringify(this.form)); @@ -945,63 +1039,8 @@ export default { else this.form[n] = '' } this.agencyIdArray = [] - // let arr3 = [...arr1, ...arr] this.$emit('search', []) - // this.handleSearch() - // this.orgOptions = []; }, - // handleSearch() { - // if (this.showSmartSearchForm) { - // let refObj = this.$refs['ref_rule'] - // refObj.getRule() - // } else { - // // debugger - // // console.log('formmmmm---', this.form) - // const itemTypes = ['daterange', 'timerange', 'checkbox'] - // let a = this.tempFormList.filter(item => item.itemType != 'inputRange') - // let arr = a.filter(n => n.isChange).map((item) => { - // return { - // queryType: item.queryType, - // tableName: item.tableName, - // columnName: item.columnName, - // columnValue: this.form[item.columnName] && - // (itemTypes.includes(item.queryType) || - // itemTypes.includes(item.itemType) || item.multiSelect == 1 - // ? this.form[item.columnName] - // : [this.form[item.columnName].toString()]) - // } - // }) - // const arr2 = arr.filter(item => item.columnValue.length > 0) - // let arr1 = this.fixedList - // .filter((n) => n.columnValue.length > 0) - // .map((item) => { - // return { - // ...item - // } - // }) - // var arr4 = [] - // var arr3 = [...arr1, ...arr2]; - // if (this.timer.startPickerTime && this.timer.endPickerTime) { - // arr4 = [{ - // queryType: 'daterange', - // tableName: 'ic_resi_user', - // columnName: 'BIRTHDAY', - // columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || ''] - // }] - // arr3 = [...arr1, ...arr2, ...arr4] - // } else { - // let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY') - // console.log(i, '标'); - // arr3 = arr3.splice(i,1) - // console.log(arr3); - // } - // this.$emit('search', arr3) - // arr3 = [] - // return arr3 - - // } - - // }, handleAgeChange() { if (this.form.ageStart&&this.form.ageEnd) { if (Number(this.form.ageStart) > Number(this.form.ageEnd)) { @@ -1025,17 +1064,13 @@ export default { } }, handleChangeAgency(val) { - this.sarr = [] - const map = new Map(); this.getLastItem( this.orgOptions, val, "agencyId" ); - this.level = this.sarr[this.sarr.length - 1].level - this.form.level = this.sarr[this.sarr.length - 1].level - + this.form.level = this.sarr[this.sarr.length - 1].level; this.getValiheList() }, getLastItem(list, vals, key) { @@ -1140,24 +1175,10 @@ export default { this.getValiheList(); }, getValiheList() { - const { user } = this.$store.state - var agencyIdTemp = '' - if (this.form.agencyId.length == 0) { - agencyIdTemp = '' - } else { - agencyIdTemp = this.form.agencyId[this.form.agencyId.length - 1] - } - var gridIdQuery = ''; - var agencyIdQuery = this.form.agencyId[0]; - if (this.form.agencyId.length >= 2) { - agencyIdQuery = this.form.agencyId[this.form.agencyId.length - 2]; - gridIdQuery = this.form.agencyId[this.form.agencyId.length - 1]; - } - this.$http .post('/actual/base/communityQuarters/listQuartersOptions', { - gridId: gridIdQuery, - agencyId: agencyIdQuery, + gridId: this.form.agencyId, + agencyId: this.$store.state.user.agencyId, pageNo: this.optionsVPageNo, pageSize: 20 // agencyId: user.agencyId diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 9cde67d8d..f24cff36a 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -7,7 +7,7 @@ + :load="lazyLoadTree" >