feat(platform): add customer primary navigation path

This commit is contained in:
lingniu
2026-07-05 17:57:37 +08:00
parent 680006e36f
commit 3be803316a
3 changed files with 91 additions and 0 deletions

View File

@@ -67,6 +67,14 @@ const navGroups = [
}
];
const customerPrimaryPath = [
{ label: '车辆地图', page: 'map' as const },
{ label: '轨迹回放', page: 'history' as const },
{ label: '统计查询', page: 'mileage' as const },
{ label: '数据导出', page: 'history-query' as const },
{ label: '告警通知', page: 'alert-events' as const }
];
function linkHealthClassName(count: number | null) {
if (count == null) {
return '';
@@ -167,6 +175,25 @@ export function AppShell({
<span> / / </span>
</span>
</div>
<div className="vp-customer-primary-path" aria-label="客户主线">
<div className="vp-customer-primary-path-head">
<strong>线</strong>
<span></span>
</div>
<div className="vp-customer-primary-path-actions">
{customerPrimaryPath.map((item) => (
<button
key={item.page}
type="button"
className={selectedPage === item.page ? 'vp-customer-primary-path-action vp-customer-primary-path-action-active' : 'vp-customer-primary-path-action'}
onClick={() => onChange(item.page)}
aria-label={`客户主线 ${item.label}`}
>
{item.label}
</button>
))}
</div>
</div>
<div className="vp-nav-groups">
{navGroups.map((group) => (
<div key={group.title} className="vp-nav-group">