diff --git a/src/modules/self-operated/components/AnalyticsView.vue b/src/modules/self-operated/components/AnalyticsView.vue index cb0c7342..2fad1123 100644 --- a/src/modules/self-operated/components/AnalyticsView.vue +++ b/src/modules/self-operated/components/AnalyticsView.vue @@ -124,6 +124,12 @@ const columns = computed(() => [ const dataFence = new RequestFence() const dailyFence = new RequestFence() const runtimeFence = new RequestFence() +function showRecentCompleteDays() { + const end = previousDate(context.value?.anchorDate ?? beijingToday()) + const start = new Date(Date.parse(`${end}T00:00:00Z`) - 29 * 86400000).toISOString().slice(0, 10) + filters.value = { ...filters.value, rangePreset: 'CUSTOM', customRange: [start, end] } + void search() +} function asSummary(row: unknown) { return row as SalesSummary } function asMetric(row: unknown) { return row as Metric } function asInventory(row: unknown) { return row as InventoryMetric } @@ -286,6 +292,7 @@ onUnmounted(() => { poller.stop(); dataFence.cancel(); dailyFence.cancel(); docu