Browse Source

综合治理图层查询增加所属组织

shibei_master
jiangyy 3 years ago
parent
commit
b9e4c29a57
  1. 149
      src/views/modules/shequzhili/tuceng/zhonghe/base.vue

149
src/views/modules/shequzhili/tuceng/zhonghe/base.vue

@ -9,7 +9,19 @@
class="demo-form-inline" class="demo-form-inline"
> >
<div> <div>
<el-form-item prop="gridId" label="所属网格"> <el-form-item prop="gridId" label="所属组织">
<div class="resi-cell-value">
<el-cascader class="customer_cascader"
ref="myCascader"
clearable
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
</el-form-item>
<!-- <el-form-item prop="gridId" label="所属网格">
<div class="resi-cell-value"> <div class="resi-cell-value">
<el-select <el-select
v-model.trim="fmData.gridId" v-model.trim="fmData.gridId"
@ -28,7 +40,8 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item> -->
<el-form-item label="所属房屋"> <el-form-item label="所属房屋">
<div class="resi-cell-value"> <div class="resi-cell-value">
<div class="resi-cell-col"> <div class="resi-cell-col">
@ -331,6 +344,15 @@ export default {
optionsH: [], optionsH: [],
optionsD: [], optionsD: [],
optionsG: [], optionsG: [],
orgOptions: [],
orgOptionProps:{
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
agencyIdArray:[],
optionsWelfare: [ optionsWelfare: [
{ {
@ -344,6 +366,7 @@ export default {
], ],
fmData: { fmData: {
agencyId:"",
gridId: "", gridId: "",
villageId: "", villageId: "",
buildId: "", buildId: "",
@ -410,6 +433,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.getOrgTreeList();
this.getGridList(); this.getGridList();
this.getValiheList(); this.getValiheList();
this.getTableData(); this.getTableData();
@ -465,6 +489,24 @@ export default {
this.getHouseList(); this.getHouseList();
}, },
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=[]
this.orgOptions .push( res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList() { getGridList() {
const { user } = this.$store.state; const { user } = this.$store.state;
this.$http this.$http
@ -489,7 +531,7 @@ export default {
this.$http this.$http
.post("/gov/org/icneighborhood/neighborhoodoption", { .post("/gov/org/icneighborhood/neighborhoodoption", {
gridId: this.fmData.gridId, gridId: this.fmData.gridId,
agencyId: "", agencyId: this.fmData.agencyId,
// agencyId: user.agencyId // agencyId: user.agencyId
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
@ -579,62 +621,125 @@ export default {
this.handleSearch(); this.handleSearch();
}, },
handleChangeAgency(val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
if(obj.level === 'grid'){
this.fmData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.fmData.agencyId=''
}else{
this.fmData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.fmData.gridId = ''
}
}else{
this.fmData.agencyId=''
this.fmData.gridId = ''
}
this.fmData.villageId = ''
this.fmData.buildId = ''
this.fmData.unitId = ''
this.fmData.homeId = ''
this.getValiheList()
},
computeQueryParams() { computeQueryParams() {
const { pageSize, pageNo, elseParams, fmData } = this; const { pageSize, pageNo, elseParams, fmData } = this;
let conditions=[]
if(fmData.agencyId){
conditions.push({
queryType: "like",
tableName: "ic_resi_user",
columnName: "AGENCY_ID",
columnValue: [fmData.agencyId],
},)
}
return { if(fmData.gridId){
formCode: "resi_base_info", conditions.push(
pageSize,
pageNo,
conditions: [
{ {
queryType: "equal", queryType: "equal",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "GRID_ID", columnName: "GRID_ID",
columnValue: [fmData.gridId], columnValue: [fmData.gridId],
}, }
)
}
if(fmData.villageId){
conditions.push(
{ {
queryType: "equal", queryType: "equal",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "VILLAGE_ID", columnName: "VILLAGE_ID",
columnValue: [fmData.villageId], columnValue: [fmData.villageId],
}, }
{ )
}
if(fmData.buildId){
conditions.push({
queryType: "equal", queryType: "equal",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "BUILD_ID", columnName: "BUILD_ID",
columnValue: [fmData.buildId], columnValue: [fmData.buildId],
}, })
{ }
if(fmData.unitId){
conditions.push({
queryType: "equal", queryType: "equal",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "UNIT_ID", columnName: "UNIT_ID",
columnValue: [fmData.unitId], columnValue: [fmData.unitId],
}, })
{ }
if(fmData.homeId){
conditions.push({
queryType: "equal", queryType: "equal",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "HOME_ID", columnName: "HOME_ID",
columnValue: [fmData.homeId], columnValue: [fmData.homeId],
}, })
{ }
if(fmData.name){
conditions.push({
queryType: "like", queryType: "like",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "NAME", columnName: "NAME",
columnValue: [fmData.name], columnValue: [fmData.name],
}, })
{ }
if(fmData.mobile){
conditions.push({
queryType: "like", queryType: "like",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "MOBILE", columnName: "MOBILE",
columnValue: [fmData.mobile], columnValue: [fmData.mobile],
}, })
{ }
if(fmData.idCard){
conditions.push({
queryType: "like", queryType: "like",
tableName: "ic_resi_user", tableName: "ic_resi_user",
columnName: "ID_CARD", columnName: "ID_CARD",
columnValue: [fmData.idCard], columnValue: [fmData.idCard],
}, })
}
return {
formCode: "resi_base_info",
pageSize,
pageNo,
conditions: [
...conditions,
...elseParams, ...elseParams,
], ],
}; };

Loading…
Cancel
Save