From c6b0efcdc2fe679e04793ab63c9d9c7952cc0541 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Apr 2025 15:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2=E7=A6=81?= =?UTF-8?q?=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 --- ruoyi-ui/src/views/system/user/authRole.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/system/user/authRole.vue b/ruoyi-ui/src/views/system/user/authRole.vue index aeb42225..efbda653 100644 --- a/ruoyi-ui/src/views/system/user/authRole.vue +++ b/ruoyi-ui/src/views/system/user/authRole.vue @@ -10,7 +10,7 @@ - + @@ -20,10 +20,10 @@ - + @@ -52,14 +52,14 @@ export default { name: "AuthRole", data() { return { - // 遮罩层 + // 遮罩层 loading: true, // 分页信息 total: 0, pageNum: 1, pageSize: 10, // 选中角色编号 - roleIds:[], + roleIds: [], // 角色信息 roles: [], // 用户信息 @@ -88,7 +88,9 @@ export default { methods: { /** 单击选中行数据 */ clickRow(row) { - this.$refs.table.toggleRowSelection(row); + if (this.checkSelectable(row)) { + this.$refs.table.toggleRowSelection(row); + } }, // 多选框选中数据 handleSelectionChange(selection) { @@ -98,6 +100,10 @@ export default { getRowKey(row) { return row.roleId; }, + // 检查角色状态 + checkSelectable(row) { + return row.status === "0" ? true : false; + }, /** 提交按钮 */ submitForm() { const userId = this.form.userId;