From 50fb58286ed3b718c39a97e0987ee7561a295651 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 04 七月 2025 17:56:41 +0800
Subject: [PATCH] git ch

---
 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