diff --git a/vehicle-data-platform/apps/web/src/App.tsx b/vehicle-data-platform/apps/web/src/App.tsx
index 3680cfb2..9785b3d4 100644
--- a/vehicle-data-platform/apps/web/src/App.tsx
+++ b/vehicle-data-platform/apps/web/src/App.tsx
@@ -50,8 +50,8 @@ export default function App() {
vehicles: ,
realtime: ,
detail: ,
- history: ,
- mileage: ,
+ history: ,
+ mileage: ,
quality: setLinkIssueCount(health.linkHealth.filter((item) => item.status !== 'ok').length)} />
};
diff --git a/vehicle-data-platform/apps/web/src/pages/History.tsx b/vehicle-data-platform/apps/web/src/pages/History.tsx
index 4c901f8e..dee46d55 100644
--- a/vehicle-data-platform/apps/web/src/pages/History.tsx
+++ b/vehicle-data-platform/apps/web/src/pages/History.tsx
@@ -21,7 +21,12 @@ const defaultFilters: HistoryFilters = {
const defaultPage = { items: [], total: 0, limit: 10, offset: 0 };
-export function History() {
+function canOpenVehicle(vin?: string) {
+ const value = vin?.trim();
+ return Boolean(value && value !== 'unknown');
+}
+
+export function History({ onOpenVehicle }: { onOpenVehicle: (vin: string) => void }) {
const [filters, setFilters] = useState(defaultFilters);
const [locations, setLocations] = useState>(defaultPage);
const [rawFrames, setRawFrames] = useState>(defaultPage);
@@ -143,7 +148,14 @@ export function History() {
{ title: '速度 km/h', dataIndex: 'speedKmh', width: 120 },
{ title: '总里程 km', dataIndex: 'totalMileageKm', width: 130 },
{ title: '设备时间', dataIndex: 'deviceTime', width: 190 },
- { title: '入库时间', dataIndex: 'serverTime', width: 190 }
+ { title: '入库时间', dataIndex: 'serverTime', width: 190 },
+ {
+ title: '操作',
+ width: 110,
+ render: (_: unknown, row: HistoryLocationRow) => (
+
+ )
+ }
]}
/>
@@ -169,7 +181,16 @@ export function History() {
{ title: '大小 B', dataIndex: 'rawSizeBytes', width: 100 },
{ title: '设备时间', dataIndex: 'deviceTime', width: 190 },
{ title: '入库时间', dataIndex: 'serverTime', width: 190 },
- { title: '操作', width: 100, render: (_: unknown, row: RawFrameRow) => }
+ {
+ title: '操作',
+ width: 200,
+ render: (_: unknown, row: RawFrameRow) => (
+
+
+
+
+ )
+ }
]}
/>
diff --git a/vehicle-data-platform/apps/web/src/pages/Mileage.tsx b/vehicle-data-platform/apps/web/src/pages/Mileage.tsx
index 08078708..047a3f5d 100644
--- a/vehicle-data-platform/apps/web/src/pages/Mileage.tsx
+++ b/vehicle-data-platform/apps/web/src/pages/Mileage.tsx
@@ -27,7 +27,12 @@ function formatKm(value: number) {
return Number.isFinite(value) ? value.toLocaleString(undefined, { maximumFractionDigits: 1 }) : '0';
}
-export function Mileage() {
+function canOpenVehicle(vin?: string) {
+ const value = vin?.trim();
+ return Boolean(value && value !== 'unknown');
+}
+
+export function Mileage({ onOpenVehicle }: { onOpenVehicle: (vin: string) => void }) {
const [rows, setRows] = useState([]);
const [summary, setSummary] = useState(emptySummary);
const [loading, setLoading] = useState(true);
@@ -121,7 +126,14 @@ export function Mileage() {
{ title: '结束里程', dataIndex: 'endMileageKm' },
{ title: '日里程', dataIndex: 'dailyMileageKm' },
{ title: '来源', dataIndex: 'source' },
- { title: '异常', render: (_: unknown, row: DailyMileageRow) => row.anomalySeverity ? {row.anomalySeverity} : 正常 }
+ { title: '异常', render: (_: unknown, row: DailyMileageRow) => row.anomalySeverity ? {row.anomalySeverity} : 正常 },
+ {
+ title: '操作',
+ width: 110,
+ render: (_: unknown, row: DailyMileageRow) => (
+
+ )
+ }
]}
/>