fix(platform): keep mileage source when opening vehicle

This commit is contained in:
lingniu
2026-07-04 06:23:20 +08:00
parent 6dd00f4ebb
commit 857c96734d
2 changed files with 154 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ export function Mileage({ initialVin, initialProtocol, onOpenVehicle }: { initia
title="里程统计"
description="按车辆汇总每日里程、区间里程和异常差值分析"
actions={(
<Button disabled={!currentVehicleKeyword} onClick={() => onOpenVehicle(currentVehicleKeyword)}>
<Button disabled={!currentVehicleKeyword} onClick={() => onOpenVehicle(currentVehicleKeyword, currentProtocol)}>
</Button>
)}
@@ -149,7 +149,7 @@ export function Mileage({ initialVin, initialProtocol, onOpenVehicle }: { initia
title: '操作',
width: 110,
render: (_: unknown, row: DailyMileageRow) => (
<Button disabled={!canOpenVehicle(row.vin)} onClick={() => onOpenVehicle(row.vin)}></Button>
<Button disabled={!canOpenVehicle(row.vin)} onClick={() => onOpenVehicle(row.vin, row.source)}></Button>
)
}
]}