diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue
index bbdb0db2..5f4a3c76 100644
--- a/src/views/modules/base/community/communityTable.vue
+++ b/src/views/modules/base/community/communityTable.vue
@@ -2,6 +2,12 @@
+ 补全一户一码信息
导出
+ @click="handleExportOpen">导出
批量删除
- 导出一户一档
+ @click="handleExportYihuyidang()">导出一户一档 -->
@@ -183,6 +189,31 @@
@dialogOk="addFormOk">
+
+
+ 导出房屋数据
+ 导出一户一档
+ 导出一户一码
+
+
+
+
@@ -208,6 +239,9 @@ export default {
tableLoading: true,
showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断
+ roleList: [],//角色列表
+ showYhymInfo: false, // 是否显示补全一户一码信息按钮
+ yhymLoading: false,
agencyObj: {},//树所选的组织对象
@@ -225,7 +259,9 @@ export default {
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import',
yihuyidangDisabled: false,
-
+ yihuyimaDisabled: false,
+ exportBtn: false,
+ dialogVisible: false // 导出
}
},
components: {
@@ -246,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
@@ -330,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
@@ -486,7 +556,11 @@ export default {
// this.download(res.data, '1.png')
})
},
- //导出表格
+ // 导出按钮点击事件
+ handleExportOpen () {
+ this.dialogVisible = true
+ },
+ //导出表格 以前是导出 现在改成导出房屋数据
async handleExport () {
let title = this.agencyObj.label
title = title + '—小区列表'
@@ -512,6 +586,10 @@ export default {
},
+ handleClose(done) {
+ this.dialogVisible = false
+ },
+
// 下载文件
download (data, downFileName) {
if (!data) {
@@ -613,6 +691,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) {
diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue
index 0c1f7341..9786631f 100644
--- a/src/views/modules/base/community/roomForm.vue
+++ b/src/views/modules/base/community/roomForm.vue
@@ -40,6 +40,21 @@
+