feat(platform): add customer alert service desk
This commit is contained in:
@@ -1128,10 +1128,89 @@ export function Quality({
|
||||
onClick: copyAlertRecoveryReceipt
|
||||
}
|
||||
];
|
||||
const alertCustomerServiceItems = [
|
||||
{
|
||||
label: '影响车辆',
|
||||
value: `${issueVehicleCount.toLocaleString()} 辆`,
|
||||
detail: `${issueRecordCount.toLocaleString()} 条告警记录,先判断是否影响实时、轨迹和里程。`,
|
||||
color: issueVehicleCount > 0 ? 'orange' as const : 'green' as const,
|
||||
action: '复制影响',
|
||||
disabled: false,
|
||||
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: '复制通知',
|
||||
disabled: priorityRows.length === 0,
|
||||
onClick: () => copyPriorityDigest()
|
||||
},
|
||||
{
|
||||
label: '焦点车辆',
|
||||
value: focusIssue?.vehicleLabel || '暂无',
|
||||
detail: focusIssue ? `${qualityProtocolLabel(focusIssue.protocol)} / ${qualityIssueLabel(focusIssue.issueType)}。` : '没有焦点车辆时保持监控。',
|
||||
color: focusIssue ? 'blue' as const : 'green' as const,
|
||||
action: '车辆服务',
|
||||
disabled: !focusIssue || !focusLookup?.key,
|
||||
onClick: () => focusIssue && onOpenVehicle(focusLookup?.key ?? '', focusIssue.protocol)
|
||||
},
|
||||
{
|
||||
label: '证据闭环',
|
||||
value: priorityRows.length > 0 ? '可复核' : '待观察',
|
||||
detail: '通知必须带上车辆服务、实时、轨迹、原始记录和里程证据。',
|
||||
color: priorityRows.length > 0 ? 'blue' as const : 'green' as const,
|
||||
action: '复制交接',
|
||||
disabled: false,
|
||||
onClick: () => copyNotificationHandoff()
|
||||
},
|
||||
{
|
||||
label: '恢复验收',
|
||||
value: primaryPolicy?.acceptanceCriteria ? '有标准' : '待补充',
|
||||
detail: primaryPolicy?.acceptanceCriteria || '车辆服务状态恢复,实时、轨迹、历史和里程证据可查询。',
|
||||
color: primaryPolicy?.acceptanceCriteria ? 'green' as const : 'orange' as const,
|
||||
action: '复制回执',
|
||||
disabled: false,
|
||||
onClick: () => copyAlertRecoveryReceipt()
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="告警事件" description="围绕车辆服务沉淀断链、VIN 缺失、字段缺失和链路健康事件,并形成通知闭环" />
|
||||
<section className="vp-alert-customer-service-desk" aria-label="客户告警服务台">
|
||||
<div className="vp-alert-customer-service-summary">
|
||||
<Space wrap>
|
||||
<Tag color={customerDecision.color}>客户告警服务台</Tag>
|
||||
<Tag color={priorityP0Count > 0 ? 'red' : priorityP1Count > 0 ? 'orange' : 'green'}>
|
||||
P0 {priorityP0Count.toLocaleString()} / P1 {priorityP1Count.toLocaleString()}
|
||||
</Tag>
|
||||
<Tag color={storageWritable ? 'green' : 'red'}>{storageWritable ? '证据可查' : '存储异常'}</Tag>
|
||||
</Space>
|
||||
<strong>客户先看到哪些车受影响、是否要通知、证据是否齐全、恢复后如何验收。</strong>
|
||||
<span>
|
||||
告警页围绕车辆服务闭环:先看影响,再通知责任团队,最后用实时、轨迹、里程和历史证据证明恢复。
|
||||
</span>
|
||||
</div>
|
||||
<div className="vp-alert-customer-service-grid">
|
||||
{alertCustomerServiceItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-alert-customer-service-item"
|
||||
disabled={item.disabled}
|
||||
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 title="客户告警决策台">
|
||||
<div className="vp-alert-decision-board">
|
||||
<div className="vp-alert-decision-summary">
|
||||
|
||||
Reference in New Issue
Block a user