From 96df9c12a94474ddd567fab1f255d3721b6cf03c Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期四, 02 一月 2025 16:28:38 +0800 Subject: [PATCH] 调整UI引擎页面按钮图标 --- Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 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 8a9012a..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,10 +28,10 @@ @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 icon="el-icon-view" plain size="small" type="primary" @click="viewAuthHandler">鏌ョ湅鎺堟潈缁撴灉</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> <div style="margin-top: 15px;"> @@ -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,13 +230,23 @@ } } }, + 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(); }, watch:{ 'form.userOid':{ handler(val) { - if(val){ + /*if(val){ listRoleByUserOid(val).then(res => { // 缁勮濂界┛姊鍙敤鏁版嵁 this.roleDic = res.data.data; @@ -258,7 +269,7 @@ this.deptDic=[]; this.form.roleOid='' this.form.deptOid=''; - } + }*/ }, immediate: true, deep: true -- Gitblit v1.9.3