|
@@ -1,7 +1,7 @@
|
|
|
-import React, { useState } from "react";
|
|
|
-import { Form, Select, Input, message, Row, Col, InputNumber } from 'antd'
|
|
|
+import React, { useState } from 'react'
|
|
|
+import { Form, Select, Input, DatePicker, Row, Col, InputNumber } from 'antd'
|
|
|
|
|
|
-export default function StepFour({syncDataForm}) {
|
|
|
+export default function StepFour({ syncDataForm }) {
|
|
|
const [showPartitionTime, setShowPartitionTime] = useState(false)
|
|
|
return (
|
|
|
<>
|
|
@@ -24,23 +24,21 @@ export default function StepFour({syncDataForm}) {
|
|
|
}}
|
|
|
initialValues={{
|
|
|
over_time: 0,
|
|
|
- fail_times: 0
|
|
|
- }}
|
|
|
- >
|
|
|
+ fail_times: 0,
|
|
|
+ }}>
|
|
|
<Form.Item
|
|
|
label="路由策略"
|
|
|
name="route_method"
|
|
|
rules={[
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请选择路由策略'
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
+ message: '请选择路由策略',
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
<Select
|
|
|
options={[
|
|
|
- {label: '第一个', value: 'First'},
|
|
|
- {label: '最后一个', value: 'Last'}
|
|
|
+ { label: '第一个', value: 'First' },
|
|
|
+ { label: '最后一个', value: 'Last' },
|
|
|
]}
|
|
|
allowClear
|
|
|
/>
|
|
@@ -51,31 +49,22 @@ export default function StepFour({syncDataForm}) {
|
|
|
rules={[
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请选择阻塞处理方式'
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
+ message: '请选择阻塞处理方式',
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
<Select
|
|
|
options={[
|
|
|
- {label: '单机串行', value: 'danji'},
|
|
|
- {label: '丢弃后续调度', value: 'diuqi'},
|
|
|
- {label: '覆盖之前调度', value: 'fugai'}
|
|
|
+ { label: '单机串行', value: 'danji' },
|
|
|
+ { label: '丢弃后续调度', value: 'diuqi' },
|
|
|
+ { label: '覆盖之前调度', value: 'fugai' },
|
|
|
]}
|
|
|
allowClear
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
- <Form.Item
|
|
|
- label="超时时间"
|
|
|
- name="over_time"
|
|
|
- required
|
|
|
- >
|
|
|
+ <Form.Item label="超时时间" name="over_time" required>
|
|
|
<InputNumber />
|
|
|
</Form.Item>
|
|
|
- <Form.Item
|
|
|
- label="失败重试次数"
|
|
|
- name="fail_times"
|
|
|
- required
|
|
|
- >
|
|
|
+ <Form.Item label="失败重试次数" name="fail_times" required>
|
|
|
<InputNumber />
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -84,16 +73,12 @@ export default function StepFour({syncDataForm}) {
|
|
|
rules={[
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请输入增量开始时间'
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Input />
|
|
|
+ message: '请选择增量开始时间',
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <DatePicker showTime placeholder="" />
|
|
|
</Form.Item>
|
|
|
- <Form.Item
|
|
|
- label="增量时间字段"
|
|
|
- name="add_time_field"
|
|
|
- >
|
|
|
+ <Form.Item label="增量时间字段" name="add_time_field">
|
|
|
<Input />
|
|
|
</Form.Item>
|
|
|
<Row span={24}>
|
|
@@ -106,18 +91,19 @@ export default function StepFour({syncDataForm}) {
|
|
|
}}
|
|
|
wrapperCol={{
|
|
|
span: 18,
|
|
|
- }}
|
|
|
- >
|
|
|
- <Input onChange={(e) => {
|
|
|
- if (e.target.value && !showPartitionTime) {
|
|
|
- setShowPartitionTime(true)
|
|
|
- } else if (!e.target.value && showPartitionTime) {
|
|
|
- setShowPartitionTime(false)
|
|
|
- }
|
|
|
- }} />
|
|
|
+ }}>
|
|
|
+ <Input
|
|
|
+ onChange={e => {
|
|
|
+ if (e.target.value && !showPartitionTime) {
|
|
|
+ setShowPartitionTime(true)
|
|
|
+ } else if (!e.target.value && showPartitionTime) {
|
|
|
+ setShowPartitionTime(false)
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
</Col>
|
|
|
- { showPartitionTime ?
|
|
|
+ {showPartitionTime ? (
|
|
|
<>
|
|
|
<Col span={8}>
|
|
|
<Form.Item
|
|
@@ -128,17 +114,17 @@ export default function StepFour({syncDataForm}) {
|
|
|
}}
|
|
|
wrapperCol={{
|
|
|
span: 12,
|
|
|
- }}
|
|
|
- >
|
|
|
+ }}>
|
|
|
<Input placeholder="yyyy-MM-dd" />
|
|
|
</Form.Item>
|
|
|
</Col>
|
|
|
<Col>
|
|
|
- <InputNumber defaultValue={0} style={{marginLeft: '10px'}}/>
|
|
|
+ <InputNumber defaultValue={0} style={{ marginLeft: '10px' }} />
|
|
|
</Col>
|
|
|
- </> : ''
|
|
|
- }
|
|
|
-
|
|
|
+ </>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
</Row>
|
|
|
<Form.Item
|
|
|
label="定时规则"
|
|
@@ -146,10 +132,9 @@ export default function StepFour({syncDataForm}) {
|
|
|
rules={[
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请输入定时规则'
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
+ message: '请输入定时规则',
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
<Input />
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -158,14 +143,12 @@ export default function StepFour({syncDataForm}) {
|
|
|
rules={[
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请输入定时规则'
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
+ message: '请输入定时规则',
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
<Input />
|
|
|
</Form.Item>
|
|
|
-
|
|
|
</Form>
|
|
|
</>
|
|
|
)
|
|
|
-}
|
|
|
+}
|