From 9abcbbac2ebf71c2e2966d37ddadf122a6f2122f Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Mon, 25 Apr 2022 14:05:27 +0800 Subject: [PATCH] [Fix][UI Next][V1.0.0-Beta] Fix the bug that the tenant is 0 when editing a user. (#9739) --- dolphinscheduler-ui-next/src/service/modules/users/types.ts | 2 +- .../views/security/user-manage/components/use-user-detail.ts | 2 +- .../src/views/security/user-manage/types.ts | 1 + .../src/views/security/user-manage/use-table.ts | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-ui-next/src/service/modules/users/types.ts b/dolphinscheduler-ui-next/src/service/modules/users/types.ts index a49370560c..33de77e215 100644 --- a/dolphinscheduler-ui-next/src/service/modules/users/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/users/types.ts @@ -29,7 +29,7 @@ interface AlertGroupIdReq { interface UserReq { email: string - tenantId: number + tenantId: number | null userName: string userPassword: string phone?: string diff --git a/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-user-detail.ts b/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-user-detail.ts index 0aa9fcc87b..f095927a73 100644 --- a/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-user-detail.ts +++ b/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-user-detail.ts @@ -32,7 +32,7 @@ export function useUserDetail() { const initialValues = { userName: '', userPassword: '', - tenantId: 0, + tenantId: null, email: '', queue: '', phone: '', diff --git a/dolphinscheduler-ui-next/src/views/security/user-manage/types.ts b/dolphinscheduler-ui-next/src/views/security/user-manage/types.ts index 8c98d222fa..a91e07101a 100644 --- a/dolphinscheduler-ui-next/src/views/security/user-manage/types.ts +++ b/dolphinscheduler-ui-next/src/views/security/user-manage/types.ts @@ -34,6 +34,7 @@ interface IRecord { userName: string userType: TUserType tenantCode: string + tenantId: null | number queueName: string email: string phone: string diff --git a/dolphinscheduler-ui-next/src/views/security/user-manage/use-table.ts b/dolphinscheduler-ui-next/src/views/security/user-manage/use-table.ts index 958eff66f4..410c68618e 100644 --- a/dolphinscheduler-ui-next/src/views/security/user-manage/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/security/user-manage/use-table.ts @@ -53,6 +53,7 @@ export function useTable() { record.updateTime = record.updateTime ? format(parseTime(record.updateTime), 'yyyy-MM-dd HH:mm:ss') : '' + record.tenantId = record.tenantId === 0 ? null : record.tenantId return record })