调整触发位置

This commit is contained in:
lai
2024-09-27 19:23:04 +08:00
parent a889f97bd6
commit d6b755c234

View File

@@ -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'