feat(platform): add vehicle detail realtime shortcut

This commit is contained in:
lingniu
2026-07-04 07:04:55 +08:00
parent 0366144780
commit 84f578bcc7
3 changed files with 94 additions and 1 deletions
@@ -67,6 +67,7 @@ async function copyVehicleServiceURL() {
export function VehicleDetail({
vin,
protocol,
onOpenRealtime,
onOpenHistory,
onOpenRaw,
onOpenMileage,
@@ -75,6 +76,7 @@ export function VehicleDetail({
}: {
vin: string;
protocol?: string;
onOpenRealtime: (vin: string, protocol?: string) => void;
onOpenHistory: (vin: string, protocol?: string) => void;
onOpenRaw: (vin: string, protocol?: string) => void;
onOpenMileage: (vin: string, protocol?: string) => void;
@@ -226,6 +228,7 @@ export function VehicleDetail({
<Button icon={<IconSearch />} htmlType="submit" theme="solid" type="primary">查询车辆</Button>
<Button icon={<IconRefresh />} onClick={() => load(query)} loading={loading}>刷新</Button>
<Button icon={<IconCopy />} onClick={copyVehicleServiceURL}>复制服务链接</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenRealtime(resolvedVIN, activeProtocol)}>查看实时</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenHistory(resolvedVIN, activeProtocol)}>查看历史</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenRaw(resolvedVIN, activeProtocol)}>查看 RAW</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenMileage(resolvedVIN, activeProtocol)}>查看里程</Button>