From cd68e400dec06aa87d093aebc691c127ca816cb8 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期一, 30 十二月 2024 11:14:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 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 4bef6c2..3f19ee1 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
@@ -7,7 +7,7 @@
<div style="height: calc(100vh - 195px);">
<avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
<span slot-scope="{ node, data }" class="el-tree-node__label">
- <span style="font-size: 15px">
+ <span>
<i class="el-icon-user-solid"></i>
{{ (node || {}).label }}
</span>
@@ -22,15 +22,15 @@
<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>
<div style="height: calc(100vh - 232px);margin-top: 10px;">
<avue-tree ref="uiTree" :data="uiTreeData" :node-key="id" :option="uiTreeOption">
<span slot-scope="{ node, data }" class="el-tree-node__label">
- <span style="font-size: 15px">
+ <span>
<i :class="data.icon"></i>
{{ (node || {}).label }}
</span>
@@ -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();
@@ -103,6 +113,7 @@
this.treeLoading = true;
getSysModelAuth({roleId: row.oid}).then(res => {
const data = res.data.data;
+ // console.log(data);
this.$refs.uiTree.setCheckedKeys(data);
this.treeLoading = false;
})
--
Gitblit v1.9.3