From 1b84a05dd84e535284ac6e2d2b360d76a4b8e7ac Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期二, 17 十二月 2024 16:11:30 +0800
Subject: [PATCH] 查询模板&&功能权限模块添加按钮权限

---
 Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue
index a5a323e..ff67598 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue
@@ -22,8 +22,8 @@
       <basic-container v-loading="treeLoading">
         <h3 style="margin: 0 0 10px 0">鍔熻兘鏉冮檺閰嶇疆</h3>
         <div>
-          <el-button icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">鎺堟潈</el-button>
-          <el-button icon="el-icon-close" plain size="small" style="margin-right: 40px;" type="primary"
+          <el-button v-if="permissionList.rightBtn" icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">鎺堟潈</el-button>
+          <el-button v-if="permissionList.resetBtn" icon="el-icon-close" plain size="small" style="margin-right: 40px;" type="primary"
                      @click="clearValue">閲嶇疆
           </el-button>
         </div>
@@ -46,6 +46,7 @@
 <script>
 import {gridRoles} from "@/api/system/role/api";
 import {getSysModelAuthTreeMenuByPID, getSysModelAuth, saveRoleRight} from "@/api/authority/functionView/api"
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
@@ -83,6 +84,15 @@
       contextData: []
     }
   },
+  computed:{
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        rightBtn: this.vaildData(this.permission[this.$route.query.id].RIGHT, false),
+        resetBtn: this.vaildData(this.permission[this.$route.query.id].reset, false),
+      };
+    },
+  },
   created() {
     this.getTreeList();
     this.getUITree();

--
Gitblit v1.9.3