feat(platform): add customer task navigation
This commit is contained in:
@@ -1508,6 +1508,40 @@ export function Dashboard({
|
||||
detail: '同一时间范围贯穿轨迹、统计、历史和告警。'
|
||||
}
|
||||
];
|
||||
const customerTaskNavigation = [
|
||||
{
|
||||
title: '看车在哪',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: `${commandLocatedCount.toLocaleString()} 辆有有效定位`,
|
||||
action: '实时地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
title: '查这段时间',
|
||||
value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo),
|
||||
detail: '同窗查看轨迹和里程统计',
|
||||
action: '轨迹统计',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
title: '导出数据',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '位置、原始记录和字段证据',
|
||||
action: '历史导出',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorRaw
|
||||
},
|
||||
{
|
||||
title: '处理告警',
|
||||
value: `${formatCount(summary?.issueVehicles)} 告警车辆`,
|
||||
detail: highPriorityIssue ? qualityIssueLabel(highPriorityIssue.issueType) : '当前无高优先级',
|
||||
action: '告警事件',
|
||||
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -1543,6 +1577,28 @@ export function Dashboard({
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-fleet-monitor-panel">
|
||||
<div className="vp-fleet-task-router">
|
||||
<div className="vp-fleet-task-router-head">
|
||||
<Typography.Text strong>客户任务导航</Typography.Text>
|
||||
<Typography.Text type="secondary">先按客户问题进入业务页面</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-fleet-task-grid">
|
||||
{customerTaskNavigation.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-fleet-task-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户任务导航 ${item.title} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-fleet-monitor-panel-head">
|
||||
<Typography.Text strong>今日先处理</Typography.Text>
|
||||
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}>复制说明</Button>
|
||||
|
||||
Reference in New Issue
Block a user