diff --git a/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx b/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx index 687ef4ff1..ff5609fad 100644 --- a/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx +++ b/src/component/Task/DataArchiveTask/CreateModal/VariableConfig.tsx @@ -25,9 +25,13 @@ import styles from './index.less'; export const timeUnitOptions = [ { - label: formatMessage({ id: 'odc.DataArchiveTask.CreateModal.VariableConfig.Points' }), //分 + label: '秒', value: 's', }, + { + label: formatMessage({ id: 'odc.DataArchiveTask.CreateModal.VariableConfig.Points' }), //分 + value: 'm', + }, { label: formatMessage({ id: 'odc.DataArchiveTask.CreateModal.VariableConfig.Hours' }), //小时 value: 'h', @@ -42,7 +46,7 @@ export const timeUnitOptions = [ }, { label: formatMessage({ id: 'odc.DataArchiveTask.CreateModal.VariableConfig.Month' }), //月 - value: 'm', + value: 'M', }, { label: formatMessage({ id: 'odc.DataArchiveTask.CreateModal.VariableConfig.Year' }), //年 @@ -51,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, })); @@ -62,150 +66,146 @@ interface IProps { const VariableConfig: React.FC = (props) => { const variables = Form.useWatch('variables', props.form); - + return ( - - - 自定义变量 - - - { - formatMessage({ - id: 'odc.DataArchiveTask.CreateModal.VariableConfig.VariablesCanBeReferencedIn.1', - }) /*变量可在归档配置的过滤条件中引用 (可选)*/ - } + + + 自定义变量 + + + { + formatMessage({ + id: 'odc.DataArchiveTask.CreateModal.VariableConfig.VariablesCanBeReferencedIn.1', + }) /*变量可在归档配置的过滤条件中引用 (可选)*/ + } + + + + {!!variables?.length && ( + +
+ { + formatMessage({ + id: 'odc.DataArchiveTask.CreateModal.VariableConfig.VariableName', + }) /*变量名*/ + } +
+
+ { + formatMessage({ + id: 'odc.DataArchiveTask.CreateModal.VariableConfig.TimeFormat', + }) /*时间格式*/ + } +
+
+ + 时间偏移 - +
- { - !!variables?.length && - -
- { - formatMessage({ - id: 'odc.DataArchiveTask.CreateModal.VariableConfig.VariableName', - }) /*变量名*/ - } -
-
- { - formatMessage({ - id: 'odc.DataArchiveTask.CreateModal.VariableConfig.TimeFormat', - }) /*时间格式*/ - } -
-
- - 时间偏移 - -
-
- } - - {(fields, { add, remove }) => ( -
- {fields.map(({ key, name, ...restField }) => ( -
+ {(fields, { add, remove }) => ( +
+ {fields.map(({ key, name, ...restField }) => ( +
+ + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + {!login.isPrivateSpace() && } - {!haveOCP() && } + ); }}