feat(platform): add customer service blueprint

This commit is contained in:
lingniu
2026-07-06 00:12:09 +08:00
parent 0c33648b26
commit 79207d5096
3 changed files with 163 additions and 0 deletions

View File

@@ -1631,6 +1631,48 @@ export function Dashboard({
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
}
];
const customerPlatformBlueprintItems = [
{
label: '实时地图',
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
detail: `有效定位 ${commandLocatedCount.toLocaleString()} 辆,支撑客户看车、调度和在线巡检。`,
action: '打开地图',
color: commandLocatedCount > 0 ? 'green' as const : 'orange' as const,
onClick: () => onOpenMap({ online: 'online' })
},
{
label: '轨迹回放',
value: `${formatCount(summary?.activeToday)} 活跃`,
detail: '按车辆和时间窗回放路线、速度、停留与里程断点。',
action: '回放轨迹',
color: 'blue' as const,
onClick: openTimeMonitorHistory
},
{
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: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
},
{
label: '报表导出',
value: `${formatCount(summary?.frameToday)} 今日数据`,
detail: '按车辆、时间、字段裁剪轨迹、历史明细、统计和告警说明。',
action: '历史导出',
color: 'blue' as const,
onClick: openTimeMonitorRaw
},
{
label: '车辆健康',
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
detail: '围绕车辆档案、在线状态、能耗字段和异常维护建立服务视图。',
action: '车辆中心',
color: 'blue' as const,
onClick: () => onOpenVehicles({})
}
];
const amapVehicleServiceItems = [
{
label: '实时看车',
@@ -2319,6 +2361,37 @@ export function Dashboard({
))}
</div>
</section>
<section className="vp-customer-platform-blueprint" aria-label="客户车辆服务中台蓝图">
<div className="vp-customer-platform-blueprint-copy">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '高德地图可用' : '坐标预览'}</Tag>
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} </Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>
Live MapRoute ReplayGeofence AlertsReports Export Vehicle Health 使
</Typography.Title>
<Typography.Text type="secondary">
</Typography.Text>
</div>
<div className="vp-customer-platform-blueprint-grid">
{customerPlatformBlueprintItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-customer-platform-blueprint-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-customer-service-journey" aria-label="车辆服务闭环">
<div className="vp-customer-service-journey-copy">
<Tag color="blue"></Tag>