Browse Source

居民搜索增加参数level

V1.0
mk 3 years ago
parent
commit
46967a61b3
  1. 25
      src/views/components/resiSearch.vue
  2. 4
      src/views/modules/base/resi.vue

25
src/views/components/resiSearch.vue

@ -320,6 +320,8 @@ export default {
queryType: {
'agencyId ': 'like'
},
sarr:[],
level:'',
showSmartSearchForm: false,
formType: 'add',
@ -653,9 +655,30 @@ export default {
// this.form.buildId = ''
// this.form.unitId = ''
// this.form.homeId = ''
this.sarr = []
const map = new Map();
this.getLastItem(
this.orgOptions,
val,
"agencyId"
);
this.level = this.sarr[this.sarr.length-1].level
this.getValiheList()
},
getLastItem(list, vals, key) {
let LIST = list || [];
for (let item of LIST) {
// console.log(item[key]);
for (let i of vals) {
if (item[key] === i) {
this.sarr.push(item);
} else {
this.getLastItem(item.subAgencyList, vals, key);
}
}
}
},
handleChangeGrid(val) {
console.log('val', val)
this.form.villageId = ''

4
src/views/modules/base/resi.vue

@ -787,6 +787,7 @@ export default {
let obj = this.$refs.myResiSearch.form;
let categoryArr = this.$refs.myResiSearch.form.categoryKey;
let agencyId = this.$refs.myResiSearch.form.agencyId;
if (
typeof obj.categoryKey == "object" &&
obj.categoryKey.length != 0
@ -801,6 +802,7 @@ export default {
} else {
obj.agencyId = "";
}
obj.level = this.$refs.myResiSearch.level ? this.$refs.myResiSearch.level :''
this.currentPage = 1;
this.getTableData(obj);
@ -1026,7 +1028,9 @@ export default {
resetSearchForm() {
for (const n in this.$refs.myResiSearch.form) {
this.$refs.myResiSearch.form[n] = "";
}
this.$refs.myResiSearch.level = ''
this.getTableData();
},
async handleExportModule() {

Loading…
Cancel
Save