From aeff7b0782847a1fda77f96624b97b53e2f99e1a Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 17 十二月 2024 10:42:23 +0800
Subject: [PATCH] 对象建模模块按钮权限

---
 Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue |   49 ++++++++++++++++++++++++++++++++-----------------
 1 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
index 5b51340..62de377 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
@@ -15,7 +15,7 @@
       @selection-change="selectionChange"
     >
       <template slot="menuLeft" slot-scope="scope">
-        <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
+        <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
       </template>
       <!--<template #menu="{row,index,size}">
         <el-button icon="el-icon-user" type="text" size="small" @click="userHandler(row,index)">鍒嗛厤鎴愬憳</el-button>
@@ -34,6 +34,7 @@
 import func from "@/util/func";
 import basicOption from "@/util/basic-option";
 import {listUserByRoleOid, listUserUnInRoleOid, saveRight} from "@/api/system/role/api";
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
@@ -42,8 +43,36 @@
       form:{},
       tableLoading: false,
       tableData: [],
-      option: {
+      currentRow:null,
+      leftRoleData: [],  // 鍒嗛厤鎴愬憳绌挎妗嗗乏渚у垵濮嬫暟鎹�
+      rightRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗彸渚у垵濮嬫暟鎹�
+      transferTitle: ['鏂囦欢鏌滃鎴愬憳', '鏂囦欢鏌滃唴鎴愬憳'],
+      selectionList: [],
+    }
+  },
+  computed: {
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    },
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+      };
+    },
+    option(){
+      return  {
         ...basicOption,
+        addBtn:this.permissionList.addBtn,
+        editBtn:this.permissionList.editBtn,
+        delBtn:this.permissionList.delBtn,
         calcHeight: -60,
         align:'left',
         headerAlign:'center',
@@ -106,21 +135,7 @@
               });
             },
           }]
-      },
-      currentRow:null,
-      leftRoleData: [],  // 鍒嗛厤鎴愬憳绌挎妗嗗乏渚у垵濮嬫暟鎹�
-      rightRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗彸渚у垵濮嬫暟鎹�
-      transferTitle: ['鏂囦欢鏌滃鎴愬憳', '鏂囦欢鏌滃唴鎴愬憳'],
-      selectionList: [],
-    }
-  },
-  computed: {
-    ids() {
-      let ids = [];
-      this.selectionList.forEach(ele => {
-        ids.push(ele.id);
-      });
-      return ids.join(",");
+      }
     }
   },
   methods: {

--
Gitblit v1.9.3