feat(platform): add customer vehicle monitor desk
This commit is contained in:
@@ -1660,6 +1660,48 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const customerVehicleMonitorItems = [
|
||||
{
|
||||
label: '车辆在哪里',
|
||||
value: `${commandLocatedCount.toLocaleString()} 辆有定位`,
|
||||
detail: '打开地图查看在线车辆、最后上报、速度和坐标可信度。',
|
||||
action: '打开地图',
|
||||
color: commandLocatedCount > 0 ? 'green' as const : 'orange' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: '回放这段时间',
|
||||
value: `${formatCount(summary?.activeToday)} 今日活跃`,
|
||||
detail: '用同一时间窗回放轨迹、速度、停驶和里程断点。',
|
||||
action: '轨迹回放',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
label: '里程统计',
|
||||
value: `${formatCount(serviceSummary?.totalVehicles)} 辆可统计`,
|
||||
detail: '按车辆口径核对区间里程、日里程和异常记录。',
|
||||
action: '查里程',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
},
|
||||
{
|
||||
label: '导出客户数据',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '按车辆、时间和字段裁剪导出历史位置与原始证据。',
|
||||
action: '导出数据',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorRaw
|
||||
},
|
||||
{
|
||||
label: '告警通知',
|
||||
value: `${formatCount(summary?.issueVehicles)} 告警车辆`,
|
||||
detail: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} / ${priorityIssueVehicleLabel(highPriorityIssue)}` : '暂无高优先级告警。',
|
||||
action: '通知闭环',
|
||||
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -1691,6 +1733,33 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-customer-vehicle-monitor" aria-label="客户车辆监控台">
|
||||
<div className="vp-customer-vehicle-monitor-copy">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户车辆监控台</Tag>
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图可用' : '坐标预览'}</Tag>
|
||||
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} 告警</Tag>
|
||||
</Space>
|
||||
<strong>先回答客户最常问的车辆问题:车在哪里、这段时间怎么跑、里程怎么算、数据怎么导出、异常谁处理。</strong>
|
||||
<span>32960、808、MQTT 只在证据层出现;首页默认按车辆、时间窗和业务动作组织。</span>
|
||||
</div>
|
||||
<div className="vp-customer-vehicle-monitor-grid">
|
||||
{customerVehicleMonitorItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-customer-vehicle-monitor-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户车辆监控台 ${item.label} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.label}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<Card bordered className="vp-fleet-monitor" bodyStyle={{ padding: 0 }}>
|
||||
<div className="vp-fleet-monitor-map">
|
||||
<div className="vp-fleet-monitor-copy">
|
||||
|
||||
Reference in New Issue
Block a user