From a4d039cee6e2943eb025717a8fe69b4c992797a5 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期一, 30 十二月 2024 11:14:11 +0800
Subject: [PATCH] 整合代码 添加系统菜单默认图标
---
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue
index 592c8b0..19075c8 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue
@@ -7,7 +7,7 @@
<div style="height: calc(100vh - 190px);">
<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-s-promotion"></i>
{{ (node || {}).label }}
</span>
@@ -28,9 +28,9 @@
@refresh-change="handleRefresh"
@current-row-change="rowClickHandler">
<template slot="menuLeft">
- <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">娣诲姞</el-button>
- <el-button icon="el-icon-plus" size="small" type="primary" @click="editHandler">淇敼</el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button>
+ <el-button v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="addHandler">娣诲姞</el-button>
+ <el-button v-if="permissionList.editBtn" icon="el-icon-plus" size="small" type="primary" @click="editHandler">淇敼</el-button>
+ <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button>
<!--<el-button icon="el-icon-view" plain size="small" type="primary" @click="viewAuthHandler">鏌ョ湅鎺堟潈缁撴灉</el-button>-->
</template>
</avue-crud>
@@ -133,6 +133,7 @@
import {getData,saveGrand,delGrand,authResult,queryBusiness} from "@/api/authority/ui/dataAuthor";
import {listUserByUserType, listRoleByUserOid, listDeptByUserOid} from "@/api/system/user/api";
import func from "@/util/func";
+import {mapGetters} from "vuex";
export default {
name: "index",
components:{dataView},
@@ -229,6 +230,16 @@
}
}
},
+ computed:{
+ ...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),
+ };
+ },
+ },
created() {
this.getTreeList();
},
--
Gitblit v1.9.3