fix: 修正周统计时间范围从周日开始的问题

将周统计的时间范围从默认的周日开始改为从周一开始,以符合业务需求
This commit is contained in:
2025-11-02 14:25:59 +08:00
parent 7a3429dbe0
commit 1b8583776f

View File

@@ -289,9 +289,9 @@ export default {
this.search.startTime = today.startOf("day").toDate(); this.search.startTime = today.startOf("day").toDate();
this.search.endTime = today.endOf("day").toDate(); this.search.endTime = today.endOf("day").toDate();
} else if (type === "weekly") { } else if (type === "weekly") {
// 本周(周一到周日) // 本周(周一到周日)- 设置周起始日为周一
this.search.startTime = today.startOf("week").toDate(); this.search.startTime = today.startOf("week", { weekStart: 1 }).toDate();
this.search.endTime = today.endOf("week").toDate(); this.search.endTime = today.endOf("week", { weekStart: 1 }).toDate();
} }
// 重新查询数据 // 重新查询数据