feat(platform): add alert closure timeline
This commit is contained in:
@@ -1175,6 +1175,53 @@ export function Quality({
|
||||
onClick: () => copyAlertRecoveryReceipt()
|
||||
}
|
||||
];
|
||||
const alertClosureTimelineItems = [
|
||||
{
|
||||
step: '1',
|
||||
label: '告警触发',
|
||||
value: `${issueRecordCount.toLocaleString()} 条事件`,
|
||||
detail: primaryIssueImpact ? `主要问题:${qualityIssueLabel(primaryIssueImpact.name)}` : '等待告警规则命中。',
|
||||
action: '查看事件',
|
||||
color: issueRecordCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => loadIssues(filters, pagination.currentPage, pagination.pageSize)
|
||||
},
|
||||
{
|
||||
step: '2',
|
||||
label: '影响车辆',
|
||||
value: `${issueVehicleCount.toLocaleString()} 辆车`,
|
||||
detail: '先判断实时、轨迹、里程和历史导出是否受影响。',
|
||||
action: '影响摘要',
|
||||
color: issueVehicleCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: copyBusinessImpact
|
||||
},
|
||||
{
|
||||
step: '3',
|
||||
label: '责任通知',
|
||||
value: primaryPolicy?.target || '责任人待配置',
|
||||
detail: primaryPolicy ? `${primaryPolicy.name} / ${formatEscalationMinutes(primaryPolicy.escalationMinutes) || '未配置升级'}` : '需要补充通知策略和升级时限。',
|
||||
action: '通知策略',
|
||||
color: primaryPolicy ? 'blue' as const : 'orange' as const,
|
||||
onClick: () => onOpenNotificationRules?.()
|
||||
},
|
||||
{
|
||||
step: '4',
|
||||
label: '证据复核',
|
||||
value: '实时/轨迹/里程',
|
||||
detail: '每次通知都要带上可打开的车辆证据入口和筛选范围。',
|
||||
action: '证据交接',
|
||||
color: 'blue' as const,
|
||||
onClick: copyNotificationHandoff
|
||||
},
|
||||
{
|
||||
step: '5',
|
||||
label: '恢复验收',
|
||||
value: primaryPolicy?.acceptanceCriteria ? '有标准' : '待补充',
|
||||
detail: primaryPolicy?.acceptanceCriteria || '确认车辆服务恢复,实时、轨迹、历史和里程证据可查。',
|
||||
action: '复制回执',
|
||||
color: primaryPolicy?.acceptanceCriteria ? 'green' as const : 'orange' as const,
|
||||
onClick: copyAlertRecoveryReceipt
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -1211,6 +1258,42 @@ export function Quality({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<Card bordered title="客户告警闭环时间线">
|
||||
<div className="vp-alert-closure-timeline">
|
||||
<div className="vp-alert-closure-summary">
|
||||
<Space wrap>
|
||||
<Tag color={customerDecision.color}>{customerDecision.label}</Tag>
|
||||
<Tag color={priorityP0Count > 0 ? 'red' : priorityP1Count > 0 ? 'orange' : 'green'}>
|
||||
P0 {priorityP0Count.toLocaleString()} / P1 {priorityP1Count.toLocaleString()}
|
||||
</Tag>
|
||||
<Tag color={primaryPolicy ? 'blue' : 'orange'}>{primaryPolicy?.name || '策略待配置'}</Tag>
|
||||
</Space>
|
||||
<strong>从告警触发、车辆影响、责任通知、证据复核到恢复验收,形成客户可追踪的闭环。</strong>
|
||||
<span>
|
||||
这条时间线把技术告警翻译成客户处理步骤:每一步都有责任、证据和下一步动作,便于值班、交接和复盘。
|
||||
</span>
|
||||
</div>
|
||||
<div className="vp-alert-closure-steps">
|
||||
{alertClosureTimelineItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-alert-closure-step"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户告警闭环时间线 ${item.step} ${item.label} ${item.value} ${item.action}`}
|
||||
>
|
||||
<span>{item.step}</span>
|
||||
<div>
|
||||
<Tag color={item.color}>{item.label}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<small>{item.detail}</small>
|
||||
<em>{item.action}</em>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="客户告警决策台">
|
||||
<div className="vp-alert-decision-board">
|
||||
<div className="vp-alert-decision-summary">
|
||||
|
||||
Reference in New Issue
Block a user