From bfc3fcd7fd75a9495316849e9a0223fa942a470a Mon Sep 17 00:00:00 2001 From: git_rabbit Date: Sun, 2 Nov 2025 16:33:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86"=E8=BF=91=E4=B8=A4=E5=91=A8"?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E9=80=89=E9=A1=B9=E6=94=B9?= =?UTF-8?q?=E4=B8=BA"=E4=B8=8A=E5=91=A8=E6=95=B0=E6=8D=AE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改时间范围选项从"近两周"变为"上周数据",并调整对应的日期计算逻辑,使其准确获取上周一到上周日的数据 --- .../components/QualityStatisticsCard.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/kanbanManagement/CarouselBoard/components/QualityStatisticsCard.vue b/src/views/kanbanManagement/CarouselBoard/components/QualityStatisticsCard.vue index 472b6c0..24aecb6 100644 --- a/src/views/kanbanManagement/CarouselBoard/components/QualityStatisticsCard.vue +++ b/src/views/kanbanManagement/CarouselBoard/components/QualityStatisticsCard.vue @@ -46,21 +46,21 @@ :class="{ active: timeRange === 'daily' }" @click="setTimeRange('daily')" > - 每日 + 本日
- 每周 + 本周
- 近两周 + 上周
@@ -309,10 +309,10 @@ export default { // 本周(周一到周日)- 设置周起始日为周一 this.search.startTime = today.startOf("week", { weekStart: 1 }).toDate(); this.search.endTime = today.endOf("week", { weekStart: 1 }).toDate(); - } else if (type === "twoweekly") { - // 近两周(当前日期向前推14天) - this.search.startTime = today.subtract(14, 'day').startOf('day').toDate(); - this.search.endTime = today.endOf('day').toDate(); + } else if (type === "lastWeek") { + // 上周(上周周一到上周周日)- 设置周起始日为周一 + this.search.startTime = today.subtract(1, "week").startOf("week", { weekStart: 1 }).toDate(); + this.search.endTime = today.subtract(1, "week").endOf("week", { weekStart: 1 }).toDate(); } // 重新查询数据