From 6ad7505d2ac8b51b9b4cde4851563b243cf87068 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Mon, 6 Jun 2022 15:21:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/communityTable.vue | 80 +++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 5eb4596f..147411a2 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -66,7 +66,7 @@ 导出 + @click="handleExportOpen">导出 批量删除 - 导出一户一档 + @click="handleExportYihuyidang()">导出一户一档 --> @@ -183,6 +183,31 @@ @dialogOk="addFormOk"> + +
+ 导出房屋数据 + 导出一户一档 + 导出一户一码 +
+ + 取 消 + 确 定 + +
+ @@ -225,7 +250,9 @@ export default { fileName: "", uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import', yihuyidangDisabled: false, - + yihuyimaDisabled: false, + exportBtn: false, + dialogVisible: false // 导出 } }, components: { @@ -486,7 +513,11 @@ export default { // this.download(res.data, '1.png') }) }, - //导出表格 + // 导出按钮点击事件 + handleExportOpen () { + this.dialogVisible = true + }, + //导出表格 以前是导出 现在改成导出房屋数据 async handleExport () { let title = this.agencyObj.label title = title + '—小区列表' @@ -512,6 +543,10 @@ export default { }, + handleClose(done) { + this.dialogVisible = false + }, + // 下载文件 download (data, downFileName) { if (!data) { @@ -609,6 +644,41 @@ export default { }, + // 导出一户一码 + + handleExportYihuyima () { + this.exportBtn = true + this.yihuyimaDisabled = true + let title = this.agencyObj.label + title = title + '-一户一码' + let url = "/gov/org/house/downloadZip" + + + let params = { + level: this.agencyObj.level, + id: this.agencyObj.id + } + + + + app.ajax.exportFilePost( + url, + params, + (data, rspMsg) => { + + this.download(data, title + '.Zip') + this.exportBtn = false + this.yihuyimaDisabled = false + }, + (rspMsg, data) => { + this.exportBtn = false + this.yihuyimaDisabled = false + this.$message.error(rspMsg); + } + ); + }, + + // 上传文件之前的钩子 beforeUpload (file, type) { From e460c1ef1cca55e15f7c70798c66227b0ee07d81 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Tue, 7 Jun 2022 09:18:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/roomForm.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index 0c1f7341..4f5e75f8 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -40,6 +40,19 @@ + + + + +
+ + 下载 +
Date: Tue, 7 Jun 2022 09:36:57 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/roomForm.vue | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index 4f5e75f8..6d0abc1f 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -40,18 +40,20 @@ - - - - -
- - 下载 +
+ + + + +
+ + 下载 +
Date: Tue, 7 Jun 2022 17:39:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E4=B8=80=E6=88=B7?= =?UTF-8?q?=E4=B8=80=E7=A0=81=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/communityTable.vue | 47 ++++++++++++++++++- src/views/modules/base/community/roomForm.vue | 2 +- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 147411a2..43a90947 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -2,6 +2,12 @@
+ 补全一户一码信息 取 消 - 确 定 + @@ -233,6 +239,9 @@ export default { tableLoading: true, showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 + roleList: [],//角色列表 + showYhymInfo: false, // 是否显示补全一户一码信息按钮 + yhymLoading: false, agencyObj: {},//树所选的组织对象 @@ -273,7 +282,13 @@ export default { async loadTable (fromTree, treeObj) { console.log(111, this.staffAgencyId) - + // 是否显示补全一户一码信息按钮 + this.roleList = localStorage.getItem('roleList') + if (this.roleList.indexOf('root_manager') > -1 || this.roleList.indexOf('manager') > -1) { + this.showYhymInfo = true + } else { + this.showYhymInfo = false + } this.tableLoading = true if (fromTree) { this.agencyObj = treeObj @@ -357,6 +372,34 @@ export default { }) }, + // 补全一户一码点击事件 + async handleYhymInfo () { + this.yhymLoading = true + const url = "/gov/org/house/createBatchHouseCodeAndUrl" + + let params = {} + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.yhymLoading = false + this.$message({ + type: "success", + message: "删除成功" + }); + } else if (code > 8000) { + this.yhymLoading = false + this.$message({ + showClose: true, + message: msg, + duration: 0 + }) + } else { + this.yhymLoading = false + this.$message.error(msg) + } + }, + handleEdit (row) { this.formTitle = '修改小区' this.formShow = true diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index 6d0abc1f..9786631f 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -50,7 +50,7 @@ v-model="dataForm.houseCode"> -
+ From d53be79e37861a803946bc8151243e9e64658821 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Tue, 7 Jun 2022 18:00:40 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/communityTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 43a90947..1c50a46c 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -385,7 +385,7 @@ export default { this.yhymLoading = false this.$message({ type: "success", - message: "删除成功" + message: "批量生成成功" }); } else if (code > 8000) { this.yhymLoading = false