feat(platform): add customer service sla board

This commit is contained in:
lingniu
2026-07-05 23:21:18 +08:00
parent 122ba079fb
commit 4294ba424f
3 changed files with 139 additions and 0 deletions

View File

@@ -2019,6 +2019,40 @@ export function Dashboard({
onClick: openTimeMonitorRaw
}
];
const customerSlaItems = [
{
label: '断链发现',
value: '1 分钟内',
detail: 'Redis 在线状态按 1 分钟 TTL 形成准实时断链判断,优先确认车辆是否仍在上报。',
action: '在线状态',
color: 'green' as const,
onClick: () => onOpenRealtime({ online: 'offline' })
},
{
label: '异常通知',
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 } : {})
},
{
label: '恢复验收',
value: '轨迹/统计可查',
detail: '恢复不是只看链路 active还要确认实时、轨迹、里程统计和历史证据都能打开。',
action: '验收证据',
color: 'blue' as const,
onClick: openTimeMonitorHistory
},
{
label: '数据交付',
value: `${formatCount(summary?.frameToday)} 今日数据`,
detail: '按客户车辆和时间窗导出历史位置、原始记录、解析字段和统计证据。',
action: '导出证据',
color: 'blue' as const,
onClick: openTimeMonitorRaw
}
];
const dispatchOperationsHighlights = [
{
label: '实时地图',
@@ -2512,6 +2546,35 @@ export function Dashboard({
))}
</div>
</section>
<section className="vp-customer-service-sla" aria-label="客户服务 SLA 承诺">
<div className="vp-customer-service-sla-copy">
<Space wrap>
<Tag color="blue"> SLA </Tag>
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} </Tag>
<Tag color={unhealthyLinkCount > 0 ? 'orange' : 'green'}>{unhealthyLinkCount.toLocaleString()} </Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}></Typography.Title>
<Typography.Text type="secondary">
</Typography.Text>
</div>
<div className="vp-customer-service-sla-grid">
{customerSlaItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-customer-service-sla-item"
onClick={item.onClick}
aria-label={`客户服务 SLA 承诺 ${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>
<section className="vp-customer-cockpit" aria-label="现代车队运营台">
<div className="vp-customer-cockpit-summary">
<Space wrap>