Browse Source

房屋管理

V1.0
jiangyy 3 years ago
parent
commit
154e65f83e
  1. 178
      src/views/modules/base/community/community.vue
  2. 32
      src/views/modules/base/community/roomTable.vue

178
src/views/modules/base/community/community.vue

@ -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('', '')
}
},

32
src/views/modules/base/community/roomTable.vue

@ -297,6 +297,10 @@ export default {
sortType: this.sortType,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
neighborHoodId: this.neighborHoodId,
buildingId: this.buildingId,
buildingUnitId: this.buildingUnitId,
houseId: this.houseId,
};
this.$refs.baobiao.init({
elseParams: {
@ -401,6 +405,10 @@ export default {
sortType: this.sortType,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
neighborHoodId: this.neighborHoodId,
buildingId: this.buildingId,
buildingUnitId: this.buildingUnitId,
houseId: this.houseId,
};
const url = "/gov/org/house/houselist";
@ -602,6 +610,10 @@ export default {
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
buildingId: this.agencyObj.id,
neighborHoodId: this.neighborHoodId,
buildingId: this.buildingId,
buildingUnitId: this.buildingUnitId,
houseId: this.houseId,
};
if (this.agencyObj.level === "grid") {
@ -699,6 +711,10 @@ export default {
remark: this.remark,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
neighborHoodId: this.neighborHoodId,
buildingId: this.buildingId,
buildingUnitId: this.buildingUnitId,
houseId: this.houseId,
buildingId: "",
neighborHoodId: "",
};
@ -891,6 +907,22 @@ export default {
type: String,
default: "",
},
neighborHoodId: {
type: String,
default: "",
},
buildingId: {
type: String,
default: "",
},
buildingUnitId: {
type: String,
default: "",
},
houseId: {
type: String,
default: "",
},
},
};
</script>

Loading…
Cancel
Save