fix: 客户饼图省份用车辆表province、区域柱状图用realtime表;加出勤说明
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- 后端region-chart新增source参数:vehicle用车辆表,realtime用实时表
- 客户运营地区占比"按省份"改用source=vehicle
- 区域资产分布概览"按省份"继续用source=realtime
- 部门Tab加说明文字:*说明:当天里程>0即为出勤。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-29 09:35:14 +08:00
parent 6e8e01196c
commit 240478142f
3 changed files with 25 additions and 14 deletions

View File

@@ -83,8 +83,8 @@ export async function fetchInventoryStats(): Promise<RegionalInventoryStats[]> {
return fetchJson<RegionalInventoryStats[]>(`${BASE}/inventory-stats`);
}
export async function fetchRegionChart(groupBy: string, top = 8): Promise<{ name: string; value: number }[]> {
return fetchJson<{ name: string; value: number }[]>(`${BASE}/region-chart?groupBy=${groupBy}&top=${top}`);
export async function fetchRegionChart(groupBy: string, top = 8, source = 'realtime'): Promise<{ name: string; value: number }[]> {
return fetchJson<{ name: string; value: number }[]>(`${BASE}/region-chart?groupBy=${groupBy}&top=${top}&source=${source}`);
}
export async function fetchWeeklyDetail(type: string): Promise<WeeklyDetailItem[]> {