diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 03b19b0de..074edc48e 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -122,6 +122,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) { @@ -299,6 +381,113 @@ export default { ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { + handleChangeV (val) { + + this.buildingId = ""; + this.buildingUnitId = ""; + this.houseId = ""; + this.getBuildList(); + // this.getUniList(); + // this.getHouseList(); + }, + handleChangeB (val) { + + this.buildingUnitId = ""; + this.houseId = ""; + this.getUniList(); + // this.getHouseList(); + }, + handleChangeD () { + this.houseId = ""; + this.getHouseList(); + }, + + async getValiheList () { + const { user } = this.$store.state; + if (!this.selGridId) { + this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId + } + + 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); + } + + + }, + + 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); + } + + + }, + 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); + } + + + }, + getHouseList () { + this.$http + .post("/gov/org/ichouse/houseoption", { unitId: this.buildingUnitId }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } else { + + this.optionsH = res.data; + this.houseId = ""; + } + }) + .catch(() => { + return this.$message.error("网络错误"); + }); + }, handleSearch () { // if (this.ownerName || this.ownerPhone || this.rentFlag || this.purpose || this.remark) { @@ -323,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 @@ -392,7 +585,7 @@ export default { }, - handleNodeClick (obj) { + async handleNodeClick (obj) { this.ownerName = '' this.ownerPhone = '' this.rentFlag = '' @@ -404,18 +597,40 @@ export default { this.selObj = JSON.parse(JSON.stringify(obj)) this.getTreeObj(obj) + await nextTick(1000) + + 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() - this.$nextTick(() => { - if (obj.level === 'building') {//点击楼栋 - this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) - } else if (obj.level === 'neighborHood') {//点击小区 - this.$refs['ref_neighTable'].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() + + } else { + this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) + if (obj.level === 'grid') { + this.selAgencyId = '' + this.selGridId = this.selTreeObj.id } else { - this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) + this.selAgencyId = this.selTreeObj.id + this.selGridId = '' } - }) + this.getValiheList('', '') + } + }, @@ -507,7 +722,7 @@ export default { obj.longitude = this.centerPoint[1] } this.selTreeObj = obj - console.log(this.selTreeObj) + console.log('selTreeObj', this.selTreeObj) }, diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index c16620f39..55875f770 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -332,6 +332,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: { @@ -436,6 +440,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"; @@ -637,6 +645,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") { @@ -734,6 +746,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: "", }; @@ -926,6 +942,22 @@ export default { type: String, default: "", }, + neighborHoodId: { + type: String, + default: "", + }, + buildingId: { + type: String, + default: "", + }, + buildingUnitId: { + type: String, + default: "", + }, + houseId: { + type: String, + default: "", + }, }, }; diff --git a/src/views/modules/base/epidemic/antiInfo.vue b/src/views/modules/base/epidemic/antiInfo.vue index 8fed44547..7b9a8a3ce 100644 --- a/src/views/modules/base/epidemic/antiInfo.vue +++ b/src/views/modules/base/epidemic/antiInfo.vue @@ -141,6 +141,22 @@ + + + + + + + + + 导出 + { + this.download(data, title + '.xlsx') + }, + (rspMsg, data) => { + this.$message.error(rspMsg); + } + ); + + }, + + // 下载文件 + download (data, fileName) { + if (!data) { + return + } + + var csvData = new Blob([data]) + + if (window.navigator && window.navigator.msSaveOrOpenBlob) { + window.navigator.msSaveOrOpenBlob(csvData, fileName); + } + // for Non-IE (chrome, firefox etc.) + else { + var a = document.createElement('a'); + document.body.appendChild(a); + a.style = 'display: none'; + var url = window.URL.createObjectURL(csvData); + a.href = url; + a.download = fileName; + a.click(); + a.remove(); + window.URL.revokeObjectURL(url); + } + + }, + handleSizeChange (val) { this.pageSize = val this.pageNo = 1 diff --git a/src/views/modules/base/epidemic/natInfo/natList.vue b/src/views/modules/base/epidemic/natInfo/natList.vue index 4b776bec9..0be44e33e 100644 --- a/src/views/modules/base/epidemic/natInfo/natList.vue +++ b/src/views/modules/base/epidemic/natInfo/natList.vue @@ -22,7 +22,6 @@ + + + + + + + + + + +