fix: role menus

This commit is contained in:
xingyu4j 2022-12-08 12:36:28 +08:00
parent b46ac885d4
commit c2a3d1240f

View File

@ -314,7 +314,10 @@ const submitScope = async () => {
} else if ('menu' === actionScopeType.value) {
const data = ref<PermissionApi.PermissionAssignRoleMenuReqVO>({
roleId: dataScopeForm.id,
menuIds: treeRef.value!.getCheckedKeys(false) as unknown as Array<number>
menuIds: [
...(treeRef.value!.getCheckedKeys(false) as unknown as Array<number>),
...(treeRef.value!.getHalfCheckedKeys() as unknown as Array<number>)
]
})
await PermissionApi.assignRoleMenuApi(data.value)
}