获取单个无人机详情

This commit is contained in:
mmc
2026-05-27 15:08:26 +08:00
parent 50f7a96751
commit 2ab9e3715a
6 changed files with 194 additions and 46 deletions

View File

@@ -19,6 +19,8 @@ interface DroneVideoPlayerProps {
const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
device,
wind_speed,
h,
height = 160,
showSourceSelect = true,
dualVideo = false,
@@ -230,19 +232,22 @@ const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
</div>
)}
<div style={{
position: 'absolute',
top: 6,
left: 6,
background: 'rgba(0,0,0,0.5)',
color: '#fff',
padding: '2px 6px',
borderRadius: 4,
fontSize: 10,
zIndex: 5
}}>
{isDrone ? '无人机视频' : '机场视频'}
</div>
{showSourceSelect && (
<div style={{
position: 'absolute',
top: 6,
left: 6,
background: 'rgba(0,0,0,0.5)',
color: '#fff',
padding: '2px 6px',
borderRadius: 4,
fontSize: 10,
zIndex: 5
}}>
{isDrone ? '无人机视频' : '机场视频'}
</div>
)}
{/* 底部信息叠加 */}
{isDrone && device && (
@@ -258,8 +263,8 @@ const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
padding: '4px 8px',
fontSize: 10
}}>
<span>高度 {device.height?.toFixed(2) || '-'}m</span>
<span>风速 {device.wind_speed?.toFixed(2) || '-'}m/s</span>
<span>高度 {h.toFixed(2) || device.height?.toFixed(2) || '-'}m</span>
<span>风速 {wind_speed.toFixed(2) || device.wind_speed?.toFixed(2) || '0'}m/s</span>
</div>
)}
</div>