feat(platform): prioritize customer vehicle service path
This commit is contained in:
@@ -2634,6 +2634,53 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const customerVehicleServicePathItems = [
|
||||
{
|
||||
label: '地图监控',
|
||||
question: '在线在哪里',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: `${commandLocatedCount.toLocaleString()} 辆有有效坐标,先让客户看到车辆位置和在线状态。`,
|
||||
action: '打开地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: '时间窗',
|
||||
question: '这段时间怎么跑',
|
||||
value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo),
|
||||
detail: '用同一时间窗串起轨迹、位置、里程、告警和导出证据。',
|
||||
action: '开始复盘',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
label: '里程统计',
|
||||
question: '里程是否可信',
|
||||
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
|
||||
detail: '面向客户核对区间里程、每日汇总和 BI 统计口径。',
|
||||
action: '核对统计',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
},
|
||||
{
|
||||
label: '告警通知',
|
||||
question: '异常是否通知',
|
||||
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 } : {})
|
||||
},
|
||||
{
|
||||
label: '数据导出',
|
||||
question: '数据能否交付',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '按车辆、时间窗和字段裁剪导出位置、原始记录和解析证据。',
|
||||
action: '导出证据',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorRaw
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -2644,6 +2691,46 @@ export function Dashboard({
|
||||
: '面向客户的车辆地图、实时监控、轨迹回放、统计查询、自定义时间窗复盘、历史查询、告警通知和数据导出'}
|
||||
/>
|
||||
<Spin spinning={loading}>
|
||||
{focusMode === 'overview' ? (
|
||||
<section className="vp-customer-service-path" aria-label="客户车辆服务路径">
|
||||
<div className="vp-customer-service-path-copy">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户车辆服务路径</Tag>
|
||||
<Tag color="green">{vehicleServiceOnlineText(serviceSummary, summary)}</Tag>
|
||||
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} 告警</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={3} style={{ margin: 0 }}>
|
||||
客户车辆服务路径
|
||||
</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
客户入口只回答车辆问题:在线在哪里、这段时间怎么跑、里程是否可信、异常是否通知、数据能否交付。
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary" className="vp-customer-service-path-evidence">
|
||||
32960 / 808 / MQTT 只是证据通道
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary">
|
||||
默认沉到车辆可信度、历史明细和运维解释里。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-customer-service-path-grid">
|
||||
{customerVehicleServicePathItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-customer-service-path-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户车辆服务路径 ${item.label} ${item.question} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.label}</Tag>
|
||||
<strong>{item.question}</strong>
|
||||
<span>{item.value}</span>
|
||||
<p>{item.detail}</p>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
) : null}
|
||||
{focusMode === 'time-window' ? (
|
||||
<section className="vp-time-monitor-dedicated" aria-label="时间窗监控">
|
||||
<div className="vp-time-monitor-dedicated-copy">
|
||||
|
||||
Reference in New Issue
Block a user