diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue
index a93ae6233..59ee91903 100644
--- a/src/views/modules/base/community/buildTable.vue
+++ b/src/views/modules/base/community/buildTable.vue
@@ -41,47 +41,49 @@
size="small"
icon="el-icon-plus"
@click="handleAdd">新增楼宇
-
- 下载楼宇模板
-
-
-
+ 导入楼宇数据
-
- 下载房屋模板
-
-
- 下载楼宇模板
+
+
+ 导入楼宇数据
+
+ 导入房屋数据
-
+ icon="el-icon-download"
+ @click="handleExportModule('room')">下载房屋模板
+
+
+ 导入房屋数据
+
+
@@ -134,12 +136,14 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看
- 修改
- 删除
@@ -206,6 +210,7 @@ export default {
tableLoading: true,
selAllFlag: false,
isIndeterminate: false,//复选框的不确定状态
+ showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断
agencyObj: {},//树所选的小区对象
ownerName: '',
@@ -243,6 +248,21 @@ export default {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
+ if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮
+ if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限
+ this.showImportBtn = true
+ } else {
+ this.showImportBtn = false
+ }
+ } else if (this.agencyObj.level === 'grid') {//网格下
+ if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限
+ this.showImportBtn = true
+ } else {
+ this.showImportBtn = false
+ }
+ } else {
+ this.showImportBtn = false
+ }
}
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist"
@@ -258,6 +278,14 @@ export default {
if (code === 0) {
this.total = data.total
+ data.list.forEach(item => {
+ if (item.agencyId === this.staffAgencyId) {
+ item.showBtn = true
+ } else {
+ item.showBtn = false
+ }
+
+ });
this.tableData = data.list
} else {
this.$message.error(msg)
diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue
index c4678931d..00dede493 100644
--- a/src/views/modules/base/community/communityTable.vue
+++ b/src/views/modules/base/community/communityTable.vue
@@ -157,13 +157,13 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看
- 修改
- {
+ data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
} else {
diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue
index 25b60b183..75140abe9 100644
--- a/src/views/modules/base/community/roomTable.vue
+++ b/src/views/modules/base/community/roomTable.vue
@@ -125,12 +125,14 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看
- 修改
- 删除
@@ -195,6 +197,7 @@ export default {
tableLoading: true,
selAllFlag: false,
isIndeterminate: false,//复选框的不确定状态
+ showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断
agencyObj: {},//树所选的小区对象
ownerName: '',
@@ -234,6 +237,21 @@ export default {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
+ if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮
+ if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限
+ this.showImportBtn = true
+ } else {
+ this.showImportBtn = false
+ }
+ } else if (this.agencyObj.level === 'grid') {//网格下
+ if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限
+ this.showImportBtn = true
+ } else {
+ this.showImportBtn = false
+ }
+ } else {
+ this.showImportBtn = false
+ }
}
const url = "/gov/org/house/houselist"
@@ -250,6 +268,14 @@ export default {
if (code === 0) {
this.total = data.total
+ data.list.forEach(item => {
+ if (item.agencyId === this.staffAgencyId) {
+ item.showBtn = true
+ } else {
+ item.showBtn = false
+ }
+
+ });
this.tableData = data.list
} else {
this.$message.error(msg)