数据权限更新页面

This commit is contained in:
陈淳
2022-09-16 19:04:40 +08:00
parent 0e6113f0a6
commit c63f9de5c5
2 changed files with 10 additions and 12 deletions

View File

@@ -602,8 +602,8 @@ function getRoleMenuTreeselect(roleId) {
menuIds.push(m.id); menuIds.push(m.id);
}); });
nextTick(() => { nextTick(() => {
menuIds.forEach((v) => { menuIds.forEach((v) => {
menuRef.value.setChecked(v, true, false); menuRef.value.setChecked(v, true, false);
}); });
@@ -626,17 +626,15 @@ function getDeptTree(roleId) {
}); });
deptOptions.value = proxy.handleTree(selectList, "id"); deptOptions.value = proxy.handleTree(selectList, "id");
const deptIds = []; let deptIds = [];
roleDeptTreeselect(roleId).then((response) => { roleDeptTreeselect(roleId).then((response) => {
deptIds = response.data.map((x) => x.id);
deptIds= response.data.map((x) => x.id) // nextTick(() => {
if (deptRef.value) {
deptRef.value.setCheckedKeys(deptIds);
}
// });
}); });
nextTick(() => {
if (deptRef.value) {
deptRef.value.setCheckedKeys(deptIds);
}
});
}); });
} }
/** 树权限(展开/折叠)*/ /** 树权限(展开/折叠)*/