Browse Source

居民查询范围 改为组织树暂存

shibei_master
jianjun 3 years ago
parent
commit
c0a4211cee
  1. 64
      src/views/components/resiSearch.vue

64
src/views/components/resiSearch.vue

@ -4,6 +4,20 @@
<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"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
</div>
</el-col>
<!-- <el-col :span="6">
<div class="resi-cell">
<div class="resi-cell-label">所属网格</div>
<div class="resi-cell-value">
@ -25,7 +39,7 @@
</el-select>
</div>
</div>
</el-col>
</el-col>-->
<el-col :span="18">
<div class="resi-cell">
<div class="resi-cell-label">所属房屋</div>
@ -285,6 +299,14 @@ export default {
UNIT_ID: '',
HOME_ID: ''
}
let orgOptionProps = {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
pageLoading: false,
openSearch: false,
@ -293,10 +315,14 @@ export default {
optionsH: [],
optionsD: [],
optionsG: [],
orgOptions: [],
orgOptionProps,
agencyIdArray:[],
value: '',
itemList,
fixedList: [],
fixedForm: {
AGENCY_ID: '',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
@ -306,6 +332,7 @@ export default {
constForm,
form: {
...form,
AGENCY_ID: '',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
@ -391,7 +418,7 @@ export default {
created() {
// this.initForm()
// console.log('formcccc---', this.form)
this.getOrgTreeList()
this.getGridList()
this.getValiheList()
if (this.columnName) this.handleChangeForm(this.columnName)
@ -474,6 +501,16 @@ export default {
this.form.BIRTHDAY = [s, e]
}
},
handleChangeAgency(val) {
this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
console.log('this.form.AGENCY_ID', this.form.AGENCY_ID)
this.form.VILLAGE_ID = ''
this.form.GRID_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 = ''
@ -503,6 +540,7 @@ export default {
// form
handleChangeForm(val) {
for (let n in this.fixedForm) {
debugger
if (n === val) {
if (this.fixedList.length > 0) {
let _item = {}
@ -515,7 +553,7 @@ export default {
console.log('fixedList----val', this.fixedList)
} else {
_item = {
queryType: 'equal',
queryType: 'like',//'equal',
tableName: 'ic_resi_user',
columnName: val,
columnValue: [this.form[val]]
@ -527,7 +565,7 @@ export default {
if (Object.keys(_item).length > 0 && !hasVal) this.fixedList.push(_item)
} else {
this.$set(this.fixedList, 0, {
queryType: 'equal',
queryType: 'like',//'equal',
tableName: 'ic_resi_user',
columnName: val,
columnValue: [this.form[val]]
@ -540,6 +578,22 @@ export default {
if (item.columnName === val) item.isChange = true
})
},
getOrgTreeList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
this.orgOptions = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList() {
const { user } = this.$store.state
this.$http
@ -561,7 +615,7 @@ export default {
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID,
agencyId: ''
agencyId: this.form.AGENCY_ID,
// agencyId: user.agencyId
})
.then(({ data: res }) => {

Loading…
Cancel
Save