feat(platform): add vehicle health energy board
This commit is contained in:
@@ -2053,6 +2053,40 @@ export function Dashboard({
|
||||
onClick: openTimeMonitorRaw
|
||||
}
|
||||
];
|
||||
const vehicleHealthEnergyItems = [
|
||||
{
|
||||
label: '实时工况',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: '查看车辆最新速度、SOC、总里程、在线状态和多来源实时字段。',
|
||||
action: '实时监控',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenRealtime({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: 'SOC/氢能字段',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '从历史字段中回查 SOC、燃料电池、氢耗和关键工况字段。',
|
||||
action: '字段证据',
|
||||
color: 'blue' as const,
|
||||
onClick: () => onOpenHistory({ tab: 'fields', includeFields: 'true' })
|
||||
},
|
||||
{
|
||||
label: '异常维护',
|
||||
value: `${formatCount(summary?.issueVehicles)} 告警`,
|
||||
detail: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} 需要进入告警闭环。` : '暂无高优先级异常,继续观察车辆健康状态。',
|
||||
action: '告警事件',
|
||||
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
},
|
||||
{
|
||||
label: '里程能耗',
|
||||
value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo),
|
||||
detail: '用同一时间窗核对里程、运行状态和能耗相关统计口径。',
|
||||
action: '统计查询',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
}
|
||||
];
|
||||
const dispatchOperationsHighlights = [
|
||||
{
|
||||
label: '实时地图',
|
||||
@@ -2575,6 +2609,35 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-vehicle-health-energy" aria-label="车辆健康与能耗工作台">
|
||||
<div className="vp-vehicle-health-energy-copy">
|
||||
<Space wrap>
|
||||
<Tag color="green">车辆健康与能耗工作台</Tag>
|
||||
<Tag color="blue">{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 }}>把实时工况、SOC/氢能字段、异常维护和里程能耗放到同一辆车的服务视角里。</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
客户不需要先理解字段来自 32960、808 还是 MQTT;先按车辆查看健康、能耗、异常和统计证据。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-vehicle-health-energy-grid">
|
||||
{vehicleHealthEnergyItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-vehicle-health-energy-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>
|
||||
|
||||
Reference in New Issue
Block a user