diff --git a/src/components/Shell.tsx b/src/components/Shell.tsx index 5951931..889f87b 100644 --- a/src/components/Shell.tsx +++ b/src/components/Shell.tsx @@ -58,7 +58,7 @@ export function Shell({ modules }: { modules: ModuleConfig[] }) { {/* 内容区 */} -
+
{ActiveComponent && }
diff --git a/src/modules/mileage/StatisticsView.tsx b/src/modules/mileage/StatisticsView.tsx index 04d7972..095aba5 100644 --- a/src/modules/mileage/StatisticsView.tsx +++ b/src/modules/mileage/StatisticsView.tsx @@ -75,9 +75,9 @@ export default function StatisticsView() { ))} -
+
{/* Left Side: Trend Chart / Dashboard Sidebar */} -
+
{/* KPI Cards in Landscape */}
@@ -180,7 +180,7 @@ export default function StatisticsView() {
{/* Right Side: Summary Section */} -
+
diff --git a/src/server/routes/mileage.ts b/src/server/routes/mileage.ts index ef58383..0cb1df5 100644 --- a/src/server/routes/mileage.ts +++ b/src/server/routes/mileage.ts @@ -202,7 +202,7 @@ app.get('/trend', async (c) => { let sql = ` SELECT DATE_FORMAT(stat_date, '%m-%d') as date, SUM(daily_km) as mileage FROM v_vehicle_daily_stats - WHERE stat_date >= DATE_SUB(CURDATE(), INTERVAL ? DAY) + WHERE stat_date >= DATE_SUB(CURDATE(), INTERVAL ? DAY) AND stat_date < CURDATE() `; const params: any[] = [days];