feat(platform): add vehicle coverage view

This commit is contained in:
lingniu
2026-07-03 21:54:09 +08:00
parent 6352289c25
commit 110041a9db
13 changed files with 223 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import type {
QualityIssueRow,
RawFrameRow,
RealtimeLocationRow,
VehicleCoverageRow,
VehicleDetail,
VehicleRow
} from './types';
@@ -24,6 +25,7 @@ async function request<T>(path: string, init?: RequestInit): Promise<T> {
export const api = {
dashboardSummary: () => request<DashboardSummary>('/api/dashboard/summary'),
vehicles: (params = new URLSearchParams()) => request<Page<VehicleRow>>(`/api/vehicles?${params.toString()}`),
vehicleCoverage: (params = new URLSearchParams()) => request<Page<VehicleCoverageRow>>(`/api/vehicles/coverage?${params.toString()}`),
vehicleDetail: (params = new URLSearchParams()) => request<VehicleDetail>(`/api/vehicles/detail?${params.toString()}`),
realtimeLocations: (params = new URLSearchParams()) => request<Page<RealtimeLocationRow>>(`/api/realtime/locations?${params.toString()}`),
historyLocations: (params = new URLSearchParams()) => request<Page<HistoryLocationRow>>(`/api/history/locations?${params.toString()}`),

View File

@@ -38,6 +38,19 @@ export interface VehicleRow {
bindingScore: number;
}
export interface VehicleCoverageRow {
vin: string;
plate: string;
phone: string;
oem: string;
protocols: string[];
sourceCount: number;
onlineSourceCount: number;
online: boolean;
lastSeen: string;
bindingStatus: string;
}
export interface VehicleDetail {
vin: string;
identity?: VehicleRow;