feat(platform): separate customer service flow
This commit is contained in:
@@ -2079,6 +2079,66 @@ export function Dashboard({
|
||||
onClick: openTimeMonitorAlerts
|
||||
}
|
||||
];
|
||||
const customerPrimaryFlowItems = [
|
||||
{
|
||||
label: '实时地图',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: '先确认车辆在哪里、是否在线、是否有有效坐标。',
|
||||
action: '打开地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: '时间窗复盘',
|
||||
value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo),
|
||||
detail: '用同一时间范围串起轨迹、位置、里程、历史明细和导出。',
|
||||
action: '查询导出',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
label: '里程统计',
|
||||
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
|
||||
detail: '以车辆为对象核对区间里程、每日统计和 BI 口径。',
|
||||
action: '统计查询',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
},
|
||||
{
|
||||
label: '告警通知',
|
||||
value: `${formatCount(summary?.issueVehicles)} 告警`,
|
||||
detail: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} / ${priorityIssueVehicleLabel(highPriorityIssue)}` : '无高优先级异常时可交付无异常说明。',
|
||||
action: '通知处理',
|
||||
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: openTimeMonitorAlerts
|
||||
}
|
||||
];
|
||||
const operationsEvidenceItems = [
|
||||
{
|
||||
label: '链路健康',
|
||||
value: unhealthyLinkCount > 0 ? `${formatCount(unhealthyLinkCount)} 异常` : '正常',
|
||||
detail: '解释车辆实时、轨迹、统计或导出不可用时的链路证据。',
|
||||
action: '查看告警',
|
||||
color: unhealthyLinkCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
},
|
||||
{
|
||||
label: '消息积压',
|
||||
value: formatLag(summary?.kafkaLag),
|
||||
detail: '判断接收、解析和历史落地是否存在排队。',
|
||||
action: '查看运维',
|
||||
color: (summary?.kafkaLag ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality()
|
||||
},
|
||||
{
|
||||
label: '缓存在线',
|
||||
value: formatCount(opsHealth?.redisOnlineKeys),
|
||||
detail: '辅助解释在线车辆数和实时状态是否可信。',
|
||||
action: '缓存证据',
|
||||
color: (opsHealth?.redisOnlineKeys ?? 0) > 0 ? 'blue' as const : 'orange' as const,
|
||||
onClick: () => onOpenRealtime({ online: 'online' })
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -2216,6 +2276,60 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-customer-service-separation" aria-label="客户主流程与运维证据层">
|
||||
<div className="vp-customer-primary-flow">
|
||||
<div className="vp-customer-primary-flow-copy">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户主流程</Tag>
|
||||
<Tag color="green">一个车辆服务</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>默认展示车辆地图、时间窗、里程、导出和告警;三类数据源只作为二级证据。</Typography.Title>
|
||||
</div>
|
||||
<div className="vp-customer-primary-flow-grid">
|
||||
{customerPrimaryFlowItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-customer-primary-flow-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>
|
||||
</div>
|
||||
<div className="vp-operations-evidence-layer">
|
||||
<div className="vp-operations-evidence-layer-copy">
|
||||
<Space wrap>
|
||||
<Tag color="grey">运维证据层</Tag>
|
||||
<Tag color={unhealthyLinkCount > 0 ? 'orange' : 'green'}>{unhealthyLinkCount > 0 ? `${formatCount(unhealthyLinkCount)} 异常` : '链路正常'}</Tag>
|
||||
</Space>
|
||||
<Typography.Text type="secondary">
|
||||
用于解释车辆服务不可用的链路、队列、缓存、存储和来源证据,不作为客户默认入口。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-operations-evidence-layer-grid">
|
||||
{operationsEvidenceItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-operations-evidence-layer-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>
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-customer-map-situation" aria-label="车辆地图态势">
|
||||
<div className="vp-customer-map-situation-map">
|
||||
<VehicleMap
|
||||
|
||||
Reference in New Issue
Block a user