feat(platform): add vehicle asset operations console
This commit is contained in:
@@ -748,6 +748,40 @@ export function Vehicles({
|
||||
onClick: exportVehicles
|
||||
}
|
||||
];
|
||||
const vehicleAssetOperations = [
|
||||
{
|
||||
title: '资产健康',
|
||||
value: `${(summary?.totalVehicles ?? pagination.total).toLocaleString()} 车辆`,
|
||||
detail: '当前筛选车辆池,可继续按车牌、手机号、OEM、在线状态和服务状态缩小范围。',
|
||||
action: '查看车辆池',
|
||||
color: 'blue' as const,
|
||||
onClick: () => applyFilters(filters)
|
||||
},
|
||||
{
|
||||
title: '在线车辆',
|
||||
value: `${(summary?.onlineVehicles ?? 0).toLocaleString()} 在线`,
|
||||
detail: '优先进入仍在上报的车辆,查看实时位置、最后时间和来源证据。',
|
||||
action: '打开实时',
|
||||
color: (summary?.onlineVehicles ?? 0) > 0 ? 'green' as const : 'orange' as const,
|
||||
onClick: () => onOpenRealtime?.({ ...serviceScopeFilters, online: 'online' })
|
||||
},
|
||||
{
|
||||
title: '待处理',
|
||||
value: `${((summary?.noDataVehicles ?? 0) + (summary?.unboundVehicles ?? 0)).toLocaleString()} 待处理`,
|
||||
detail: '无来源和未绑定车辆优先处理,否则客户无法稳定查车、看位置和出报表。',
|
||||
action: '异常优先',
|
||||
color: ((summary?.noDataVehicles ?? 0) + (summary?.unboundVehicles ?? 0)) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => applyFilters(primaryAction ? { ...filters, ...primaryAction.filters } : { ...filters, serviceStatus: 'no_data' })
|
||||
},
|
||||
{
|
||||
title: '服务交付',
|
||||
value: `${rows.length.toLocaleString()} 当前页`,
|
||||
detail: '把当前车辆池打包成客户能用的地图、实时、轨迹、统计、告警和导出入口。',
|
||||
action: '复制交付包',
|
||||
color: rows.length > 0 ? 'blue' as const : 'grey' as const,
|
||||
onClick: copyCustomerServicePackage
|
||||
}
|
||||
];
|
||||
const vehicleDecisionItems = [
|
||||
{
|
||||
title: '在线车辆',
|
||||
@@ -987,6 +1021,35 @@ export function Vehicles({
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="车辆服务" description="围绕车辆完成实时监控、地图查看、轨迹回放、统计查询和数据导出,协议来源只作为证据过滤条件" />
|
||||
<section className="vp-vehicle-asset-console" aria-label="车辆资产运营台">
|
||||
<div className="vp-vehicle-asset-console-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">车辆资产运营台</Tag>
|
||||
<Tag color={filters.keyword?.trim() ? 'green' : 'grey'}>{filters.keyword?.trim() ? '单车范围' : '车辆池'}</Tag>
|
||||
<Tag color={((summary?.noDataVehicles ?? 0) + (summary?.unboundVehicles ?? 0)) > 0 ? 'orange' : 'green'}>
|
||||
{((summary?.noDataVehicles ?? 0) + (summary?.unboundVehicles ?? 0)).toLocaleString()} 待处理
|
||||
</Tag>
|
||||
</Space>
|
||||
<strong>像车队资产系统一样,先判断车辆能不能服务,再进入地图、实时、轨迹、统计、导出和告警。</strong>
|
||||
<span>车辆中心面向客户运营:先看资产健康和在线车辆,再处理异常车辆,最后形成可交付的车辆服务包。</span>
|
||||
</div>
|
||||
<div className="vp-vehicle-asset-console-grid">
|
||||
{vehicleAssetOperations.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-vehicle-asset-console-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`车辆资产运营台 ${item.title} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<Card bordered title="车辆服务台">
|
||||
<div className="vp-vehicle-service-desk">
|
||||
<div className="vp-vehicle-service-summary">
|
||||
|
||||
Reference in New Issue
Block a user