From a64eca3aeb7529f55de878dfae48378ec138635a Mon Sep 17 00:00:00 2001
From: insistence <3055204202@qq.com>
Date: Tue, 26 Aug 2025 10:51:27 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2?=
=?UTF-8?q?=E7=A6=81=E7=94=A8=E4=B8=8D=E5=85=81=E8=AE=B8=E5=88=86=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/system/user/authRole.vue | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/ruoyi-fastapi-frontend/src/views/system/user/authRole.vue b/ruoyi-fastapi-frontend/src/views/system/user/authRole.vue
index 0b5c14b..93516b4 100644
--- a/ruoyi-fastapi-frontend/src/views/system/user/authRole.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/user/authRole.vue
@@ -23,7 +23,7 @@
{{ (pageNum - 1) * pageSize + scope.$index + 1 }}
-
+
@@ -65,21 +65,32 @@ const form = ref({
/** 单击选中行数据 */
function clickRow(row) {
- proxy.$refs["roleRef"].toggleRowSelection(row);
+ if (checkSelectable(row)) {
+ proxy.$refs["roleRef"].toggleRowSelection(row);
+ }
};
+
/** 多选框选中数据 */
function handleSelectionChange(selection) {
roleIds.value = selection.map(item => item.roleId);
};
+
/** 保存选中的数据编号 */
function getRowKey(row) {
return row.roleId;
};
+
+// 检查角色状态
+function checkSelectable(row) {
+ return row.status === "0" ? true : false;
+};
+
/** 关闭按钮 */
function close() {
const obj = { path: "/system/user" };
proxy.$tab.closeOpenPage(obj);
};
+
/** 提交按钮 */
function submitForm() {
const userId = form.value.userId;