feat(platform): align navigation with vehicle monitoring workflows

This commit is contained in:
lingniu
2026-07-05 11:59:51 +08:00
parent 358bb642f4
commit cc3e90e0e9
3 changed files with 32 additions and 19 deletions

View File

@@ -20,29 +20,36 @@ export type PageKey = 'dashboard' | 'vehicles' | 'map' | 'realtime' | 'detail' |
const navGroups = [
{
title: '车辆服务',
title: '车辆监控',
audience: '客户',
description: '以车辆为对象监控在线、位置和服务状态',
description: '实时看车在哪里、是否在线、是否异常',
items: [
{ itemKey: 'dashboard', text: '车辆工作台', icon: <IconHome /> },
{ itemKey: 'vehicles', text: '车辆中心', icon: <IconServer /> },
{ itemKey: 'dashboard', text: '运营总览', icon: <IconHome /> },
{ itemKey: 'map', text: '实时地图', icon: <IconMapPin /> },
{ itemKey: 'realtime', text: '实时监控', icon: <IconActivity /> },
{ itemKey: 'realtime', text: '实时监控', icon: <IconActivity /> }
]
},
{
title: '车辆资产',
audience: '客户',
description: '按 VIN、车牌、手机号管理车辆资产',
items: [
{ itemKey: 'vehicles', text: '车辆中心', icon: <IconServer /> },
{ itemKey: 'detail', text: '车辆档案', icon: <IconSetting /> }
]
},
{
title: '数据交付',
title: '轨迹与统计',
audience: '客户',
description: '轨迹、里程、历史数据和客户导出',
description: '按时间窗回放轨迹、核对里程、导出数据',
items: [
{ itemKey: 'history', text: '轨迹回放', icon: <IconMapPin /> },
{ itemKey: 'mileage', text: '里程统计', icon: <IconBarChartHStroked /> },
{ itemKey: 'history-query', text: '数据导出', icon: <IconHistogram /> }
{ itemKey: 'history-query', text: '历史查询/导出', icon: <IconHistogram /> }
]
},
{
title: '告警闭环',
title: '告警通知',
audience: '客户',
description: '断链、离线、定位异常和通知升级',
items: [
@@ -51,7 +58,7 @@ const navGroups = [
]
},
{
title: '平台运维',
title: '内部运维',
audience: '内部',
description: '客户主流程外查看接入链路和运行质量',
items: [

View File

@@ -421,7 +421,7 @@ export function Dashboard({
title: '数据导出',
value: `${formatCount(summary?.frameToday)} 今日数据`,
detail: '按车辆、时间和字段裁剪查询历史位置与原始记录。',
action: '查询导出',
action: '历史查询/导出',
onClick: () => onOpenHistory({ tab: 'raw', includeFields: 'true' })
}
];
@@ -1340,7 +1340,7 @@ export function Dashboard({
<Button theme="solid" type="primary" onClick={() => onOpenMap({ online: 'online' })}></Button>
<Button theme="light" type="primary" onClick={() => onOpenHistory()}></Button>
<Button theme="light" type="primary" onClick={() => onOpenMileage({})}></Button>
<Button theme="light" type="primary" onClick={openTimeMonitorRaw}></Button>
<Button theme="light" type="primary" onClick={openTimeMonitorRaw}>/</Button>
<Button theme="light" onClick={copyCustomerServiceGuide}></Button>
</Space>
</div>

View File

@@ -22,16 +22,18 @@ test('renders vehicle platform shell', () => {
render(<App />);
expect(screen.getByText('车辆服务中台')).toBeInTheDocument();
expect(screen.getByText('地图监控 / 轨迹回放 / 告警通知')).toBeInTheDocument();
expect(screen.getAllByText('车辆服务').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('以车辆为对象监控在线、位置和服务状态')).toBeInTheDocument();
expect(screen.getAllByText('数据交付').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('轨迹、里程、历史数据和客户导出')).toBeInTheDocument();
expect(screen.getByText('告警闭环')).toBeInTheDocument();
expect(screen.getByText('平台运维')).toBeInTheDocument();
expect(screen.getByText('车辆监控')).toBeInTheDocument();
expect(screen.getByText('实时看车在哪里、是否在线、是否异常')).toBeInTheDocument();
expect(screen.getByText('车辆资产')).toBeInTheDocument();
expect(screen.getByText('按 VIN、车牌、手机号管理车辆资产')).toBeInTheDocument();
expect(screen.getByText('轨迹与统计')).toBeInTheDocument();
expect(screen.getByText('按时间窗回放轨迹、核对里程、导出数据')).toBeInTheDocument();
expect(screen.getAllByText('告警通知').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('内部运维')).toBeInTheDocument();
expect(screen.getAllByText('客户').length).toBeGreaterThanOrEqual(3);
expect(screen.getByText('内部')).toBeInTheDocument();
expect(screen.getByText('客户主流程外查看接入链路和运行质量')).toBeInTheDocument();
expect(screen.getAllByText('车辆工作台').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('运营总览').length).toBeGreaterThanOrEqual(1);
});
test('exposes AMap operations shortcuts when map key is configured', async () => {
@@ -6278,6 +6280,10 @@ test('shows vehicle context when opening detail from sidebar navigation', async
render(<App />);
fireEvent.change(screen.getByPlaceholderText('搜索 VIN / 车牌 / 手机号'), { target: { value: 'LB9A32A24R0LS1426' } });
fireEvent.click(screen.getByRole('button', { name: '查询车辆' }));
expect(await screen.findByText('粤AGQ8398 / LB9A32A24R0LS1426')).toBeInTheDocument();
fireEvent.click(screen.getAllByText('车辆档案')[0]);
expect(await screen.findByText('粤AGQ8398 / LB9A32A24R0LS1426')).toBeInTheDocument();