diff --git a/src/App.tsx b/src/App.tsx index 55ded30..996ef92 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -733,13 +733,18 @@ export default function App() { ))} ) : modalVehicles.length > 0 ? ( -
+
{modalVehicles.map((v) => (
- {v.plateNumber} + {v.plateNumber} + {(v.province || v.city) && ( + + {[v.province, v.city].filter(Boolean).join(' ')} + + )}
))}
diff --git a/src/server/routes/vehicles.ts b/src/server/routes/vehicles.ts index f0cd88e..ba9e530 100644 --- a/src/server/routes/vehicles.ts +++ b/src/server/routes/vehicles.ts @@ -231,6 +231,8 @@ function transformRow(row: VehicleRow): Vehicle { color: row.车辆颜色 || '', location: region, region, + province: row.省, + city: row.市, status: mapStatus(row.车辆租赁状态Label), ownership: mapOwnership(row.车辆归属状态Label), rentCompany: row.租赁公司 || '', @@ -639,6 +641,8 @@ app.get('/list', async (c) => { type: v.type, model: v.model, location: v.location, + province: v.province, + city: v.city, status: v.status, ownership: v.ownership, contractNo: v.contractNo, diff --git a/src/server/types.ts b/src/server/types.ts index 2920cc1..50805ca 100644 --- a/src/server/types.ts +++ b/src/server/types.ts @@ -36,6 +36,8 @@ export interface Vehicle { color: string; location: string; region: string; + province: string | null; + city: string | null; status: 'Operating' | 'Inventory' | 'Pending' | 'Abnormal'; ownership: string; rentCompany: string; diff --git a/src/types.ts b/src/types.ts index bf063e7..87d3a70 100644 --- a/src/types.ts +++ b/src/types.ts @@ -101,6 +101,8 @@ export interface VehicleListItem { type: string; model: string; location: string; + province: string | null; + city: string | null; status: string; ownership: string; contractNo: string | null;