feat(platform): add fleet operations cockpit
This commit is contained in:
@@ -1426,6 +1426,48 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality()
|
||||
}
|
||||
];
|
||||
const modernFleetOperations = [
|
||||
{
|
||||
label: 'Live Map',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: `有效定位 ${commandLocatedCount.toLocaleString()} 辆,先确认车辆在哪里。`,
|
||||
action: '打开地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: 'Route Replay',
|
||||
value: `${formatCount(summary?.activeToday)} 活跃`,
|
||||
detail: `时间窗 ${dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo)},用于客户复盘。`,
|
||||
action: '回放轨迹',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
label: 'Mileage',
|
||||
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
|
||||
detail: '按车辆口径查询区间里程、日统计和异常断点。',
|
||||
action: '查统计',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
},
|
||||
{
|
||||
label: 'Export',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '位置、原始记录和字段证据按车辆与时间裁剪交付。',
|
||||
action: '导出数据',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorRaw
|
||||
},
|
||||
{
|
||||
label: 'Alerts',
|
||||
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 } : {})
|
||||
}
|
||||
];
|
||||
const customerQuestionActions = [
|
||||
{
|
||||
question: '这辆车现在在哪里?',
|
||||
@@ -1623,6 +1665,32 @@ export function Dashboard({
|
||||
<div className="vp-page">
|
||||
<PageHeader title="车辆服务工作台" description="面向客户的车辆地图、实时监控、轨迹回放、统计查询、自定义时间窗复盘、历史查询、告警通知和数据导出" />
|
||||
<Spin spinning={loading}>
|
||||
<section className="vp-customer-cockpit" aria-label="现代车队运营台">
|
||||
<div className="vp-customer-cockpit-summary">
|
||||
<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={4} style={{ margin: 0 }}>一屏完成车辆地图、轨迹回放、里程统计、数据导出和告警闭环。</Typography.Title>
|
||||
</div>
|
||||
<div className="vp-customer-cockpit-actions">
|
||||
{modernFleetOperations.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-customer-cockpit-action"
|
||||
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 className="vp-fleet-monitor" bodyStyle={{ padding: 0 }}>
|
||||
<div className="vp-fleet-monitor-map">
|
||||
<div className="vp-fleet-monitor-copy">
|
||||
|
||||
Reference in New Issue
Block a user