feat(platform): add notification customer questions
This commit is contained in:
@@ -723,6 +723,44 @@ export function NotificationRules() {
|
||||
onClick: () => copyText(notificationRulesRunbook(plan, release), '通知规则Runbook')
|
||||
}
|
||||
];
|
||||
const notificationCustomerQuestions = [
|
||||
{
|
||||
question: '哪些车受影响?',
|
||||
value: priorityIssues.length > 0 ? `${priorityIssues.length.toLocaleString()} 辆/次` : '暂无影响',
|
||||
evidence: p0IssueCount > 0 ? `P0 ${p0IssueCount.toLocaleString()} 条` : `${evidenceCompleteCount}/${priorityIssues.length || 0} 证据完整`,
|
||||
detail: '先给客户受影响车辆、告警级别和可跳转证据,不让客户从规则配置里反推影响范围。',
|
||||
action: '影响摘要',
|
||||
color: p0IssueCount > 0 ? 'red' as const : priorityIssues.length > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => copyText(priorityIssueDigest(plan, release), '待通知告警')
|
||||
},
|
||||
{
|
||||
question: '应该通知谁?',
|
||||
value: primaryOwner,
|
||||
evidence: policies[0]?.channel || '待配置渠道',
|
||||
detail: '按责任团队和通知策略生成可复制文本,包含车辆、原因、证据链接和下一步动作。',
|
||||
action: '复制通知',
|
||||
color: ownerRows.length > 0 ? 'blue' as const : 'orange' as const,
|
||||
onClick: () => copyText(priorityIssueDigest(plan, release), '待通知告警')
|
||||
},
|
||||
{
|
||||
question: '多久没有恢复会升级?',
|
||||
value: nextSlaRow?.policy?.escalationMinutes ? formatEscalationMinutes(nextSlaRow.policy.escalationMinutes) : `${overdueCount}/${dueSoonCount}`,
|
||||
evidence: `${overdueCount.toLocaleString()} 超时 / ${dueSoonCount.toLocaleString()} 临近`,
|
||||
detail: '客户看到的是升级时限和当前风险,后台再按P0/P1策略做超时升级和责任追踪。',
|
||||
action: 'SLA报告',
|
||||
color: overdueCount > 0 ? 'red' as const : dueSoonCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => copyText(slaEscalationReport(slaRows, release), 'SLA升级报告')
|
||||
},
|
||||
{
|
||||
question: '恢复后怎么验收?',
|
||||
value: policies[0]?.acceptanceCriteria || '按车辆服务证据验收',
|
||||
evidence: release || '当前版本',
|
||||
detail: '恢复不是只看服务在线,而是看车辆证据、实时数据、轨迹和规则命中是否一起恢复。',
|
||||
action: '验收口径',
|
||||
color: 'blue' as const,
|
||||
onClick: () => copyText(notificationRulesRunbook(plan, release), '通知规则Runbook')
|
||||
}
|
||||
];
|
||||
const exportNotificationRules = () => {
|
||||
const rows = notificationExportRows(plan, release);
|
||||
if (rows.length === 0) {
|
||||
@@ -774,6 +812,41 @@ export function NotificationRules() {
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered loading={loading} title="客户通知常问" style={{ marginBottom: 16 }}>
|
||||
<div className="vp-notification-question-board">
|
||||
<div className="vp-notification-question-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户口径</Tag>
|
||||
<Tag color={priorityIssues.length > 0 ? 'orange' : 'green'}>
|
||||
{priorityIssues.length > 0 ? `${priorityIssues.length.toLocaleString()} 待解释` : '当前稳定'}
|
||||
</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>把通知规则翻译成客户能理解的影响、责任、升级和恢复口径</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
客户不需要先理解规则配置,先回答受影响车辆、通知对象、升级时限和恢复验收。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-notification-question-grid">
|
||||
{notificationCustomerQuestions.map((item) => (
|
||||
<button
|
||||
key={item.question}
|
||||
type="button"
|
||||
className="vp-notification-question-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户通知常问 ${item.question} ${item.action}`}
|
||||
>
|
||||
<Space wrap>
|
||||
<Tag color={item.color}>{item.question}</Tag>
|
||||
<Tag color="grey">{item.evidence}</Tag>
|
||||
</Space>
|
||||
<strong>{item.value}</strong>
|
||||
<small>{item.detail}</small>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<div className="vp-kpi-grid">
|
||||
<Card bordered loading={loading}>
|
||||
<div className="vp-kpi-value">{activeRuleCount.toLocaleString()}</div>
|
||||
|
||||
Reference in New Issue
Block a user