From 2824982b60c8a9f947848382a419f0449af1096c Mon Sep 17 00:00:00 2001 From: lingniu Date: Sun, 5 Jul 2026 15:02:14 +0800 Subject: [PATCH] feat(platform): streamline dashboard around vehicle workflows --- .../apps/web/src/pages/Dashboard.tsx | 84 +++++++++---------- .../apps/web/src/test/App.test.tsx | 8 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx b/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx index c2d1ac24..a23c4308 100644 --- a/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx +++ b/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx @@ -956,10 +956,10 @@ export function Dashboard({ onClick: openTimeMonitorHistory }, { - label: '里程核对', + label: '统计查询', value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`, detail: '用同一范围核对区间里程和日统计闭合。', - action: '核对里程', + action: '查看统计', color: 'green' as const, onClick: openTimeMonitorMileage }, @@ -1405,9 +1405,9 @@ export function Dashboard({ onClick: openTimeMonitorHistory }, { - title: '里程核对', + title: '统计查询', description: '按车辆口径核对区间里程、日统计和异常来源。', - action: '里程统计', + action: '统计查询', evidence: `${formatCount(serviceSummary?.totalVehicles)} 辆可统计`, onClick: openTimeMonitorMileage }, @@ -1507,7 +1507,7 @@ export function Dashboard({
- 下一步建议 + 今日先处理
@@ -1526,7 +1526,7 @@ export function Dashboard({ ))}
- 客户工作流 + 车辆服务工作流
{customerCockpitWorkflows.map((item) => ( - +
@@ -1561,39 +1561,6 @@ export function Dashboard({
- -
- {commandCenterItems.map((item) => ( -
-
- {item.title} - {item.value} -
- {item.detail} - - - - -
- ))} -
-
自定义时间监控{timeMonitorSummary}} @@ -1749,9 +1716,42 @@ export function Dashboard({
更多车辆服务入口 - 常用服务、今日任务、KPI 和车辆入口默认收起,主页面优先保留地图、指挥台和时间窗监控。 + 常用服务、今日任务、KPI 和车辆入口默认收起,主页面优先保留地图、时间窗监控、告警和导出。
+ +
+ {commandCenterItems.map((item) => ( +
+
+ {item.title} + {item.value} +
+ {item.detail} + + + + +
+ ))} +
+
{customerHeroActions.map((item) => ( diff --git a/vehicle-data-platform/apps/web/src/test/App.test.tsx b/vehicle-data-platform/apps/web/src/test/App.test.tsx index 7d276ac5..adbd1355 100644 --- a/vehicle-data-platform/apps/web/src/test/App.test.tsx +++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx @@ -802,17 +802,17 @@ test('dashboard exposes vehicle data center capability matrix', async () => { expect(screen.getByText('客户主流程围绕车辆本身:地图看车、实时状态、时间窗复盘、里程统计、历史数据导出和告警通知。接入来源只作为追溯证据。')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '车辆监控指标 车辆总数 1,033' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '车辆监控指标 在线车辆 208' })).toBeInTheDocument(); - expect(screen.getByText('下一步建议')).toBeInTheDocument(); + expect(screen.getByText('今日先处理')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '车辆运营建议 先处理告警车辆 进入告警' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '车辆运营建议 选择一辆车复盘 车辆中心' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '车辆运营建议 按同一范围交付数据 复制复盘包' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户车辆工作流 实时看车 实时地图' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户车辆工作流 轨迹复盘 轨迹回放' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户车辆工作流 里程核对 里程统计' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户车辆工作流 统计查询 统计查询' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户车辆工作流 数据交付 历史导出' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户车辆工作流 告警通知 告警事件' })).toBeInTheDocument(); expect(screen.getByText('来源只作为可信度证据,不作为客户主导航。')).toBeInTheDocument(); - expect(screen.getByText('同一时间窗会同步用于轨迹回放、区间里程、历史查询和告警复盘。')).toBeInTheDocument(); + expect(screen.getByText('同一时间窗会同步用于轨迹回放、统计查询、历史查询和告警复盘。')).toBeInTheDocument(); expect(screen.getByText('车辆服务指挥台')).toBeInTheDocument(); expect(screen.getByText('全域车辆监控')).toBeInTheDocument(); expect(screen.getByText('异常车辆闭环')).toBeInTheDocument(); @@ -871,7 +871,7 @@ test('dashboard exposes vehicle data center capability matrix', async () => { expect(screen.getAllByText('统计里程').length).toBeGreaterThanOrEqual(1); expect(screen.getByText('历史查询导出')).toBeInTheDocument(); expect(screen.getAllByText('轨迹回放').length).toBeGreaterThanOrEqual(1); - expect(screen.getAllByText('里程核对').length).toBeGreaterThanOrEqual(1); + expect(screen.getAllByText('统计查询').length).toBeGreaterThanOrEqual(1); expect(screen.getAllByText('历史证据').length).toBeGreaterThanOrEqual(1); expect(screen.getAllByText('告警复盘').length).toBeGreaterThanOrEqual(1); expect(screen.getByRole('button', { name: '时间窗作业 轨迹回放 打开轨迹' })).toBeInTheDocument();