From e57b8d8801491b328855f7f4804680b2ad8e9645 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Thu, 2 Apr 2026 00:38:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E5=B1=8F=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=BE=E8=AE=A1=E4=B8=BA=E7=BA=B5=E5=90=91?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 去掉 CSS transform 旋转(移动端不兼容) - KPI 改为单行横排4个卡片 - 标题栏+KPI 紧凑排列在顶部 - 表格区域占满剩余空间,可滚动查看所有列 - 移动端和桌面端统一布局 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/modules/mileage/MonitoringView.tsx | 87 +++++++++----------------- 1 file changed, 29 insertions(+), 58 deletions(-) diff --git a/src/modules/mileage/MonitoringView.tsx b/src/modules/mileage/MonitoringView.tsx index b26ae05..d0886bb 100644 --- a/src/modules/mileage/MonitoringView.tsx +++ b/src/modules/mileage/MonitoringView.tsx @@ -241,82 +241,53 @@ export default function MonitoringView() { initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} - className="fixed inset-0 z-[100] bg-slate-950 flex flex-row p-4 gap-4 overflow-hidden portrait:origin-top-left" - style={{ - ...(typeof window !== 'undefined' && window.innerHeight > window.innerWidth - ? { transform: 'rotate(90deg) translateY(-100%)', width: window.innerHeight, height: window.innerWidth, transformOrigin: 'top left' } - : {}), - }} + className="fixed inset-0 z-[100] bg-slate-950 flex flex-col overflow-hidden" > - {/* Sidebar Stats */} -
+ {/* Top bar: title + KPI row + close */} +
-
-

全屏监控

+
+

全屏监控

-
- - {/* KPI Cards in Fullscreen */} -
-
-
今日总里程
-
- {stats.totalToday.toLocaleString()} - KM -
+ {/* KPI — single row */} +
+
+
今日总里程
+
{Math.round(stats.totalToday).toLocaleString()} km
-
-
累计总里程
-
- {stats.totalAll.toLocaleString()} - KM -
+
+
累计总里程
+
{Math.round(stats.totalAll).toLocaleString()} km
-
-
监控台数
-
- {stats.vehicleCount} - -
+
+
监控台数
+
{stats.vehicleCount}
-
-
- 平均单车 ({sortBy === 'today' ? '今日' : '累计'}) -
-
- {(stats.vehicleCount > 0 ? (sortBy === 'today' ? stats.totalToday : stats.totalAll) / stats.vehicleCount : 0).toFixed(0)} - KM -
+
+
平均单车
+
{(stats.vehicleCount > 0 ? (sortBy === 'today' ? stats.totalToday : stats.totalAll) / stats.vehicleCount : 0).toFixed(0)} km
- {/* Main Table Area */} -
-
- 车辆实时明细数据 -
+ {/* Table Area */} +
+
+ 车辆实时明细数据 +
在线