From ff767925af5d6e074331845f4c15d86a5e2c184b Mon Sep 17 00:00:00 2001
From: Zzc <1373857752@qq.com>
Date: Tue, 25 Nov 2025 11:38:41 +0800
Subject: [PATCH 1/5] =?UTF-8?q?feat(3d-situational-awareness):=20=E7=A6=81?=
=?UTF-8?q?=E7=94=A8=E5=9C=B0=E5=9B=BE=E6=A0=87=E8=AE=B0=E7=9A=84=E6=B7=B1?=
=?UTF-8?q?=E5=BA=A6=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
为点实体和公告板添加 `disableDepthTestDistance` 属性,以确保标记无论地形或其他物体如何都保持可见
---
.../composables/useMapMarkers.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/packages/screen/src/views/3DSituationalAwarenessRefactor/composables/useMapMarkers.js b/packages/screen/src/views/3DSituationalAwarenessRefactor/composables/useMapMarkers.js
index 1262475..db16794 100644
--- a/packages/screen/src/views/3DSituationalAwarenessRefactor/composables/useMapMarkers.js
+++ b/packages/screen/src/views/3DSituationalAwarenessRefactor/composables/useMapMarkers.js
@@ -176,7 +176,8 @@ export function useMapMarkers() {
pixelSize: 12,
outlineColor: Cesium.Color.WHITE,
outlineWidth: 2,
- heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
}
})
entities.push(pointEntity)
@@ -654,7 +655,8 @@ export function useMapMarkers() {
width: 48,
height: 48,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
- heightReference: resolveBillboardHeightReference(result.samplingSucceeded)
+ heightReference: resolveBillboardHeightReference(result.samplingSucceeded),
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
},
properties: {
type,
@@ -741,7 +743,8 @@ export function useMapMarkers() {
width: 48,
height: 48,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
- heightReference: resolveBillboardHeightReference(result.samplingSucceeded)
+ heightReference: resolveBillboardHeightReference(result.samplingSucceeded),
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
},
properties: {
type: 'station',
From 2e948026a3997f099cd48c6de80b66d1c8eca8f8 Mon Sep 17 00:00:00 2001
From: Zzc <1373857752@qq.com>
Date: Tue, 25 Nov 2025 11:40:36 +0800
Subject: [PATCH 2/5] =?UTF-8?q?fix(3d-situational-awareness):=20=E5=BB=B6?=
=?UTF-8?q?=E8=BF=9F=E5=AE=9E=E4=BD=93=E6=B7=BB=E5=8A=A0=E7=9B=B4=E5=88=B0?=
=?UTF-8?q?=E5=9C=B0=E5=BD=A2=E5=87=86=E5=A4=87=E5=B0=B1=E7=BB=AA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
将模拟点和路径起始标记的添加从初始化过程的早期阶段移动到地形完全加载之后。这通过确保CLAMP_TO_GROUND正确生效来防止标记在相机飞行期间漂浮。添加了渲染请求以触发即时渲染。
---
.../3DSituationalAwarenessRefactor/index.vue | 71 +++++++++++++------
1 file changed, 50 insertions(+), 21 deletions(-)
diff --git a/packages/screen/src/views/3DSituationalAwarenessRefactor/index.vue b/packages/screen/src/views/3DSituationalAwarenessRefactor/index.vue
index b7be8de..1e98532 100644
--- a/packages/screen/src/views/3DSituationalAwarenessRefactor/index.vue
+++ b/packages/screen/src/views/3DSituationalAwarenessRefactor/index.vue
@@ -694,28 +694,30 @@ const initializeScene = async () => {
},
})
- // 3. 添加模拟点位(人员和设备)
- const allMockPoints = mockDataService.getAllMockPoints()
- allMockPoints.forEach((point) => {
- const config =
- point.type === 'soldier'
- ? mockDataService.createPersonnelEntityConfig(point, soldierIcon)
- : mockDataService.createDeviceEntityConfig(point, deviceIcon)
- viewer.entities.add(config)
- })
- console.log(`[index.vue] 已添加 ${allMockPoints.length} 个模拟点位`)
+ // 3. 添加模拟点位(人员和设备)- 已移至步骤10.5(地形就绪后)
+ // 原因:在地形加载前添加会导致相机飞行时标记悬浮
+ // const allMockPoints = mockDataService.getAllMockPoints()
+ // allMockPoints.forEach((point) => {
+ // const config =
+ // point.type === 'soldier'
+ // ? mockDataService.createPersonnelEntityConfig(point, soldierIcon)
+ // : mockDataService.createDeviceEntityConfig(point, deviceIcon)
+ // viewer.entities.add(config)
+ // })
+ // console.log(`[index.vue] 已添加 ${allMockPoints.length} 个模拟点位`)
- // 4. 添加路径起点标记(用于"一键启动")
- const allPaths = mockDataService.getAllAnimationPaths()
- Object.entries(allPaths).forEach(([pathId, path]) => {
- const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon
- const config = mockDataService.createPathStartMarkerConfig(
- { ...path, id: pathId },
- icon
- )
- viewer.entities.add(config)
- })
- console.log('[index.vue] 已添加 3 个路径起点标记')
+ // 4. 添加路径起点标记(用于"一键启动")- 已移至步骤10.5(地形就绪后)
+ // 原因:在地形加载前添加会导致相机飞行时标记悬浮
+ // const allPaths = mockDataService.getAllAnimationPaths()
+ // Object.entries(allPaths).forEach(([pathId, path]) => {
+ // const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon
+ // const config = mockDataService.createPathStartMarkerConfig(
+ // { ...path, id: pathId },
+ // icon
+ // )
+ // viewer.entities.add(config)
+ // })
+ // console.log('[index.vue] 已添加 3 个路径起点标记')
// 5. 设置地图点击事件监听
mapClickHandler.setupClickHandler(viewer, registerEventHandler, registerPostRenderListener)
@@ -781,6 +783,33 @@ const initializeScene = async () => {
console.log('[index.vue] 等待地形完全就绪...')
await new Promise(resolve => setTimeout(resolve, 1000))
+ // 10.5. 添加模拟点位和路径起点标记(在地形就绪后)
+ console.log('[index.vue] 添加模拟点位...')
+ const allMockPoints = mockDataService.getAllMockPoints()
+ allMockPoints.forEach((point) => {
+ const config =
+ point.type === 'soldier'
+ ? mockDataService.createPersonnelEntityConfig(point, soldierIcon)
+ : mockDataService.createDeviceEntityConfig(point, deviceIcon)
+ viewer.entities.add(config)
+ })
+ console.log(`[index.vue] 已添加 ${allMockPoints.length} 个模拟点位`)
+
+ // 添加路径起点标记(用于"一键启动")
+ const allPaths = mockDataService.getAllAnimationPaths()
+ Object.entries(allPaths).forEach(([pathId, path]) => {
+ const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon
+ const config = mockDataService.createPathStartMarkerConfig(
+ { ...path, id: pathId },
+ icon
+ )
+ viewer.entities.add(config)
+ })
+ console.log('[index.vue] 已添加 3 个路径起点标记')
+
+ // 触发立即渲染,确保 CLAMP_TO_GROUND 生效
+ viewer.scene.requestRender()
+
// 11. 加载应急资源数据(在地形就绪后)
console.log('[index.vue] 加载应急资源数据...')
await loadEmergencyResources(DISASTER_CENTER.lon, DISASTER_CENTER.lat)
From 994b237ea4cbf27b1729b165dc82ec8c700f80a2 Mon Sep 17 00:00:00 2001
From: Zzc <1373857752@qq.com>
Date: Tue, 25 Nov 2025 14:44:03 +0800
Subject: [PATCH 3/5] =?UTF-8?q?feat(3d-situational-awareness):=20=E4=B8=BA?=
=?UTF-8?q?=E5=8F=AF=E6=8A=98=E5=8F=A0=E9=9D=A2=E6=9D=BF=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E6=A0=87=E9=A2=98=E7=82=B9=E5=87=BB=E5=A4=84=E7=90=86=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
为 CollapsiblePanel 组件添加一个新的“title-click”事件,以允许父组件处理面板标题的点击。在 LeftPanel 中实现此功能,以便在点击“快速匹配”面板标题时触发“force-preset-toggle”事件。
---
.../components/LeftPanel/index.vue | 16 ++++++++++++++--
.../components/shared/CollapsiblePanel.vue | 10 +++++++---
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/packages/screen/src/views/3DSituationalAwarenessRefactor/components/LeftPanel/index.vue b/packages/screen/src/views/3DSituationalAwarenessRefactor/components/LeftPanel/index.vue
index f1ee671..a4662f1 100644
--- a/packages/screen/src/views/3DSituationalAwarenessRefactor/components/LeftPanel/index.vue
+++ b/packages/screen/src/views/3DSituationalAwarenessRefactor/components/LeftPanel/index.vue
@@ -13,7 +13,11 @@
-
+
@@ -110,7 +114,7 @@ const handleCloseVideoModal = () => {
}
// 定义对外事件
-const emit = defineEmits(['start-dispatch', 'view-plan'])
+const emit = defineEmits(['start-dispatch', 'view-plan', 'force-preset-toggle'])
/**
* 处理力量调度启动事件,向上传递给父组件
@@ -125,6 +129,14 @@ const handleStartDispatch = (payload) => {
const handleViewPlan = (plan) => {
emit('view-plan', plan)
}
+
+/**
+ * 处理快速匹配面板标题点击事件
+ */
+const handleForcePresetToggle = () => {
+ console.log('[LeftPanel] 快速匹配标题被点击')
+ emit('force-preset-toggle')
+}