|
|
@ -220,6 +220,10 @@ |
|
|
|
:ownerPhone="ownerPhone" |
|
|
|
:rentFlag="rentFlag" |
|
|
|
:purpose="purpose" |
|
|
|
:neighborHoodId="neighborHoodId" |
|
|
|
:buildingId="buildingId" |
|
|
|
:buildingUnitId="buildingUnitId" |
|
|
|
:houseId="houseId" |
|
|
|
:remark="remark" |
|
|
|
:updateStartDate="updateStartDate" |
|
|
|
:updateEndDate="updateEndDate" |
|
|
@ -252,6 +256,7 @@ import roomTable from './roomTable' |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { Loading } from 'element-ui' // 引入Loading服务 |
|
|
|
import nextTick from 'dai-js/tools/nextTick' |
|
|
|
|
|
|
|
let loading // 加载动画 |
|
|
|
export default { |
|
|
@ -350,7 +355,7 @@ export default { |
|
|
|
await this.loadOrgData() |
|
|
|
await this.loadTree() |
|
|
|
// await this.loadOpenNode() |
|
|
|
this.getValiheList() |
|
|
|
this.getValiheList('', '') |
|
|
|
|
|
|
|
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
if (this.treeData.length > 0) { |
|
|
@ -382,86 +387,90 @@ export default { |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
this.getBuildList(); |
|
|
|
this.getUniList(); |
|
|
|
this.getHouseList(); |
|
|
|
// this.getUniList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeB (val) { |
|
|
|
|
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
this.getUniList(); |
|
|
|
this.getHouseList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeD () { |
|
|
|
this.houseId = ""; |
|
|
|
this.getHouseList(); |
|
|
|
}, |
|
|
|
|
|
|
|
getValiheList () { |
|
|
|
async getValiheList () { |
|
|
|
const { user } = this.$store.state; |
|
|
|
if (!this.selGridId) { |
|
|
|
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId |
|
|
|
} |
|
|
|
this.$http |
|
|
|
.post("/gov/org/icneighborhood/neighborhoodoption", { |
|
|
|
gridId: this.selGridId, |
|
|
|
agencyId: this.selAgencyId, |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
|
|
|
|
this.optionsV = res.data; |
|
|
|
this.neighborHoodId = '' |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
const url = "/gov/org/icneighborhood/neighborhood-options"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
gridId: this.selGridId, |
|
|
|
agencyId: this.selAgencyId, |
|
|
|
isPage: false |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsV = data; |
|
|
|
|
|
|
|
this.neighborHoodId = "" |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getBuildList () { |
|
|
|
this.$http |
|
|
|
.post("/gov/org/icbuilding/buildingoption", { |
|
|
|
neighborHoodId: this.neighborHoodId, |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
async getBuildList () { |
|
|
|
const url = "/gov/org/icbuilding/buildingoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
neighborHoodId: this.neighborHoodId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsB = data; |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.optionsB = res.data; |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
getUniList () { |
|
|
|
this.$http |
|
|
|
.post("/gov/org/icbuildingunit/unitoption", { |
|
|
|
buildingId: this.buildingId, |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
async getUniList () { |
|
|
|
|
|
|
|
const url = "/gov/org/icbuildingunit/unitoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
buildingId: this.buildingId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsD = data; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.optionsD = res.data; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
getHouseList () { |
|
|
|
this.$http |
|
|
@ -503,6 +512,10 @@ export default { |
|
|
|
this.remark = '' |
|
|
|
this.updateStartDate = '' |
|
|
|
this.updateEndDate = '' |
|
|
|
this.neighborHoodId = '' |
|
|
|
this.buildingId = '' |
|
|
|
this.buildingUnitId = '' |
|
|
|
this.houseId = '' |
|
|
|
|
|
|
|
this.pageSize = 10 |
|
|
|
this.pageNo = 1 |
|
|
@ -572,7 +585,7 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleNodeClick (obj) { |
|
|
|
async handleNodeClick (obj) { |
|
|
|
this.ownerName = '' |
|
|
|
this.ownerPhone = '' |
|
|
|
this.rentFlag = '' |
|
|
@ -584,27 +597,40 @@ export default { |
|
|
|
|
|
|
|
this.selObj = JSON.parse(JSON.stringify(obj)) |
|
|
|
this.getTreeObj(obj) |
|
|
|
await nextTick(1000) |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
if (obj.level === 'building') {//点击楼栋 |
|
|
|
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) |
|
|
|
if (obj.level === 'building') {//点击楼栋 |
|
|
|
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = '' |
|
|
|
await this.getValiheList() |
|
|
|
this.neighborHoodId = this.selTreeObj.pid |
|
|
|
await this.getBuildList() |
|
|
|
this.buildingId = this.selTreeObj.id |
|
|
|
await this.getUniList() |
|
|
|
|
|
|
|
} else if (obj.level === 'neighborHood') {//点击小区 |
|
|
|
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
} else if (obj.level === 'neighborHood') {//点击小区 |
|
|
|
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = '' |
|
|
|
await this.getValiheList() |
|
|
|
this.neighborHoodId = this.selTreeObj.id |
|
|
|
await this.getBuildList() |
|
|
|
|
|
|
|
if (obj.level === 'grid') { |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = this.selTreeObj.id |
|
|
|
} else { |
|
|
|
this.selAgencyId = this.selTreeObj.id |
|
|
|
this.selGridId = '' |
|
|
|
} |
|
|
|
this.getValiheList() |
|
|
|
} else { |
|
|
|
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
|
|
|
|
if (obj.level === 'grid') { |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = this.selTreeObj.id |
|
|
|
} else { |
|
|
|
this.selAgencyId = this.selTreeObj.id |
|
|
|
this.selGridId = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getValiheList('', '') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|