From b8c465bb06866db0bb3e94398f16e680af3cbc8d Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 7 May 2024 16:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=95=B0=E6=8D=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=BF=94=E7=8E=B0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/RoleDataPermissionForm.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue index 8747bd7..9f86cb8 100644 --- a/src/views/system/role/RoleDataPermissionForm.vue +++ b/src/views/system/role/RoleDataPermissionForm.vue @@ -102,8 +102,10 @@ const open = async (row: RoleApi.RoleVO) => { formData.name = row.name formData.code = row.code formData.dataScope = row.dataScope - row.dataScopeDeptIds?.forEach((deptId: number) => { - treeRef.value.setChecked(deptId, true, false) + nextTick(() => { + row.dataScopeDeptIds?.forEach((deptId: number) => { + treeRef.value.setChecked(deptId, true, false) + }) }) } defineExpose({ open }) // 提供 open 方法,用于打开弹窗