算法loading 装配图 首先定位都中国
This commit is contained in:
@@ -692,6 +692,18 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
|
||||
viewer.scene.requestRenderMode = true; // 👈 加这个(只在需要时渲染)
|
||||
viewer.scene.globe.enableLighting = false;
|
||||
|
||||
viewer.camera.flyTo({
|
||||
// 中国中心大致坐标 + 合适高度(200万米)
|
||||
destination: window.Cesium.Cartesian3.fromDegrees(103.84, 31.15, 2000000),
|
||||
orientation: {
|
||||
heading: window.Cesium.Math.toRadians(0),
|
||||
pitch: window.Cesium.Math.toRadians(-90),
|
||||
roll: 0
|
||||
},
|
||||
duration: 0 // 初始化直接到位,无需动画
|
||||
});
|
||||
|
||||
|
||||
try { fetchPublishedLayers() } catch (e) { }
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -22,6 +22,7 @@ import DroneLivePlayer from '../VolcRtcPlayer.jsx';
|
||||
import AgoraTextTest from '../AgoraRtc.tsx';
|
||||
import { useWebRTCPlayer } from '../useWebRTCStream.tsx';
|
||||
import VideoPlayer from '../VideoPlayer.tsx.tsx';
|
||||
import CesiumMap from '../Map.jsx';
|
||||
|
||||
const { Content } = Layout;
|
||||
const { Text, Title } = Typography;
|
||||
@@ -234,8 +235,8 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
||||
<Row gutter={[8, 8]}>
|
||||
<Col xs={24} lg={14}>
|
||||
<Card title={<><EnvironmentOutlined /> 装备协同态势图</>} extra={<Button type="text" icon={<SettingOutlined />} />} bordered={false} style={{ borderRadius: 8, marginBottom: 8 }} bodyStyle={{ padding: 0 }}>
|
||||
<div style={{ width: '100%', height: 350, background: '#e6f7ff url(https://picsum.photos/seed/solarfarm/1600/800) center/cover', borderRadius: 8, position: 'relative', overflow: 'hidden' }}>
|
||||
<div style={{ position: 'absolute', top: 12, left: 12, background: 'rgba(255,255,255,0.95)', borderRadius: 6, padding: 8 }}>
|
||||
<div style={{ width: '100%', height: 350, borderRadius: 8, position: 'relative', overflow: 'hidden' }}>
|
||||
<div style={{ position: 'absolute', zIndex: 9999, top: 12, left: 12, background: 'rgba(255,255,255,0.95)', borderRadius: 6, padding: 8 }}>
|
||||
<div style={{ fontSize: 11, fontWeight: 60, marginBottom: 4 }}>图例说明</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, fontSize: 10 }}>
|
||||
<div><span style={{ color: '#1890ff' }}>———</span> 巡检航线</div>
|
||||
@@ -246,6 +247,7 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
||||
<div><span style={{ color: '#ff4d4f' }}>■</span> 障碍/禁入区</div>
|
||||
</div>
|
||||
</div>
|
||||
<CesiumMap />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -369,10 +371,15 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 6, marginBottom: 12, maxHeight: "160px", overflow: "auto", scrollbarWidth: 'thin', scrollbarColor: '#ccc transparent' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#666', fontSize: 12 }}>产品类型</span>
|
||||
<span style={{ fontSize: 12 }}>{getVal(selectedDevice.productName)}</span>
|
||||
</div>
|
||||
{selectedDevice.productName && (
|
||||
<>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#666', fontSize: 12 }}>产品类型</span>
|
||||
<span style={{ fontSize: 12 }}>{getVal(selectedDevice.productName)}</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 8 }}>
|
||||
<span style={{ color: '#666', fontSize: 12, whiteSpace: 'nowrap' }}>设备SN</span>
|
||||
<span
|
||||
|
||||
Reference in New Issue
Block a user