From 370b26066c560f15f6a84caca2be149e48e86556 Mon Sep 17 00:00:00 2001 From: 田源 <tianyuan@vci-tech.com> Date: 星期二, 07 一月 2025 15:52:05 +0800 Subject: [PATCH] 系统菜单 默认显示&&系统配置、对象建模按钮权限以及按钮图标 --- Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue | 46 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 37 insertions(+), 9 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue index 3f47257..b30aeee 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue @@ -10,16 +10,40 @@ @on-load="getTableList" @row-save="rowSaveHandler" @row-update="rowUpdateHandler" - @row-del="rowDeleteHandler" @row-click="rowClickHandler" @selection-change="selectionChange" > <template slot="menuLeft" slot-scope="scope"> - <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> + <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary" + @click="$refs.crud.rowAdd()"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 鏂� 澧� + </el-button> + <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> + <icon-show :name="permissionList.exportBtn.source"></icon-show> + 瀵煎嚭 + </el-button> </template> - <!--<template #menu="{row,index,size}"> - <el-button icon="el-icon-user" type="text" size="small" @click="userHandler(row,index)">鍒嗛厤鎴愬憳</el-button> - </template>--> + <template slot="menu" slot-scope="{ row, index }"> + <el-button + v-if="permissionList.editBtn" + size="small" + type="text" + @click="handleEdit(row, index)" + > + <icon-show :name="permissionList.editBtn.source"></icon-show> + 缂栬緫 + </el-button> + <el-button + v-if="permissionList.delBtn" + size="small" + type="text" + @click="handleDel(row, index)" + > + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> + </template> </avue-crud> <!-- 鍒嗛厤鎴愬憳绌挎妗� --> <transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData" @@ -70,9 +94,9 @@ option(){ return { ...basicOption, - addBtn:this.permissionList.addBtn, - editBtn:this.permissionList.editBtn, - delBtn:this.permissionList.delBtn, + addBtn:false, + editBtn:false, + delBtn:false, calcHeight: -60, align:'left', headerAlign:'center', @@ -161,6 +185,10 @@ }); }, + handleEdit(row,index){ + this.$refs.crud.rowEdit(row, index); + }, + // 缂栬緫 rowUpdateHandler(row, index, done, loading) { updatePvolume(row).then(res => { @@ -175,7 +203,7 @@ }, // 鍒犻櫎 - rowDeleteHandler(row) { + handleDel(row,index) { let params = { ids: row.id } -- Gitblit v1.9.3