feat(platform): add customer primary navigation path
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user