Browse Source

[Fix][UI Next][V1.0.0-Beta] Fix the bug that the tenant is 0 when editing a user. (#9739)

songjianet 3 years ago
parent
commit
9abcbbac2e

+ 1 - 1
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

+ 1 - 1
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: '',

+ 1 - 0
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

+ 1 - 0
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
     })