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

维保周计划修改

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