diff --git a/vehicle-data-platform/apps/web/src/App.tsx b/vehicle-data-platform/apps/web/src/App.tsx index c8db398e..20102e62 100644 --- a/vehicle-data-platform/apps/web/src/App.tsx +++ b/vehicle-data-platform/apps/web/src/App.tsx @@ -210,7 +210,7 @@ export default function App() { dashboard: navigatePage('quality')} onOpenVehicles={openVehicles} />, vehicles: , realtime: , - detail: , + detail: , history: , mileage: , quality: setLinkIssueCount(health.linkHealth.filter((item) => item.status !== 'ok').length)} onFiltersChange={updateQualityFilters} initialFilters={qualityFilters} /> diff --git a/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx b/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx index a1dce28f..b1729717 100644 --- a/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx +++ b/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx @@ -69,12 +69,14 @@ export function VehicleDetail({ protocol, onOpenHistory, onOpenMileage, + onOpenVehicles, onQueryChange }: { vin: string; protocol?: string; onOpenHistory: (vin: string, protocol?: string) => void; onOpenMileage: (vin: string, protocol?: string) => void; + onOpenVehicles?: (filters?: Record) => void; onQueryChange?: (keyword: string, protocol?: string) => void; }) { const [query, setQuery] = useState({ keyword: vin, protocol }); @@ -159,7 +161,17 @@ export function VehicleDetail({ const missingProtocols = consistency?.missingProtocols ?? []; const missingProtocolText = missingProtocols.length > 0 ? ( - {missingProtocols.map((item) => {item})} + {missingProtocols.map((item) => ( + + ))} ) : '-'; const evidenceSourceCount = overview?.sourceCount ?? consistencySourceCount; diff --git a/vehicle-data-platform/apps/web/src/test/App.test.tsx b/vehicle-data-platform/apps/web/src/test/App.test.tsx index 7e519067..c66025a7 100644 --- a/vehicle-data-platform/apps/web/src/test/App.test.tsx +++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx @@ -2660,4 +2660,6 @@ test('shows cross-source consistency for one vehicle service', async () => { expect(screen.getAllByText('3 个来源有位置').length).toBeGreaterThan(0); expect(screen.getAllByText('0.4 km').length).toBeGreaterThan(0); expect(screen.getAllByText('35 秒').length).toBeGreaterThan(0); + fireEvent.click(screen.getByRole('button', { name: '查看缺 YUTONG_MQTT 车辆' })); + expect(window.location.hash).toBe('#/vehicles?serviceStatus=degraded&missingProtocol=YUTONG_MQTT'); });