feat(platform): refine customer vehicle workbench navigation
This commit is contained in:
@@ -24,7 +24,7 @@ const navGroups = [
|
||||
audience: '客户',
|
||||
description: '以车辆为对象监控在线、位置和服务状态',
|
||||
items: [
|
||||
{ itemKey: 'dashboard', text: '运营驾驶舱', icon: <IconHome /> },
|
||||
{ itemKey: 'dashboard', text: '车辆工作台', icon: <IconHome /> },
|
||||
{ itemKey: 'vehicles', text: '车辆中心', icon: <IconServer /> },
|
||||
{ itemKey: 'map', text: '实时地图', icon: <IconMapPin /> },
|
||||
{ itemKey: 'realtime', text: '实时监控', icon: <IconActivity /> },
|
||||
@@ -138,7 +138,8 @@ export function AppShell({
|
||||
{ label: '监控', ariaLabel: '顶部实时监控', page: 'realtime' as const },
|
||||
{ label: '轨迹', ariaLabel: '顶部轨迹回放', page: 'history' as const },
|
||||
{ label: '里程', ariaLabel: '顶部里程统计', page: 'mileage' as const },
|
||||
{ label: '导出', ariaLabel: '顶部数据导出', page: 'history-query' as const }
|
||||
{ label: '导出', ariaLabel: '顶部数据导出', page: 'history-query' as const },
|
||||
{ label: '告警', ariaLabel: '顶部告警事件', page: 'alert-events' as const }
|
||||
];
|
||||
|
||||
return (
|
||||
@@ -149,7 +150,7 @@ export function AppShell({
|
||||
<span className="vp-brand-mark" />
|
||||
<span className="vp-brand-copy">
|
||||
<span>车辆服务中台</span>
|
||||
<span>车辆地图 / 里程统计 / 数据交付</span>
|
||||
<span>地图监控 / 轨迹回放 / 告警通知</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="vp-nav-groups">
|
||||
@@ -197,7 +198,7 @@ export function AppShell({
|
||||
一致性:{currentVehicleConsistency.title || `${currentVehicleConsistency.onlineSourceCount}/${currentVehicleConsistency.sourceCount} 来源`}
|
||||
</Tag>
|
||||
) : null}
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图就绪' : '地图待配置'}</Tag>
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '高德地图就绪' : '高德地图待配置'}</Tag>
|
||||
<div className="vp-topbar-quick-actions" aria-label="车辆服务快捷入口">
|
||||
{quickActions.map((item) => (
|
||||
<Button key={item.page} size="small" aria-label={item.ariaLabel} onClick={() => onChange(item.page)}>
|
||||
|
||||
@@ -21,7 +21,7 @@ test('renders vehicle platform shell', () => {
|
||||
|
||||
render(<App />);
|
||||
expect(screen.getByText('车辆服务中台')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆地图 / 里程统计 / 数据交付')).toBeInTheDocument();
|
||||
expect(screen.getByText('地图监控 / 轨迹回放 / 告警通知')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('车辆服务').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('以车辆为对象监控在线、位置和服务状态')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('数据交付').length).toBeGreaterThanOrEqual(1);
|
||||
@@ -31,7 +31,7 @@ test('renders vehicle platform shell', () => {
|
||||
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 () => {
|
||||
@@ -192,7 +192,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
|
||||
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('地图就绪')).toBeInTheDocument();
|
||||
expect(await screen.findByText('高德地图就绪')).toBeInTheDocument();
|
||||
expect(await screen.findByText((content) => content.includes('platform-20260704153357'))).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部地图态势' }));
|
||||
expect(window.location.hash).toBe('#/map');
|
||||
|
||||
Reference in New Issue
Block a user