Commit f944b2a5 authored by 彭俊龙's avatar 彭俊龙

维保周计划修改

parent a6823216
Pipeline #92916 failed with stages
......@@ -120,8 +120,8 @@ const BaseConfig = (props, ref) => {
let zix = weekArr[props.keepTimeData.StartLen - 1]; // 执行开始周
setValue('week');
setstartLen(props.keepTimeData.StartLen);
// setCities(cityData[zix][props.keepTimeData.StartExecLen - 1]);
// setSecondCity(cityData[zix][props.keepTimeData.EndExecLen - 1]);
setCities(props.keepTimeData.StartExecLen);
setSecondCity(props.keepTimeData.EndExecLen);
} else if (props.keepTimeData?.Unit === '日') {
setValue('day');
setCycleLen(props.keepTimeData.CycleLen);
......@@ -177,8 +177,8 @@ const BaseConfig = (props, ref) => {
// if (arr.indexOf(value) > arr.indexOf(secondCity)) {
// setSecondCity(arr[arr.length - 1]);
// }
let arr = Array.form({ length: CycleLen * 7}, (v, k)=> k + 1);
if(value < secondCity){
let arr = Array.from({ length: CycleLen * 7}, (v, k)=> k + 1);
if(value > secondCity){
setSecondCity(arr[arr.length - 1]);
}
setCities(value);
......@@ -199,8 +199,8 @@ const BaseConfig = (props, ref) => {
} else if (e.target.value === 'week') {
setCycleLen(1);
setstartLen(1);
setCities('周一');
setSecondCity('周日');
setCities(1);
setSecondCity(CycleLen * 7);
} else if (e.target.value === 'month') {
setCycleLen(1);
setstartLen(1);
......
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