From 354cad3d3ab22ba147169beb6a0f6f51b9bab3a8 Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期三, 08 一月 2025 09:07:22 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 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..23e05b4 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,8 +7,8 @@ <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"> - <i class="el-icon-s-promotion"></i> + <span> + <icon-show :name="data.icon"></icon-show> {{ (node || {}).label }} </span> </span> @@ -28,9 +28,18 @@ @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" class="button-custom-icon" size="small" type="primary" @click="addHandler"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 娣诲姞 + </el-button> + <el-button v-if="permissionList.editBtn" class="button-custom-icon" size="small" type="primary" @click="editHandler"> + <icon-show :name="permissionList.editBtn.source"></icon-show> + 淇敼 + </el-button> + <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" @click="delHandler"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> <!--<el-button icon="el-icon-view" plain size="small" type="primary" @click="viewAuthHandler">鏌ョ湅鎺堟潈缁撴灉</el-button>--> </template> </avue-crud> @@ -133,6 +142,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 +239,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