feat(platform): link missing source diagnosis to vehicles
This commit is contained in:
@@ -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<string, string>) => void;
|
||||
onQueryChange?: (keyword: string, protocol?: string) => void;
|
||||
}) {
|
||||
const [query, setQuery] = useState<VehicleQuery>({ keyword: vin, protocol });
|
||||
@@ -159,7 +161,17 @@ export function VehicleDetail({
|
||||
const missingProtocols = consistency?.missingProtocols ?? [];
|
||||
const missingProtocolText = missingProtocols.length > 0 ? (
|
||||
<Space spacing={4}>
|
||||
{missingProtocols.map((item) => <Tag key={item} color="orange">{item}</Tag>)}
|
||||
{missingProtocols.map((item) => (
|
||||
<Button
|
||||
key={item}
|
||||
size="small"
|
||||
theme="light"
|
||||
type="warning"
|
||||
onClick={() => onOpenVehicles?.({ serviceStatus: 'degraded', missingProtocol: item })}
|
||||
>
|
||||
查看缺 {item} 车辆
|
||||
</Button>
|
||||
))}
|
||||
</Space>
|
||||
) : '-';
|
||||
const evidenceSourceCount = overview?.sourceCount ?? consistencySourceCount;
|
||||
|
||||
Reference in New Issue
Block a user