调整触发位置
This commit is contained in:
@@ -369,7 +369,6 @@ function fnModalVisibleByVive(userId: string | number) {
|
|||||||
* @param userId 用户编号ID, 不传为新增
|
* @param userId 用户编号ID, 不传为新增
|
||||||
*/
|
*/
|
||||||
function fnModalVisibleByEdit(userId?: string | number) {
|
function fnModalVisibleByEdit(userId?: string | number) {
|
||||||
fnGetDeptTree(); // 获取部门树
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
modalStateFrom.resetFields();
|
modalStateFrom.resetFields();
|
||||||
if (modalState.confirmLoading) return;
|
if (modalState.confirmLoading) return;
|
||||||
@@ -398,6 +397,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
|
|||||||
modalState.from.postIds = postIds;
|
modalState.from.postIds = postIds;
|
||||||
modalState.title =
|
modalState.title =
|
||||||
t('common.addText') + t('views.system.user.userInfo');
|
t('common.addText') + t('views.system.user.userInfo');
|
||||||
|
fnGetDeptTree(); // 获取部门树
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
} else {
|
} else {
|
||||||
message.error(t('views.system.user.tipRowErr'), 2);
|
message.error(t('views.system.user.tipRowErr'), 2);
|
||||||
@@ -798,6 +798,7 @@ function fnGetDeptTree() {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
//若长度为0 删除租户选项
|
//若长度为0 删除租户选项
|
||||||
|
//deptTreeData.value=[];
|
||||||
if (deptTreeData.value.length === 0) {
|
if (deptTreeData.value.length === 0) {
|
||||||
const index = modalState.options.roles.findIndex(
|
const index = modalState.options.roles.findIndex(
|
||||||
(role: any) => role.roleKey === 'tenant'
|
(role: any) => role.roleKey === 'tenant'
|
||||||
|
|||||||
Reference in New Issue
Block a user