fix(测试计划): 修复选择计划结束时间小于开始时间时确定按钮不可点击的缺陷

--bug=1042481 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042481
This commit is contained in:
teukkk 2024-06-20 15:05:58 +08:00 committed by Craftsman
parent 7d31cc3e20
commit 932eb9ac72
1 changed files with 8 additions and 1 deletions

View File

@ -252,15 +252,22 @@
function handleTimeSelect(value: (Date | string | number | undefined)[]) {
if (value) {
//
// const start = dayjs(value[0]);
// const end = dayjs(value[1]);
// if (start.isSame(end, 'D') && end.hour() === 0 && end.minute() === 0 && end.second() === 0) {
// const newEnd = end.hour(23).minute(59).second(59);
// value[1] = newEnd.valueOf();
// }
const start = (value as number[])[0];
const end = (value as number[])[1];
if (start > end) {
tempRange.value = [end, start];
} else {
tempRange.value = value as number[];
}
}
}
const switchList: SwitchListModel[] = [
{