Просмотр исходного кода

fix(test/check): add default time handling and debug logs

添加特定时间段的默认时间替换逻辑,以及新增两个时间打印的调试日志
SanHQin 1 день назад
Родитель
Сommit
3f7d15edf9
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      src/components/pages/test/check/index.vue

+ 7 - 0
src/components/pages/test/check/index.vue

@@ -3066,6 +3066,11 @@ ${JSON.stringify(forAllList)}
               _data.forEach((item, index) => {
                 if (item.type == 8) {
                   let time = this.timeLimit.split(",");
+                  if(time[0]==='2025-09-30T16:00:00.000Z' && time[1]==='2026-09-30T16:00:00.000Z'){
+                    time[0]='Wed Jan 01 2025 00:00:00 GMT+0800 (中国标准时间)'
+                    time[1]='Wed Dec 31 2025 00:00:00 GMT+0800 (中国标准时间)'
+                    console.log("设置默认时间")
+                  }
                   this.tableDatePicker[index] = [new Date(time[0]), new Date(time[1])]
                 }
               })
@@ -4122,6 +4127,8 @@ ${JSON.stringify(forAllList)}
       // 提前创建起止日期对象,避免在 filter 回调中重复构造
       const startDate = new Date(picker[0]);
       const endDate = new Date(picker[1]);
+      console.log("startDate",startDate)
+      console.log("endDate",endDate)
 
       // 将中文时间格式(如 "2024年1月1日")转为标准格式再解析
       const parseSubmissionTime = (timeStr) =>