From b8735628c42b0c6ab877ceb867b23d66643df6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=8F=E5=92=8C?= Date: Mon, 20 Nov 2023 11:46:24 +0800 Subject: [PATCH] PullRequest: 233 bug fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dev-4.2.2-bugs-xyh-1120 of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.2.2 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/233 Signed-off-by: 晓康 * feat: dataArchiveTask and dataClearTask (add date type) * fix(101305742) --- .../CreateModal/VariableConfig.tsx | 2 +- .../CreateModal/VariableConfig.tsx | 2 +- .../Auth/Role/component/FormModal/index.tsx | 17 +++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx b/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx index ece223f3f..03bf96b48 100644 --- a/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx +++ b/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx @@ -55,7 +55,7 @@ export const timeUnitOptions = [ ]; const ENABLE_PATTERN_OPERATOR = false; -const timeFormatOptions = ['yyyy-MM-dd', 'yyyyMMdd'].map((item) => ({ +const timeFormatOptions = ['yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd', 'yyyyMMdd'].map((item) => ({ label: item, value: item, })); diff --git a/src/component/Task/DataClearTask/CreateModal/VariableConfig.tsx b/src/component/Task/DataClearTask/CreateModal/VariableConfig.tsx index 2a87365bf..bd29d1cb4 100644 --- a/src/component/Task/DataClearTask/CreateModal/VariableConfig.tsx +++ b/src/component/Task/DataClearTask/CreateModal/VariableConfig.tsx @@ -25,7 +25,7 @@ import styles from './index.less'; import { timeUnitOptions } from '../../DataArchiveTask/CreateModal/VariableConfig'; const ENABLE_PATTERN_OPERATOR = false; -const timeFormatOptions = ['yyyy-MM-dd', 'yyyyMMdd'].map((item) => ({ +const timeFormatOptions = ['yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd', 'yyyyMMdd'].map((item) => ({ label: item, value: item, })); diff --git a/src/page/Auth/Role/component/FormModal/index.tsx b/src/page/Auth/Role/component/FormModal/index.tsx index 3b9cf11e3..5286fc026 100644 --- a/src/page/Auth/Role/component/FormModal/index.tsx +++ b/src/page/Auth/Role/component/FormModal/index.tsx @@ -24,6 +24,7 @@ import { Button, Drawer, message, Modal, Radio, Space } from 'antd'; import type { FormInstance } from 'antd/lib/form'; import { isNull, set } from 'lodash'; import React, { useContext, useEffect, useRef, useState } from 'react'; +import odc from '@/plugins/odc'; import { ResourceContext } from '../../../context'; import { resourceManagementActionMap } from '../../../utils'; import { SystemAction, systemActionMap } from '../ResourceSelector/const'; @@ -330,13 +331,17 @@ const FormModal: React.FC = (props) => { systemActionMap, ); if (createAbleResource?.length) { - createAbleResource?.forEach((type) => { - formData.resourceManagementPermissions?.push({ - resourceType: type, - resourceId: null, - actions: ['create'], + createAbleResource + ?.filter((resourceType) => + odc.appConfig.manage.user.create ? true : resourceType !== IManagerResourceType.user, + ) + ?.forEach((type) => { + formData.resourceManagementPermissions?.push({ + resourceType: type, + resourceId: null, + actions: ['create'], + }); }); - }); } if (