feat(platform): add alert action conclusion
This commit is contained in:
@@ -1128,6 +1128,48 @@ export function Quality({
|
||||
onClick: copyAlertRecoveryReceipt
|
||||
}
|
||||
];
|
||||
const alertActionConclusionItems = [
|
||||
{
|
||||
label: '影响范围',
|
||||
value: `${issueVehicleCount.toLocaleString()} 辆`,
|
||||
detail: `${issueRecordCount.toLocaleString()} 条告警记录,先判断是否影响客户看车、轨迹和里程。`,
|
||||
color: issueVehicleCount > 0 ? 'orange' as const : 'green' as const,
|
||||
action: '复制影响',
|
||||
onClick: () => copyBusinessImpact()
|
||||
},
|
||||
{
|
||||
label: '通知策略',
|
||||
value: `P0 ${priorityP0Count.toLocaleString()} / P1 ${priorityP1Count.toLocaleString()}`,
|
||||
detail: priorityRows.length > 0 ? '已进入责任团队通知队列。' : '当前没有待通知车辆。',
|
||||
color: priorityP0Count > 0 ? 'red' as const : priorityP1Count > 0 ? 'orange' as const : 'green' as const,
|
||||
action: '复制通知',
|
||||
onClick: () => copyPriorityDigest()
|
||||
},
|
||||
{
|
||||
label: 'SLA策略',
|
||||
value: customerDecision.label,
|
||||
detail: primaryPolicy ? `${primaryPolicy.name} / ${formatEscalationMinutes(primaryPolicy.escalationMinutes) || '未配置升级'}` : '需要补充通知策略和升级时限。',
|
||||
color: customerDecision.color,
|
||||
action: '通知闭环',
|
||||
onClick: () => onOpenNotificationRules?.()
|
||||
},
|
||||
{
|
||||
label: '证据闭环',
|
||||
value: storageWritable ? '可复核' : '先修复存储',
|
||||
detail: '通知必须带上实时、轨迹、里程和历史证据入口。',
|
||||
color: storageWritable ? 'green' as const : 'red' as const,
|
||||
action: '复制交接',
|
||||
onClick: () => copyNotificationHandoff()
|
||||
},
|
||||
{
|
||||
label: '恢复回执',
|
||||
value: primaryPolicy?.acceptanceCriteria ? '有标准' : '待补充',
|
||||
detail: primaryPolicy?.acceptanceCriteria || '恢复后确认车辆服务状态、轨迹、历史和里程证据可查询。',
|
||||
color: primaryPolicy?.acceptanceCriteria ? 'green' as const : 'orange' as const,
|
||||
action: '复制回执',
|
||||
onClick: () => copyAlertRecoveryReceipt()
|
||||
}
|
||||
];
|
||||
const alertCustomerServiceItems = [
|
||||
{
|
||||
label: '影响车辆',
|
||||
@@ -1226,6 +1268,33 @@ export function Quality({
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="告警事件" description="围绕车辆服务沉淀断链、VIN 缺失、字段缺失和链路健康事件,并形成通知闭环" />
|
||||
<section className="vp-alert-action-conclusion" aria-label="告警处置结论栏">
|
||||
<div className="vp-alert-action-conclusion-summary">
|
||||
<Space wrap>
|
||||
<Tag color={customerDecision.color}>告警处置结论栏</Tag>
|
||||
<Tag color={priorityP0Count > 0 ? 'red' : priorityP1Count > 0 ? 'orange' : 'green'}>
|
||||
P0 {priorityP0Count.toLocaleString()} / P1 {priorityP1Count.toLocaleString()}
|
||||
</Tag>
|
||||
</Space>
|
||||
<strong>先判断客户受影响车辆,再确认通知、SLA、证据和恢复回执,避免告警停留在技术表格里。</strong>
|
||||
</div>
|
||||
<div className="vp-alert-action-conclusion-grid">
|
||||
{alertActionConclusionItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-alert-action-conclusion-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>
|
||||
<section className="vp-alert-customer-service-desk" aria-label="客户告警服务台">
|
||||
<div className="vp-alert-customer-service-summary">
|
||||
<Space wrap>
|
||||
|
||||
Reference in New Issue
Block a user