feat(CarouselBoard): 添加近两周时间范围选项并更新不合格品标签
在质量统计卡片中增加"近两周"时间范围选项,方便查看更长时间段的数据 将"报废总数"标签更新为更准确的"不合格品总数"
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<div class="flip-card-value">{{ statistics.totalGrind }}</div>
|
||||
</div>
|
||||
<div class="flip-card">
|
||||
<div class="flip-card-label">报废总数</div>
|
||||
<div class="flip-card-label">不合格品总数</div>
|
||||
<div class="flip-card-value scrap">{{ statistics.totalScrap }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,6 +55,13 @@
|
||||
>
|
||||
每周
|
||||
</div>
|
||||
<div
|
||||
class="switch-option"
|
||||
:class="{ active: timeRange === 'twoweekly' }"
|
||||
@click="setTimeRange('twoweekly')"
|
||||
>
|
||||
近两周
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -302,6 +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();
|
||||
}
|
||||
|
||||
// 重新查询数据
|
||||
|
||||
Reference in New Issue
Block a user