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;