浏览代码

账户组导出添加权限

zhaoke 11 月之前
父节点
当前提交
9fea11b46a
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11 2
      src/views/newUserManagement/index.vue

+ 11 - 2
src/views/newUserManagement/index.vue

@@ -22,7 +22,7 @@
           <div class="flex head">
             <div class="title">账号组列表</div>
             <div>
-              <el-button @click="handleExport" class="serButton" size="small">导出</el-button>
+              <el-button v-if="isExport" @click="handleExport" class="serButton" size="small">导出</el-button>
               <el-button @click="handleAdd" class="serButton" size="small">新增</el-button>
             </div>
           </div>
@@ -232,7 +232,7 @@ import XLSX from "xlsx";
 import { Format } from '@/utils/validate'
 import { exportToExcel } from '@/utils/table'
 import { exportJsonToExcel } from '@/utils/Export2Excel.js'
-import { reactive } from "vue";
+import { mapGetters } from 'vuex'
 // import * as XLSX from 'xlsx'
 import XLSX_STYLE from 'xlsx-style'
 import FileSaver from 'file-saver'
@@ -328,6 +328,7 @@ export default {
     this.upgout()
   },
   computed: {
+    ...mapGetters(['authArrs']),
     dataList () {
       return this.arrs
     },
@@ -336,6 +337,14 @@ export default {
     },
     addUserDisabled () {
       return !this.treeCheckId
+    },
+    isExport () {
+      const len = this.authArrs.filter(item => item.auth_ident == 'userExport')
+      if (len.length) {
+        return true
+      } else {
+        return false
+      }
     }
   },
   methods: {