|
|
@ -242,6 +242,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import inputRange from './rangeInput.vue' |
|
|
|
import Ar from 'element-ui/src/locale/lang/ar' |
|
|
|
export default { |
|
|
|
name: 'ResiSearch', |
|
|
|
components: { |
|
|
@ -332,7 +333,9 @@ export default { |
|
|
|
fixedList: [], |
|
|
|
fixedForm: { |
|
|
|
AGENCY_ID: '', |
|
|
|
AGENCY_IDS: [], |
|
|
|
GRID_ID: '', |
|
|
|
GRID_IDS: [], |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
@ -519,21 +522,38 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handleChangeAgency(val) { |
|
|
|
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
|
if (obj) { |
|
|
|
//市北定制化需求,组织与网格多选 |
|
|
|
this.form.GRID_IDS.push(obj.agencyId); |
|
|
|
this.form.AGENCY_IDS.push( obj.pid); |
|
|
|
}else{ |
|
|
|
this.form.AGENCY_IDS=[] |
|
|
|
this.form.GRID_IDS = [] |
|
|
|
} |
|
|
|
// let checkedNodes = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
|
this.$nextTick(()=> { |
|
|
|
let checkedNodes = this.$refs["myCascader"].getCheckedNodes(); |
|
|
|
if (checkedNodes) { |
|
|
|
//市北定制化需求,组织与网格多选 |
|
|
|
// this.form.GRID_IDS.push(obj.agencyId); |
|
|
|
// this.form.AGENCY_IDS.push( obj.pid); |
|
|
|
|
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
this.getValiheList() |
|
|
|
// 清空旧的数组,重新组装 |
|
|
|
this.form.GRID_IDS = []; |
|
|
|
this.form.AGENCY_IDS = []; |
|
|
|
|
|
|
|
for (let i in checkedNodes) { |
|
|
|
let nodeData = checkedNodes[i].data; |
|
|
|
if (nodeData.level == 'grid') { |
|
|
|
this.form.GRID_IDS.push(nodeData.agencyId); |
|
|
|
} else { |
|
|
|
this.form.AGENCY_IDS.push(nodeData.agencyId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.form.AGENCY_IDS = [] |
|
|
|
this.form.GRID_IDS = [] |
|
|
|
} |
|
|
|
|
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
this.getValiheList() |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleChangeGrid(val) { |
|
|
|
this.form.VILLAGE_ID = '' |
|
|
@ -570,15 +590,32 @@ export default { |
|
|
|
this.fixedList.forEach((item, index) => { |
|
|
|
if (item.columnName == val) { |
|
|
|
hasVal = true |
|
|
|
item.columnValue[0] = this.form[val] |
|
|
|
let valueInForm = this.form[val] |
|
|
|
if (valueInForm instanceof Array) { |
|
|
|
// 如果参数本身就是数组,直接赋值 |
|
|
|
item.columnValue = valueInForm |
|
|
|
} else { |
|
|
|
// 如果参数不是数组,构造为数组 |
|
|
|
item.columnValue[0] = this.form[val] |
|
|
|
} |
|
|
|
if (!this.form[val]) this.fixedList.splice(index, 1) |
|
|
|
console.log('fixedList----val', this.fixedList) |
|
|
|
} else { |
|
|
|
let columnValue = undefined; |
|
|
|
let valueInForm = this.form[val] |
|
|
|
if (valueInForm instanceof Array) { |
|
|
|
// 如果参数本身就是数组,直接赋值 |
|
|
|
columnValue = valueInForm |
|
|
|
} else { |
|
|
|
// 如果参数不是数组,构造为数组 |
|
|
|
columnValue = [valueInForm] |
|
|
|
} |
|
|
|
|
|
|
|
_item = { |
|
|
|
queryType: this.queryType[val]?this.queryType[val]:'equal',//'equal', |
|
|
|
tableName: 'ic_resi_user', |
|
|
|
columnName: val, |
|
|
|
columnValue: [this.form[val]] |
|
|
|
columnValue: columnValue |
|
|
|
} |
|
|
|
console.log('fixedList----else', _item) |
|
|
|
// this.$set(this.fixedList, index, _item) |
|
|
|