feat(platform): refine customer service navigation

This commit is contained in:
lingniu
2026-07-05 12:43:46 +08:00
parent 9c6973b4ee
commit 9f5a091b87
3 changed files with 45 additions and 38 deletions

View File

@@ -20,9 +20,9 @@ export type PageKey = 'dashboard' | 'vehicles' | 'map' | 'realtime' | 'detail' |
const navGroups = [
{
title: '车辆监控',
title: '实时运营',
audience: '客户',
description: '实时看车在哪里、是否在线、是否异常',
description: '地图看车、在线监控、异常优先',
items: [
{ itemKey: 'dashboard', text: '运营总览', icon: <IconHome /> },
{ itemKey: 'map', text: '实时地图', icon: <IconMapPin /> },
@@ -30,22 +30,22 @@ const navGroups = [
]
},
{
title: '车辆资产',
title: '车辆服务',
audience: '客户',
description: '按 VIN、车牌、手机号管理车辆资产',
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 /> }
]
},
{
@@ -58,9 +58,9 @@ const navGroups = [
]
},
{
title: '内部运维',
title: '接入运维',
audience: '内部',
description: '客户主流程外查看接入链路和运行质量',
description: '客户主流程外查看链路质量',
items: [
{ itemKey: 'ops-quality', text: '运维质量', icon: <IconPulse /> }
]
@@ -98,6 +98,13 @@ function alertButtonClassName(linkIssueCount: number | null, activeRuleCount?: n
return linkHealthClassName(linkIssueCount);
}
function customerStatusTitle(title?: string) {
if (!title) {
return '';
}
return title === '来源不完整' ? '数据通道不完整' : title;
}
export function AppShell({
activePage,
linkIssueCount,
@@ -145,7 +152,7 @@ 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 }
];
@@ -157,7 +164,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,12 +204,12 @@ export function AppShell({
{currentVehicleLabel ? <Tag color="grey">{currentVehicleLabel}</Tag> : null}
{currentVehicleStatus ? (
<Tag color={currentVehicleStatus.severity === 'ok' ? 'green' : currentVehicleStatus.severity === 'error' ? 'red' : 'orange'}>
{currentVehicleStatus.title}
{customerStatusTitle(currentVehicleStatus.title)}
</Tag>
) : null}
{currentVehicleConsistency ? (
<Tag color={currentVehicleConsistency.severity === 'ok' ? 'green' : currentVehicleConsistency.severity === 'error' ? 'red' : 'orange'}>
{currentVehicleConsistency.title || `${currentVehicleConsistency.onlineSourceCount}/${currentVehicleConsistency.sourceCount} 来源`}
{customerStatusTitle(currentVehicleConsistency.title) || `${currentVehicleConsistency.onlineSourceCount}/${currentVehicleConsistency.sourceCount} 数据通道`}
</Tag>
) : null}
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '高德地图就绪' : '高德地图待配置'}</Tag>