From fd60d2644eba9ef4b1c89125d12fb529c06013e1 Mon Sep 17 00:00:00 2001 From: lingniu Date: Fri, 3 Jul 2026 23:39:35 +0800 Subject: [PATCH] feat(platform): link quality issues to vehicle service --- vehicle-data-platform/apps/web/src/App.tsx | 2 +- .../apps/web/src/pages/Quality.tsx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/vehicle-data-platform/apps/web/src/App.tsx b/vehicle-data-platform/apps/web/src/App.tsx index d30a523e..3b0cc77f 100644 --- a/vehicle-data-platform/apps/web/src/App.tsx +++ b/vehicle-data-platform/apps/web/src/App.tsx @@ -71,7 +71,7 @@ export default function App() { detail: , history: , mileage: , - quality: setLinkIssueCount(health.linkHealth.filter((item) => item.status !== 'ok').length)} /> + quality: setLinkIssueCount(health.linkHealth.filter((item) => item.status !== 'ok').length)} /> }; return ( diff --git a/vehicle-data-platform/apps/web/src/pages/Quality.tsx b/vehicle-data-platform/apps/web/src/pages/Quality.tsx index ac3cf808..5800f436 100644 --- a/vehicle-data-platform/apps/web/src/pages/Quality.tsx +++ b/vehicle-data-platform/apps/web/src/pages/Quality.tsx @@ -49,7 +49,18 @@ async function copyText(value: string, label: string) { } } -export function Quality({ onHealthLoaded }: { onHealthLoaded?: (health: OpsHealth) => void }) { +function canOpenVehicle(vin?: string) { + const value = vin?.trim(); + return Boolean(value && value !== 'unknown'); +} + +export function Quality({ + onOpenVehicle, + onHealthLoaded +}: { + onOpenVehicle: (vin: string) => void; + onHealthLoaded?: (health: OpsHealth) => void; +}) { const [issues, setIssues] = useState([]); const [summary, setSummary] = useState(emptySummary); const [health, setHealth] = useState(null); @@ -170,11 +181,12 @@ export function Quality({ onHealthLoaded }: { onHealthLoaded?: (health: OpsHealt { title: '说明', dataIndex: 'detail' }, { title: '操作', - width: 140, + width: 250, render: (_: unknown, row: QualityIssueRow) => ( + ) }