mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud-Vue3.git
synced 2025-09-01 18:34:49 +00:00
优化角色禁用不允许分配
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
|
||||
<el-table-column type="selection" :reserve-selection="true" :selectable="checkSelectable" width="55"></el-table-column>
|
||||
<el-table-column label="角色编号" align="center" prop="roleId" />
|
||||
<el-table-column label="角色名称" align="center" prop="roleName" />
|
||||
<el-table-column label="权限字符" align="center" prop="roleKey" />
|
||||
@@ -65,7 +65,9 @@ const form = ref({
|
||||
|
||||
/** 单击选中行数据 */
|
||||
function clickRow(row) {
|
||||
proxy.$refs["roleRef"].toggleRowSelection(row);
|
||||
if (checkSelectable(row)) {
|
||||
proxy.$refs["roleRef"].toggleRowSelection(row);
|
||||
}
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
@@ -78,6 +80,11 @@ function getRowKey(row) {
|
||||
return row.roleId;
|
||||
};
|
||||
|
||||
// 检查角色状态
|
||||
function checkSelectable(row) {
|
||||
return row.status === "0" ? true : false;
|
||||
};
|
||||
|
||||
/** 关闭按钮 */
|
||||
function close() {
|
||||
const obj = { path: "/system/user" };
|
||||
|
Reference in New Issue
Block a user