From afd969583f5c7f88f22a384a12a4dbbc6fcd8d67 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 11 May 2022 16:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=8C=BA=E4=B8=80=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 48 ++++++++++++++++ .../modules/base/community/community.vue | 21 +++++-- .../modules/base/community/communityTable.vue | 55 +++++++++++++++++++ .../modules/base/community/roomTable.vue | 46 ++++++++++++++++ 4 files changed, 164 insertions(+), 6 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 290d53a4..125a8feb 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -52,6 +52,10 @@ class="diy-button--more" size="small" @click="deleteBatch">批量删除 + 导出一户一档
@@ -582,6 +586,38 @@ export default { ); }, + //导出一户一档 + handleExportYihuyidang () { + let title = this.agencyObj.label + title = title + '-一户一档' + let url = "/gov/org/house/exportHouseUser" + + + let params = { + agencyId: '', + gridId: '', + ownerName: this.ownerName, + ownerPhone: this.ownerPhone, + rentFlag: this.rentFlag, + neighborHoodId: this.agencyObj.id + + } + + + + app.ajax.exportFilePost( + url, + params, + (data, rspMsg) => { + + this.download(data, title + '.xls') + }, + (rspMsg, data) => { + this.$message.error(rspMsg); + } + ); + }, + // 上传文件之前的钩子 beforeUpload (file, type) { @@ -725,6 +761,18 @@ export default { type: Boolean, default: false, }, + ownerName: { + type: String, + default: '', + }, + ownerPhone: { + type: String, + default: '', + }, + rentFlag: { + type: String, + default: '', + }, } } diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 156903b8..01f94046 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -62,7 +62,7 @@
@@ -92,18 +92,27 @@ ref="ref_neighTable" :staffAgencyId="staffAgencyId" :showImportBtn="showImportBtn" + :ownerName="ownerName" + :ownerPhone="ownerPhone" + :rentFlag="rentFlag" @toNextLevel="toNextLevel" @refreshTree="refreshTree"> @@ -156,7 +165,7 @@ export default { ], ownerName: '', ownerPhone: '', - rentState: '', + rentFlag: '', showRoomTable: false, selObj: {}, } @@ -197,11 +206,11 @@ export default { methods: { handleSearch () { - if (this.ownerName || this.ownerPhone || this.rentState) { + if (this.ownerName || this.ownerPhone || this.rentFlag) { this.showRoomTable = true this.$nextTick(() => { - this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState) + this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentFlag) }) } else { this.$message.warning('请输入查询条件') @@ -214,7 +223,7 @@ export default { resetSearch () { this.ownerName = '' this.ownerPhone = '' - this.rentState = '' + this.rentFlag = '' this.pageSize = 10 this.pageNo = 1 @@ -285,7 +294,7 @@ export default { handleNodeClick (obj) { this.ownerName = '' this.ownerPhone = '' - this.rentState = '' + this.rentFlag = '' this.showRoomTable = false this.selObj = JSON.parse(JSON.stringify(obj)) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index e93868af..11aaf2be 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -61,6 +61,7 @@ size="small" class="diy-button--delete">导入房屋数据 +
批量删除 + 导出一户一档
@@ -562,6 +567,44 @@ export default { ); }, + //导出一户一档 + handleExportYihuyidang () { + let title = this.agencyObj.label + title = title + '-一户一档' + let url = "/gov/org/house/exportHouseUser" + + + let params = { + agencyId: '', + gridId: '', + ownerName: this.ownerName, + ownerPhone: this.ownerPhone, + rentFlag: this.rentFlag, + } + + if (this.agencyObj.level === 'grid') { + params.gridId = this.agencyObj.id + params.agencyId = '' + } else { + params.gridId = '' + params.agencyId = this.agencyObj.id + } + + app.ajax.exportFilePost( + url, + params, + (data, rspMsg) => { + + this.download(data, title + '.xls') + }, + (rspMsg, data) => { + this.$message.error(rspMsg); + } + ); + }, + + + // 上传文件之前的钩子 beforeUpload (file, type) { this.files = file; @@ -717,6 +760,18 @@ export default { type: String, default: '', }, + ownerName: { + type: String, + default: '', + }, + ownerPhone: { + type: String, + default: '', + }, + rentFlag: { + type: String, + default: '', + }, } } diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 49574f4c..5f4c75f0 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -35,6 +35,10 @@ class="diy-button--more" size="small" @click="deleteBatch">批量删除 + 导出一户一档
@@ -603,6 +607,36 @@ export default { ); }, + //导出一户一档 + handleExportYihuyidang () { + let title = this.agencyObj.label + title = title + '-一户一档' + let url = "/gov/org/house/exportHouseUser" + + + let params = { + agencyId: '', + gridId: '', + ownerName: this.ownerName, + ownerPhone: this.ownerPhone, + rentFlag: this.rentFlag, + buildingId: this.agencyObj.id + } + + + + app.ajax.exportFilePost( + url, + params, + (data, rspMsg) => { + + this.download(data, title + '.xls') + }, + (rspMsg, data) => { + this.$message.error(rspMsg); + } + ); + }, // 上传文件之前的钩子 beforeUpload (file) { this.files = file; @@ -730,6 +764,18 @@ export default { type: Boolean, default: false, }, + ownerName: { + type: String, + default: '', + }, + ownerPhone: { + type: String, + default: '', + }, + rentFlag: { + type: String, + default: '', + }, } }