From dd6c63b72b6973db41e0adc22d6752696e51e628 Mon Sep 17 00:00:00 2001 From: lingniu Date: Sun, 5 Jul 2026 15:12:51 +0800 Subject: [PATCH] feat(platform): refine navigation around vehicle statistics --- vehicle-data-platform/apps/web/src/layout/AppShell.tsx | 6 +++--- vehicle-data-platform/apps/web/src/test/App.test.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vehicle-data-platform/apps/web/src/layout/AppShell.tsx b/vehicle-data-platform/apps/web/src/layout/AppShell.tsx index a3d627c9..b9ca492b 100644 --- a/vehicle-data-platform/apps/web/src/layout/AppShell.tsx +++ b/vehicle-data-platform/apps/web/src/layout/AppShell.tsx @@ -39,7 +39,7 @@ const navGroups = [ ] }, { - title: '轨迹里程', + title: '轨迹统计', audience: '客户', description: '回放轨迹、统计查询、导出数据', items: [ @@ -151,7 +151,7 @@ export function AppShell({ { label: '地图', ariaLabel: '顶部地图态势', page: 'map' as const }, { label: '监控', ariaLabel: '顶部实时监控', page: 'realtime' as const }, { label: '轨迹', ariaLabel: '顶部轨迹回放', page: 'history' as const }, - { label: '里程', ariaLabel: '顶部里程统计', page: 'mileage' as const }, + { label: '统计', ariaLabel: '顶部统计查询', page: 'mileage' as const }, { label: '导出', ariaLabel: '顶部数据导出', page: 'history-query' as const }, { label: '告警', ariaLabel: '顶部告警事件', page: 'alert-events' as const } ]; @@ -164,7 +164,7 @@ export function AppShell({ 车辆服务中台 - 实时地图 / 轨迹里程 / 告警通知 + 实时地图 / 轨迹统计 / 告警通知
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 d5eeb6c2..16eeb354 100644 --- a/vehicle-data-platform/apps/web/src/test/App.test.tsx +++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx @@ -21,12 +21,12 @@ test('renders vehicle platform shell', () => { render(); expect(screen.getByText('车辆服务中台')).toBeInTheDocument(); - expect(screen.getByText('实时地图 / 轨迹里程 / 告警通知')).toBeInTheDocument(); + expect(screen.getByText('实时地图 / 轨迹统计 / 告警通知')).toBeInTheDocument(); expect(screen.getByText('实时运营')).toBeInTheDocument(); expect(screen.getByText('地图看车、在线监控、异常优先')).toBeInTheDocument(); expect(screen.getAllByText('车辆服务').length).toBeGreaterThanOrEqual(1); expect(screen.getByText('按 VIN、车牌、手机号管理车辆')).toBeInTheDocument(); - expect(screen.getByText('轨迹里程')).toBeInTheDocument(); + expect(screen.getByText('轨迹统计')).toBeInTheDocument(); expect(screen.getByText('回放轨迹、统计查询、导出数据')).toBeInTheDocument(); expect(screen.getAllByText('告警通知').length).toBeGreaterThanOrEqual(1); expect(screen.getByText('接入运维')).toBeInTheDocument(); @@ -211,7 +211,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () => expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument(); expect(screen.getByText('默认查询最近一天,不预置任何车辆;输入 VIN、车牌或手机号后进入单车查询导出。')).toBeInTheDocument(); expect(screen.queryByDisplayValue('LB9A32A24R0LS1426')).not.toBeInTheDocument(); - fireEvent.click(screen.getByRole('button', { name: '顶部里程统计' })); + fireEvent.click(screen.getByRole('button', { name: '顶部统计查询' })); expect(window.location.hash.startsWith('#/mileage')).toBe(true); fireEvent.click(await screen.findByRole('button', { name: '顶部告警事件正常' })); expect(window.location.hash).toBe('#/alert-events');