fix(platform): keep vehicle list source filter

This commit is contained in:
lingniu
2026-07-04 06:38:06 +08:00
parent 5234eb5542
commit c70af50cec
3 changed files with 100 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ export function Vehicles({
onFiltersChange,
initialFilters = {}
}: {
onOpenVehicle: (vin: string) => void;
onOpenVehicle: (vin: string, protocol?: string) => void;
onFiltersChange?: (filters: Record<string, string>) => void;
initialFilters?: Record<string, string>;
}) {
@@ -158,7 +158,7 @@ export function Vehicles({
{ title: '在线', width: 90, render: (_: unknown, row: VehicleCoverageRow) => <StatusTag status={row.online ? 'ok' : 'offline'} /> },
{ title: '最后在线', dataIndex: 'lastSeen', width: 170 },
{ title: '绑定', width: 90, render: (_: unknown, row: VehicleCoverageRow) => <Tag color={row.bindingStatus === 'bound' ? 'green' : 'orange'}>{row.bindingStatus === 'bound' ? '已绑定' : '未绑定'}</Tag> },
{ title: '操作', width: 110, render: (_: unknown, row: VehicleCoverageRow) => <Button onClick={() => onOpenVehicle(row.vin)}></Button> }
{ title: '操作', width: 110, render: (_: unknown, row: VehicleCoverageRow) => <Button onClick={() => onOpenVehicle(row.vin, filters.protocol)}></Button> }
],
[filters, onOpenVehicle]
);