diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue index 0cdc7409..3b8c3ee6 100644 --- a/src/views/system/role/RoleDataPermissionForm.vue +++ b/src/views/system/role/RoleDataPermissionForm.vue @@ -102,8 +102,8 @@ const open = async (row: RoleApi.RoleVO) => { formData.name = row.name formData.code = row.code formData.dataScope = row.dataScope - nextTick((): void => { - row.dataScopeDeptIds?.forEach((deptId: number) => { + await nextTick((): void => { + row.dataScopeDeptIds?.forEach((deptId: number): void => { treeRef.value.setChecked(deptId, true, false) }) })