diff --git a/yudao-ui-admin-vue3/src/views/system/role/index.vue b/yudao-ui-admin-vue3/src/views/system/role/index.vue
index 6a00f026e..cf24162e7 100644
--- a/yudao-ui-admin-vue3/src/views/system/role/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/role/index.vue
@@ -92,9 +92,9 @@
@@ -166,7 +166,7 @@ import { useMessage } from '@/hooks/web/useMessage'
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
import { handleTree, defaultProps } from '@/utils/tree'
import { SystemDataScopeEnum } from '@/utils/constants'
-import { DICT_TYPE, getDictOptions } from '@/utils/dict'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { rules, allSchemas } from './role.data'
import * as RoleApi from '@/api/system/role'
import { listSimpleMenusApi } from '@/api/system/menu'
@@ -301,18 +301,20 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
}
// 保存权限
const submitScope = async () => {
- const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array
if ('data' === actionScopeType.value) {
const data = ref({
roleId: dataScopeForm.id,
dataScope: dataScopeForm.dataScope,
- dataScopeDeptIds: dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : keys
+ dataScopeDeptIds:
+ dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM
+ ? []
+ : (treeRef.value!.getCheckedKeys(false) as unknown as Array)
})
await PermissionApi.assignRoleDataScopeApi(data.value)
} else if ('menu' === actionScopeType.value) {
const data = ref({
roleId: dataScopeForm.id,
- menuIds: keys
+ menuIds: treeRef.value!.getCheckedKeys(false) as unknown as Array
})
await PermissionApi.assignRoleMenuApi(data.value)
}
@@ -320,7 +322,7 @@ const submitScope = async () => {
dialogScopeVisible.value = false
}
const init = () => {
- dataScopeDictDatas.value = getDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE)
+ dataScopeDictDatas.value = getIntDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE)
}
// ========== 初始化 ==========
onMounted(() => {