feat(platform): add vehicle asset task rail
This commit is contained in:
@@ -714,6 +714,40 @@ export function Vehicles({
|
||||
}
|
||||
], [exportVehicles, filters.keyword, onOpenHistory, onOpenMap, onOpenMileage, onOpenRealtime, rows.length, serviceScopeFilters, summary?.onlineVehicles]);
|
||||
const primaryAction = actionQueue[0];
|
||||
const vehicleAssetTasks = [
|
||||
{
|
||||
title: '最近上报',
|
||||
value: `${(summary?.onlineVehicles ?? 0).toLocaleString()} 在线`,
|
||||
detail: '按最近仍在上报的车辆进入实时监控和地图态势。',
|
||||
action: '只看在线',
|
||||
color: 'green' as const,
|
||||
onClick: () => applyFilters({ ...filters, 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: 'degraded' })
|
||||
},
|
||||
{
|
||||
title: '身份待维护',
|
||||
value: `${(summary?.unboundVehicles ?? 0).toLocaleString()} 未绑定`,
|
||||
detail: '复制当前页身份维护清单,用于补齐车牌、手机号、VIN 和 OEM。',
|
||||
action: '维护清单',
|
||||
color: (summary?.unboundVehicles ?? 0) > 0 || (summary?.archiveIncompleteVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: copyIdentityMaintenanceList
|
||||
},
|
||||
{
|
||||
title: '报表导出',
|
||||
value: `${rows.length.toLocaleString()} 当前页`,
|
||||
detail: '导出车辆资产清单,后续按车辆进入轨迹、统计和历史证据。',
|
||||
action: '导出车辆',
|
||||
color: rows.length > 0 ? 'blue' as const : 'grey' as const,
|
||||
onClick: exportVehicles
|
||||
}
|
||||
];
|
||||
const vehicleDecisionItems = [
|
||||
{
|
||||
title: '在线车辆',
|
||||
@@ -1016,6 +1050,34 @@ export function Vehicles({
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="车辆资产作业栏" style={{ marginTop: 16 }}>
|
||||
<div className="vp-vehicle-asset-board">
|
||||
<div className="vp-vehicle-asset-summary">
|
||||
<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-asset-grid">
|
||||
{vehicleAssetTasks.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-vehicle-asset-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`车辆资产作业 ${item.title} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="车辆客户常问" style={{ marginTop: 16 }}>
|
||||
<div className="vp-vehicle-question-board">
|
||||
<div className="vp-vehicle-question-summary">
|
||||
|
||||
Reference in New Issue
Block a user