feat(platform-web): carry detail source to analysis links

This commit is contained in:
lingniu
2026-07-04 01:31:50 +08:00
parent a12d86e6f4
commit 9886fe2481
3 changed files with 90 additions and 9 deletions

View File

@@ -28,8 +28,8 @@ export function VehicleDetail({
}: {
vin: string;
protocol?: string;
onOpenHistory: (vin: string) => void;
onOpenMileage: (vin: string) => void;
onOpenHistory: (vin: string, protocol?: string) => void;
onOpenMileage: (vin: string, protocol?: string) => void;
onQueryChange?: (keyword: string, protocol?: string) => void;
}) {
const [query, setQuery] = useState<VehicleQuery>({ keyword: vin, protocol });
@@ -130,8 +130,8 @@ export function VehicleDetail({
<Space>
<Button icon={<IconSearch />} htmlType="submit" theme="solid" type="primary"></Button>
<Button icon={<IconRefresh />} onClick={() => load(query)} loading={loading}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenHistory(resolvedVIN)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenMileage(resolvedVIN)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenHistory(resolvedVIN, activeProtocol)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenMileage(resolvedVIN, activeProtocol)}></Button>
</Space>
</Form>
</Card>