From 39ae52b3f65e2bba3b6570adb51e791cb3befff7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 02 七月 2025 16:32:29 +0800
Subject: [PATCH] 提交
---
company/src/views/system/role.vue | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/company/src/views/system/role.vue b/company/src/views/system/role.vue
index fcaf19b..579e7ca 100644
--- a/company/src/views/system/role.vue
+++ b/company/src/views/system/role.vue
@@ -42,12 +42,12 @@
<el-table-column
v-if="containPermissions(['system:role:update', 'system:role:createRolePermission', 'system:role:createRoleMenu', 'system:role:delete'])"
label="鎿嶄綔"
- min-width="330"
+ min-width="260"
fixed="right"
>
<template slot-scope="{row}">
<el-button type="text" @click="$refs.operaRoleWindow.open('缂栬緫瑙掕壊', row)" icon="el-icon-edit" v-permissions="['system:role:update']">缂栬緫</el-button>
- <el-button type="text" @click="openRole(row.systemDataPermission)">鏁版嵁鏉冮檺</el-button>
+<!-- <el-button type="text" @click="openRole(row.systemDataPermission, row.id)">鏁版嵁鏉冮檺</el-button>-->
<el-button type="text" @click="$refs.permissionConfigWindow.open(row)" v-permissions="['system:role:createRolePermission']">閰嶇疆鏉冮檺</el-button>
<el-button type="text" @click="$refs.menuConfigWindow.open(row)" icon="el-icon-menu" v-permissions="['system:role:createRoleMenu']">鎺堟潈鑿滃崟</el-button>
<el-button v-if="!row.fixed" type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['system:role:delete']">鍒犻櫎</el-button>
@@ -105,12 +105,16 @@
this.search()
},
methods: {
- openRole(row) {
- let customData = []
- row.customData.split(',').forEach(item => {
- customData.push([item])
- })
- this.$refs.permissions.open('鏁版嵁鏉冮檺', { ...row, customData })
+ openRole(row, id) {
+ if (row) {
+ let customData = []
+ row.customData.split(',').forEach(item => {
+ customData.push([item])
+ })
+ this.$refs.permissions.open('鏁版嵁鏉冮檺', { ...row, customData })
+ } else {
+ this.$refs.permissions.open('鏁版嵁鏉冮檺', { roleId: id, customData: [] })
+ }
}
}
}
--
Gitblit v1.9.3