|
|
@ -1,26 +1,24 @@ |
|
|
|
<template> |
|
|
|
<div class="resi-container"> |
|
|
|
<!-- <el-card class="resi-card"> --> |
|
|
|
<el-row class="resi-row-box" :class="!isArrow && 'resi-row-more'"> |
|
|
|
<el-row v-if="showGrid" class="resi-row"> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="resi-cell"> |
|
|
|
<div class="resi-cell-label">所属组织</div> |
|
|
|
<div class="resi-cell-value"> |
|
|
|
<el-cascader |
|
|
|
class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
|
v-model="agencyIdArray" |
|
|
|
filterable |
|
|
|
:options="orgOptions" |
|
|
|
:props="orgOptionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeAgency" |
|
|
|
></el-cascader> |
|
|
|
<el-row class="resi-row-box" :class="!isArrow && 'resi-row-more'"> |
|
|
|
<el-row v-if="showGrid" class="resi-row"> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="resi-cell"> |
|
|
|
<div class="resi-cell-label">所属组织</div> |
|
|
|
<div class="resi-cell-value"> |
|
|
|
<el-cascader class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
|
v-model="agencyIdArray" |
|
|
|
filterable |
|
|
|
:options="orgOptions" |
|
|
|
:props="orgOptionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="6"> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="6"> |
|
|
|
<div class="resi-cell"> |
|
|
|
<div class="resi-cell-label">所属网格</div> |
|
|
|
<div class="resi-cell-value"> |
|
|
@ -262,7 +260,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import inputRange from "./rangeInput.vue"; |
|
|
|
import inputRange from './rangeInput.vue' |
|
|
|
export default { |
|
|
|
name: "ResiSearch", |
|
|
|
components: { |
|
|
@ -327,19 +325,19 @@ export default { |
|
|
|
}); |
|
|
|
let constForm = { |
|
|
|
...form, |
|
|
|
GRID_ID: "", |
|
|
|
VILLAGE_ID: "", |
|
|
|
BUILD_ID: "", |
|
|
|
UNIT_ID: "", |
|
|
|
HOME_ID: "", |
|
|
|
}; |
|
|
|
GRID_ID: '', |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
HOME_ID: '' |
|
|
|
} |
|
|
|
let orgOptionProps = { |
|
|
|
multiple: false, |
|
|
|
value: "agencyId", |
|
|
|
label: "agencyName", |
|
|
|
children: "subAgencyList", |
|
|
|
checkStrictly: true, |
|
|
|
}; |
|
|
|
value: 'agencyId', |
|
|
|
label: 'agencyName', |
|
|
|
children: 'subAgencyList', |
|
|
|
checkStrictly: true |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
|
pageLoading: false, |
|
|
@ -356,22 +354,22 @@ export default { |
|
|
|
itemList, |
|
|
|
fixedList: [], |
|
|
|
fixedForm: { |
|
|
|
AGENCY_ID: "", |
|
|
|
GRID_ID: "", |
|
|
|
VILLAGE_ID: "", |
|
|
|
BUILD_ID: "", |
|
|
|
UNIT_ID: "", |
|
|
|
HOME_ID: "", |
|
|
|
AGENCY_ID: '', |
|
|
|
GRID_ID: '', |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
HOME_ID: '' |
|
|
|
}, |
|
|
|
constForm, |
|
|
|
form: { |
|
|
|
...form, |
|
|
|
AGENCY_ID: "", |
|
|
|
GRID_ID: "", |
|
|
|
VILLAGE_ID: "", |
|
|
|
BUILD_ID: "", |
|
|
|
UNIT_ID: "", |
|
|
|
HOME_ID: "", |
|
|
|
AGENCY_ID: '', |
|
|
|
GRID_ID: '', |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
HOME_ID: '' |
|
|
|
}, |
|
|
|
tempFormList, |
|
|
|
pickerOptions: { |
|
|
@ -406,14 +404,10 @@ export default { |
|
|
|
], |
|
|
|
}, |
|
|
|
|
|
|
|
queryType: { |
|
|
|
AGENCY_ID: "like", |
|
|
|
}, |
|
|
|
ageObj: { |
|
|
|
start:"", |
|
|
|
end:"" |
|
|
|
}, |
|
|
|
}; |
|
|
|
queryType:{ |
|
|
|
'AGENCY_ID':'like' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
sliceList() { |
|
|
@ -572,46 +566,41 @@ export default { |
|
|
|
// const e = this.computedBirth(val.start) |
|
|
|
}, |
|
|
|
handleChangeAgency(val) { |
|
|
|
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data; |
|
|
|
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 = ""; |
|
|
|
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 = '' |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.form.AGENCY_ID = ""; |
|
|
|
this.form.GRID_ID = ""; |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.form.AGENCY_ID='' |
|
|
|
this.form.GRID_ID = '' |
|
|
|
} |
|
|
|
|
|
|
|
this.form.VILLAGE_ID = ""; |
|
|
|
this.form.BUILD_ID = ""; |
|
|
|
this.form.UNIT_ID = ""; |
|
|
|
this.form.HOME_ID = ""; |
|
|
|
this.getValiheList(); |
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
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 = ""; |
|
|
|
this.form.HOME_ID = ""; |
|
|
|
this.getValiheList(); |
|
|
|
console.log('val', val) |
|
|
|
this.form.VILLAGE_ID = '' |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
this.getValiheList() |
|
|
|
}, |
|
|
|
handleChangeV(val) { |
|
|
|
console.log("val", val); |
|
|
|
this.form.BUILD_ID = ""; |
|
|
|
this.form.UNIT_ID = ""; |
|
|
|
this.form.HOME_ID = ""; |
|
|
|
this.getBuildList(); |
|
|
|
console.log('val', val) |
|
|
|
this.form.BUILD_ID = '' |
|
|
|
this.form.UNIT_ID = '' |
|
|
|
this.form.HOME_ID = '' |
|
|
|
this.getBuildList() |
|
|
|
}, |
|
|
|
handleChangeB(val) { |
|
|
|
console.log("val", val); |
|
|
@ -633,20 +622,30 @@ export default { |
|
|
|
let hasVal = false; |
|
|
|
this.fixedList.forEach((item, index) => { |
|
|
|
if (item.columnName == val) { |
|
|
|
hasVal = true; |
|
|
|
item.columnValue[0] = this.form[val]; |
|
|
|
if (!this.form[val]) this.fixedList.splice(index, 1); |
|
|
|
console.log("fixedList----val", this.fixedList); |
|
|
|
hasVal = true |
|
|
|
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]], |
|
|
|
}; |
|
|
|
console.log("fixedList----else", _item); |
|
|
|
columnValue: [this.form[val]] |
|
|
|
} |
|
|
|
console.log('fixedList----else', _item) |
|
|
|
// this.$set(this.fixedList, index, _item) |
|
|
|
} |
|
|
|
}); |
|
|
@ -662,7 +661,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log("fixedList----999", this.fixedList); |
|
|
|
console.log('fixedList----999', this.fixedList) |
|
|
|
this.tempFormList.forEach((item) => { |
|
|
|
if (item.columnName === val) item.isChange = true; |
|
|
|
}); |
|
|
@ -706,7 +705,7 @@ export default { |
|
|
|
getValiheList() { |
|
|
|
const { user } = this.$store.state; |
|
|
|
this.$http |
|
|
|
.post("/gov/org/icneighborhood/neighborhoodoption", { |
|
|
|
.post('/gov/org/icneighborhood/neighborhoodoption', { |
|
|
|
gridId: this.form.GRID_ID, |
|
|
|
agencyId: this.form.AGENCY_ID, |
|
|
|
// agencyId: user.agencyId |
|
|
|