feat(platform): add customer fleet group views

This commit is contained in:
lingniu
2026-07-05 20:33:58 +08:00
parent 7348cc6186
commit 59d55e7bd6
3 changed files with 142 additions and 0 deletions

View File

@@ -1822,6 +1822,40 @@ export function Dashboard({
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
}
];
const customerFleetGroupItems = [
{
label: '在线运营组',
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
detail: '给调度和客服复用:默认进入在线车辆地图,先回答客户车辆在哪里。',
action: '打开地图',
color: 'green' as const,
onClick: () => onOpenMap({ online: 'online' })
},
{
label: '告警处置组',
value: `${formatCount(summary?.issueVehicles)} 告警`,
detail: '给运维和业务负责人复用:只看需要通知、升级和验收的车辆。',
action: '告警通知',
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
},
{
label: '身份维护组',
value: `${formatCount(serviceSummary?.identityRequiredVehicles)} 待绑定`,
detail: '给数据维护人员复用:补齐 VIN、车牌、手机号和客户可查身份。',
action: '维护车辆',
color: (serviceSummary?.identityRequiredVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
onClick: () => onOpenVehicles({ serviceStatus: 'identity_required' })
},
{
label: '报表交付组',
value: `${formatCount(summary?.frameToday)} 今日数据`,
detail: '给客户交付人员复用:按同一车辆范围导出历史、轨迹、字段和统计证据。',
action: '历史导出',
color: 'blue' as const,
onClick: openTimeMonitorRaw
}
];
return (
<div className="vp-page">
@@ -1863,6 +1897,35 @@ export function Dashboard({
))}
</div>
</section>
<section className="vp-customer-fleet-groups" aria-label="客户车队分组工作台">
<div className="vp-customer-fleet-groups-copy">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color="green">{formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 线</Tag>
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} </Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>线</Typography.Title>
<Typography.Text type="secondary">
</Typography.Text>
</div>
<div className="vp-customer-fleet-groups-grid">
{customerFleetGroupItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-customer-fleet-group-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-cockpit" aria-label="现代车队运营台">
<div className="vp-customer-cockpit-summary">
<Space wrap>