角色分配权限
This commit is contained in:
parent
8b3d7553d3
commit
c34dfa5cf8
@ -71,6 +71,8 @@ const menuTree = ref<any[]>([]);
|
||||
// 获取所有选择的节点
|
||||
const getDeptAllCheckedKeys = () => {
|
||||
const checkedKeys = treeRef.value?.getCheckedKeys();
|
||||
const halfCheckedKeys = treeRef.value?.getHalfCheckedKeys()!;
|
||||
checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||
return checkedKeys;
|
||||
};
|
||||
|
||||
@ -109,13 +111,11 @@ const setFormData = async () => {
|
||||
menuTree.value = buildTree(data);
|
||||
menuArray.value =data;
|
||||
nextTick(()=>{
|
||||
let ids = [];
|
||||
menuArray.value.map(item=>{
|
||||
if(item.checked){
|
||||
ids.push(item.id)
|
||||
treeRef.value?.setChecked(item.id,true, false);
|
||||
}
|
||||
})
|
||||
treeRef.value?.setCheckedKeys(ids,true, false);
|
||||
})
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user