From 3ea48dac0f766458b87ff1dfd6cf241200c1ec1d Mon Sep 17 00:00:00 2001
From: mmc <1556375442@qq.com>
Date: Thu, 6 Aug 2026 14:01:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=8A=B6=E6=80=81=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E8=A7=86=E9=A2=91=E5=81=9C=E6=AD=A2=E5=92=8C=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E4=BF=A1=E6=81=AF=E7=9A=84=E8=A7=A3=E8=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/devices/DeviceStatusPage.tsx | 194 +++++++++++---------
1 file changed, 106 insertions(+), 88 deletions(-)
diff --git a/src/components/devices/DeviceStatusPage.tsx b/src/components/devices/DeviceStatusPage.tsx
index ae0ffbb..da3a733 100644
--- a/src/components/devices/DeviceStatusPage.tsx
+++ b/src/components/devices/DeviceStatusPage.tsx
@@ -1147,101 +1147,119 @@ export default function DeviceStatusPage() {
> : null}
-
- {robotVideo ? (
- mowerView === 'all' ? (
+
+ {/* 视频层:停止时不渲染 / 未播放时为空,不影响状态面板 */}
+ {robotVideo && isVideoPlaying && (
+ mowerView === 'all' ? (
+
- ) : (
-
-
- {/* 单视频模式状态叠加层 */}
-
-
机器人状态
-
- 电量:
-
- {runningStatus.battery !== undefined ? `${runningStatus.battery}%` : '-'}
-
- 电压:
- {runningStatus.voltage !== undefined ? `${Number(runningStatus.voltage).toFixed(2)}V` : '-'}
- 左电机:
- {runningStatus.leftCurrent !== undefined ? `${Number(runningStatus.leftCurrent).toFixed(2)}A` : '-'}
- 右电机:
- {runningStatus.rightCurrent !== undefined ? `${Number(runningStatus.rightCurrent).toFixed(2)}A` : '-'}
- 左速度:
- {runningStatus.leftMeasureSpeed !== undefined ? `${Number(runningStatus.leftMeasureSpeed).toFixed(1)}rpm` : '-'}
- 右速度:
- {runningStatus.rightMeasureSpeed !== undefined ? `${Number(runningStatus.rightMeasureSpeed).toFixed(1)}rpm` : '-'}
- 左温度:
- {runningStatus.leftMotorTemp !== undefined ? `${Number(runningStatus.leftMotorTemp).toFixed(1)}℃` : '-'}
- 右温度:
- {runningStatus.rightMotorTemp !== undefined ? `${Number(runningStatus.rightMotorTemp).toFixed(1)}℃` : '-'}
- 主控温度:
- {runningStatus.chipTemp !== undefined ? `${Number(runningStatus.chipTemp).toFixed(1)}℃` : '-'}
- 航向角:
- {runningStatus.yaw !== undefined ? `${Number(runningStatus.yaw).toFixed(1)}°` : '-'}
- 俯仰角:
- {runningStatus.pitch !== undefined ? `${Number(runningStatus.pitch).toFixed(1)}°` : '-'}
- 航向角状态:
- {runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? '初始化' : '未初始化'}` : '-'}
- 定位:
-
- {runningStatus.qual == 0 ? '无效' :
- runningStatus.qual == 1 ? 'GPS单点' :
- runningStatus.qual == 2 ? 'DGPS差分' :
- runningStatus.qual == 4 ? 'RTK固定' :
- runningStatus.qual == 5 ? 'RTK浮点' : '未知'}
-
- 卫星:
- {runningStatus.satelliteCnt || 0}颗
- 模式:
-
- {runningStatus.controlMode == 1 ? '本地' :
- runningStatus.controlMode == 3 ? '远程' : '未知'}
-
-
-
-
-
- )
+
) : (
-
视频加载中...
- )}
-
+
+
+
+ )
+ )}
+
+ {/* 视频未加载 / 停止播放的占位 */}
+ {(!robotVideo || !isVideoPlaying) && (
+
+
+
+ {!isVideoPlaying ? '已停止视频' : '视频加载中...'}
+
+
+ {!isVideoPlaying ? '点击右上角「播放」按钮开启视频' : ''}
+
+
+ )}
+
+ {/* 单视频(非全景)模式状态叠加层:始终渲染,和视频层解耦 */}
+ {mowerView !== 'all' && (
+
+
机器人状态
+
+ 电量:
+
+ {runningStatus.battery !== undefined ? `${runningStatus.battery}%` : '-'}
+
+ 电压:
+ {runningStatus.voltage !== undefined ? `${Number(runningStatus.voltage).toFixed(2)}V` : '-'}
+ 左电机:
+ {runningStatus.leftCurrent !== undefined ? `${Number(runningStatus.leftCurrent).toFixed(2)}A` : '-'}
+ 右电机:
+ {runningStatus.rightCurrent !== undefined ? `${Number(runningStatus.rightCurrent).toFixed(2)}A` : '-'}
+ 左速度:
+ {runningStatus.leftMeasureSpeed !== undefined ? `${Number(runningStatus.leftMeasureSpeed).toFixed(1)}rpm` : '-'}
+ 右速度:
+ {runningStatus.rightMeasureSpeed !== undefined ? `${Number(runningStatus.rightMeasureSpeed).toFixed(1)}rpm` : '-'}
+ 左温度:
+ {runningStatus.leftMotorTemp !== undefined ? `${Number(runningStatus.leftMotorTemp).toFixed(1)}℃` : '-'}
+ 右温度:
+ {runningStatus.rightMotorTemp !== undefined ? `${Number(runningStatus.rightMotorTemp).toFixed(1)}℃` : '-'}
+ 主控温度:
+ {runningStatus.chipTemp !== undefined ? `${Number(runningStatus.chipTemp).toFixed(1)}℃` : '-'}
+ 航向角:
+ {runningStatus.yaw !== undefined ? `${Number(runningStatus.yaw).toFixed(1)}°` : '-'}
+ 俯仰角:
+ {runningStatus.pitch !== undefined ? `${Number(runningStatus.pitch).toFixed(1)}°` : '-'}
+ 航向角状态:
+ {runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? '初始化' : '未初始化'}` : '-'}
+ 定位:
+
+ {runningStatus.qual == 0 ? '无效' :
+ runningStatus.qual == 1 ? 'GPS单点' :
+ runningStatus.qual == 2 ? 'DGPS差分' :
+ runningStatus.qual == 4 ? 'RTK固定' :
+ runningStatus.qual == 5 ? 'RTK浮点' : '未知'}
+
+ 卫星:
+ {runningStatus.satelliteCnt || 0}颗
+ 模式:
+
+ {runningStatus.controlMode == 1 ? '本地' :
+ runningStatus.controlMode == 3 ? '远程' : '未知'}
+
+
+
+
+ )
+ }