【修改】角色菜单集合复选框回显不正确

This commit is contained in:
cks
2022-03-23 15:21:34 +08:00
parent cefcff6524
commit 2e97442187

View File

@@ -392,8 +392,7 @@ export default {
// 处理 menuOptions 参数 // 处理 menuOptions 参数
this.menuOptions = []; this.menuOptions = [];
this.menuOptions.push(...this.handleTree(response.data, "id")); this.menuOptions.push(...this.handleTree(response.data, "id"));
}); // 获取角色拥有的菜单权限
// 获得角色拥有的菜单集合
listRoleMenus(id).then(response => { listRoleMenus(id).then(response => {
// 设置为严格,避免设置父节点自动选中子节点,解决半选中问题 // 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
this.form.menuCheckStrictly = true this.form.menuCheckStrictly = true
@@ -402,6 +401,8 @@ export default {
// 设置为非严格,继续使用半选中 // 设置为非严格,继续使用半选中
this.form.menuCheckStrictly = false this.form.menuCheckStrictly = false
}) })
});
}, },
/** 分配数据权限操作 */ /** 分配数据权限操作 */
handleDataScope(row) { handleDataScope(row) {