feat(platform): add vehicle pool quick views
This commit is contained in:
@@ -782,6 +782,49 @@ export function Vehicles({
|
||||
onClick: copyCustomerServicePackage
|
||||
}
|
||||
];
|
||||
const offlineVehicleCount = Math.max((summary?.totalVehicles ?? pagination.total) - (summary?.onlineVehicles ?? 0), 0);
|
||||
const vehiclePoolQuickViews = [
|
||||
{
|
||||
title: '在线运营',
|
||||
value: `${(summary?.onlineVehicles ?? 0).toLocaleString()} 在线`,
|
||||
detail: '进入地图查看在线车辆分布、最近位置和运营范围。',
|
||||
action: '打开地图',
|
||||
color: (summary?.onlineVehicles ?? 0) > 0 ? 'green' as const : 'orange' as const,
|
||||
onClick: () => onOpenMap?.({ ...serviceScopeFilters, online: 'online' })
|
||||
},
|
||||
{
|
||||
title: '离线断链',
|
||||
value: `${offlineVehicleCount.toLocaleString()} 离线`,
|
||||
detail: '筛出离线车辆,结合最后上报时间判断断链影响。',
|
||||
action: '排查离线',
|
||||
color: offlineVehicleCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => applyFilters({ ...filters, online: 'offline' })
|
||||
},
|
||||
{
|
||||
title: '无来源车辆',
|
||||
value: `${(summary?.noDataVehicles ?? 0).toLocaleString()} 无来源`,
|
||||
detail: '优先确认平台转发、订阅和车辆身份是否可归并。',
|
||||
action: '平台转发',
|
||||
color: (summary?.noDataVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => applyFilters({ ...filters, serviceStatus: 'no_data' })
|
||||
},
|
||||
{
|
||||
title: '身份维护',
|
||||
value: `${(summary?.unboundVehicles ?? 0).toLocaleString()} 未绑定`,
|
||||
detail: '补齐车牌、手机号与 VIN 关系,保证客户能按车辆查数据。',
|
||||
action: '维护绑定',
|
||||
color: (summary?.unboundVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => applyFilters({ ...filters, bindingStatus: 'unbound' })
|
||||
},
|
||||
{
|
||||
title: '报表交付',
|
||||
value: `${rows.length.toLocaleString()} 当前页`,
|
||||
detail: '导出当前车辆池清单,作为客户报表和后续轨迹统计入口。',
|
||||
action: '导出清单',
|
||||
color: rows.length > 0 ? 'blue' as const : 'grey' as const,
|
||||
onClick: exportVehicles
|
||||
}
|
||||
];
|
||||
const vehicleDecisionItems = [
|
||||
{
|
||||
title: '在线车辆',
|
||||
@@ -1270,6 +1313,32 @@ export function Vehicles({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-vehicle-pool-quick-views" aria-label="车辆池快捷视图">
|
||||
<div className="vp-vehicle-pool-quick-copy">
|
||||
<Space wrap>
|
||||
<Tag color="blue">车辆池快捷视图</Tag>
|
||||
<Tag color={filters.keyword?.trim() ? 'green' : 'grey'}>{filters.keyword?.trim() ? '单车范围' : '车辆池'}</Tag>
|
||||
</Space>
|
||||
<strong>按客户服务场景一键切换车辆池:在线运营、离线断链、无来源、身份维护和报表交付。</strong>
|
||||
<span>业务人员先按问题选择车辆池,再进入地图、实时、轨迹、统计或导出;协议来源继续沉到证据层。</span>
|
||||
</div>
|
||||
<div className="vp-vehicle-pool-quick-grid">
|
||||
{vehiclePoolQuickViews.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-vehicle-pool-quick-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