Commit 518a7f52 authored by 邓超's avatar 邓超

fix: 修改消息定时计划BYLOOP为小写

parent c52c507d
Pipeline #65537 passed with stages
...@@ -50,7 +50,7 @@ const VisibleIISAgentConfig = props => { ...@@ -50,7 +50,7 @@ const VisibleIISAgentConfig = props => {
const [loop_unit, setLoop_unit] = useState('Hour'); const [loop_unit, setLoop_unit] = useState('Hour');
const [exeType, setExeType] = useState(true); const [exeType, setExeType] = useState(true);
const [isType, setIsType] = useState('重复执行'); const [isType, setIsType] = useState('重复执行');
const [isTypeValue, setIsTypeValue] = useState('BYLOOP'); const [isTypeValue, setIsTypeValue] = useState('ByLoop');
const [time_out, setTime_out] = useState(30); const [time_out, setTime_out] = useState(30);
const [weekData, setWeekData] = useState([]); const [weekData, setWeekData] = useState([]);
const [exeTime, setExeTime] = useState(moment().format('YYYY-MM-DD 00:00:00')); const [exeTime, setExeTime] = useState(moment().format('YYYY-MM-DD 00:00:00'));
...@@ -120,12 +120,12 @@ const VisibleIISAgentConfig = props => { ...@@ -120,12 +120,12 @@ const VisibleIISAgentConfig = props => {
form.setFieldsValue({ form.setFieldsValue({
type: '重复执行', type: '重复执行',
url_type: false, url_type: false,
loop_mode: 'BYLOOP', loop_mode: 'ByLoop',
start_time: moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00'), start_time: moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00'),
}); });
setExeTime(moment().format('YYYY-MM-DD 00:00:00')); setExeTime(moment().format('YYYY-MM-DD 00:00:00'));
setIsType('重复执行'); setIsType('重复执行');
changeLoopMode('BYLOOP'); changeLoopMode('ByLoop');
setIsUse(true); setIsUse(true);
setInterval(1); setInterval(1);
setLoop_unit('Hour'); setLoop_unit('Hour');
...@@ -157,7 +157,7 @@ const VisibleIISAgentConfig = props => { ...@@ -157,7 +157,7 @@ const VisibleIISAgentConfig = props => {
CustomHeader: fv.request_header || '', CustomHeader: fv.request_header || '',
StartFrom: fv.start_time && fv.start_time.format(dateFormat), StartFrom: fv.start_time && fv.start_time.format(dateFormat),
EndAt: fv.end_time && fv.end_time.format(dateFormat), EndAt: fv.end_time && fv.end_time.format(dateFormat),
LoopMode: fv.loop_mode === 'ByOnce' ? 'BYLOOP' : fv.loop_mode, LoopMode: fv.loop_mode === 'ByOnce' ? 'ByLoop' : fv.loop_mode,
LoopUnit: loop_unit, LoopUnit: loop_unit,
MonthOfYear: null, MonthOfYear: null,
WeekOfMonth: null, WeekOfMonth: null,
...@@ -216,7 +216,7 @@ const VisibleIISAgentConfig = props => { ...@@ -216,7 +216,7 @@ const VisibleIISAgentConfig = props => {
setIsWeekLoopShow(false); setIsWeekLoopShow(false);
setIsDayLoopShow(false); setIsDayLoopShow(false);
break; break;
case 'BYLOOP': case 'ByLoop':
setIsEndTimeShow(true); setIsEndTimeShow(true);
setIsLoopShow(true); setIsLoopShow(true);
setIsWeekLoopShow(false); setIsWeekLoopShow(false);
...@@ -238,7 +238,7 @@ const VisibleIISAgentConfig = props => { ...@@ -238,7 +238,7 @@ const VisibleIISAgentConfig = props => {
}; };
const onLoopModeChange = e => { const onLoopModeChange = e => {
changeLoopMode(e.target.value); changeLoopMode(e.target.value);
if (e.target.value === 'BYLOOP') { if (e.target.value === 'ByLoop') {
form.setFieldsValue({ form.setFieldsValue({
hour_of_day: '', hour_of_day: '',
day_of_week: '', day_of_week: '',
...@@ -280,10 +280,10 @@ const VisibleIISAgentConfig = props => { ...@@ -280,10 +280,10 @@ const VisibleIISAgentConfig = props => {
} }
setExeType(false); setExeType(false);
} else { } else {
changeLoopMode('BYLOOP'); changeLoopMode('ByLoop');
setExeType(true); setExeType(true);
form.setFieldsValue({ form.setFieldsValue({
loop_mode: 'BYLOOP', loop_mode: 'ByLoop',
end_time: '', end_time: '',
}); });
if (!agentConfig) { if (!agentConfig) {
...@@ -376,7 +376,7 @@ const VisibleIISAgentConfig = props => { ...@@ -376,7 +376,7 @@ const VisibleIISAgentConfig = props => {
{exeType && ( {exeType && (
<Item label="执行方式" name="loop_mode"> <Item label="执行方式" name="loop_mode">
<Radio.Group onChange={onLoopModeChange}> <Radio.Group onChange={onLoopModeChange}>
<Radio value={'BYLOOP'}>循环</Radio> <Radio value={'ByLoop'}>循环</Radio>
<Radio value={'ByDay'}>每天</Radio> <Radio value={'ByDay'}>每天</Radio>
<Radio value={'ByWeek'}>每周</Radio> <Radio value={'ByWeek'}>每周</Radio>
</Radio.Group> </Radio.Group>
...@@ -480,7 +480,7 @@ const VisibleIISAgentConfig = props => { ...@@ -480,7 +480,7 @@ const VisibleIISAgentConfig = props => {
{weekData.length ? '执行' : ''} {weekData.length ? '执行' : ''}
</span> </span>
)} )}
{isType === '重复执行' && isTypeValue === 'BYLOOP' && ( {isType === '重复执行' && isTypeValue === 'ByLoop' && (
<span style={{ color: '#909EB6FF' }}> <span style={{ color: '#909EB6FF' }}>
{exeTime}开始,每{interval} {exeTime}开始,每{interval}
{unitType[loop_unit]}执行一次。 {unitType[loop_unit]}执行一次。
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment