From d6b755c2340718c5d188c113526f373bfc637fd1 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Fri, 27 Sep 2024 19:23:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=A7=A6=E5=8F=91=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0c7f4745..907fb533 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -369,7 +369,6 @@ function fnModalVisibleByVive(userId: string | number) { * @param userId 用户编号ID, 不传为新增 */ function fnModalVisibleByEdit(userId?: string | number) { - fnGetDeptTree(); // 获取部门树 if (!userId) { modalStateFrom.resetFields(); if (modalState.confirmLoading) return; @@ -398,6 +397,7 @@ function fnModalVisibleByEdit(userId?: string | number) { modalState.from.postIds = postIds; modalState.title = t('common.addText') + t('views.system.user.userInfo'); + fnGetDeptTree(); // 获取部门树 modalState.visibleByEdit = true; } else { message.error(t('views.system.user.tipRowErr'), 2); @@ -798,6 +798,7 @@ function fnGetDeptTree() { }) .finally(() => { //若长度为0 删除租户选项 + //deptTreeData.value=[]; if (deptTreeData.value.length === 0) { const index = modalState.options.roles.findIndex( (role: any) => role.roleKey === 'tenant'