|
|
|
@ -13,6 +13,7 @@ |
|
|
|
:options="orgOptions" |
|
|
|
:props="orgOptionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
collapse-tags |
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -242,6 +243,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import inputRange from './rangeInput.vue' |
|
|
|
import Ar from 'element-ui/src/locale/lang/ar' |
|
|
|
export default { |
|
|
|
name: 'ResiSearch', |
|
|
|
components: { |
|
|
|
@ -302,17 +304,19 @@ export default { |
|
|
|
let constForm = { |
|
|
|
...form, |
|
|
|
GRID_ID: '', |
|
|
|
GRID_IDS: '', |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
HOME_ID: '' |
|
|
|
} |
|
|
|
let orgOptionProps = { |
|
|
|
multiple: false, |
|
|
|
multiple: true,// 市北项目开启多选,2023-04-06 |
|
|
|
value: 'agencyId', |
|
|
|
label: 'agencyName', |
|
|
|
children: 'subAgencyList', |
|
|
|
checkStrictly: true |
|
|
|
checkStrictly: true, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
|
@ -331,7 +335,9 @@ export default { |
|
|
|
fixedList: [], |
|
|
|
fixedForm: { |
|
|
|
AGENCY_ID: '', |
|
|
|
AGENCY_IDS: [], |
|
|
|
GRID_ID: '', |
|
|
|
GRID_IDS: [], |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
@ -341,7 +347,9 @@ export default { |
|
|
|
form: { |
|
|
|
...form, |
|
|
|
AGENCY_ID: '', |
|
|
|
AGENCY_IDS: [], |
|
|
|
GRID_ID: '', |
|
|
|
GRID_IDS:[], |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
@ -381,7 +389,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
queryType:{ |
|
|
|
'AGENCY_ID':'like' |
|
|
|
'AGENCY_ID':'list_equal' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -516,19 +524,30 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handleChangeAgency(val) { |
|
|
|
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 = '' |
|
|
|
// 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.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_ID='' |
|
|
|
this.form.GRID_ID = '' |
|
|
|
} else { |
|
|
|
this.form.AGENCY_IDS = [] |
|
|
|
this.form.GRID_IDS = [] |
|
|
|
} |
|
|
|
|
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
@ -536,9 +555,9 @@ export default { |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
this.getValiheList() |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleChangeGrid(val) { |
|
|
|
console.log('val', val) |
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
@ -546,7 +565,6 @@ export default { |
|
|
|
this.getValiheList() |
|
|
|
}, |
|
|
|
handleChangeV(val) { |
|
|
|
console.log('val', val) |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
@ -574,15 +592,32 @@ export default { |
|
|
|
this.fixedList.forEach((item, index) => { |
|
|
|
if (item.columnName == val) { |
|
|
|
hasVal = true |
|
|
|
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) |
|
|
|
@ -599,7 +634,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('fixedList----999', this.fixedList) |
|
|
|
this.tempFormList.forEach((item) => { |
|
|
|
if (item.columnName === val) item.isChange = true |
|
|
|
}) |
|
|
|
@ -641,8 +675,8 @@ export default { |
|
|
|
const { user } = this.$store.state |
|
|
|
this.$http |
|
|
|
.post('/gov/org/icneighborhood/neighborhoodoption', { |
|
|
|
gridId: this.form.GRID_ID, |
|
|
|
agencyId: this.form.AGENCY_ID, |
|
|
|
gridIds: this.form.GRID_IDS, |
|
|
|
agencyIds: this.form.AGENCY_IDS, |
|
|
|
// agencyId: user.agencyId |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
|