From 0c92fd00fae033a2aa04bb65b2d32bd2c8f9fd4a Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 04 Feb 2026 15:48:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 applications/drone-command/src/components/map-container/device-map-container.vue |  104 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 86 insertions(+), 18 deletions(-)

diff --git a/applications/drone-command/src/components/map-container/device-map-container.vue b/applications/drone-command/src/components/map-container/device-map-container.vue
index e1f0a12..7d6383c 100644
--- a/applications/drone-command/src/components/map-container/device-map-container.vue
+++ b/applications/drone-command/src/components/map-container/device-map-container.vue
@@ -49,11 +49,10 @@
 import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue'
 import { buildEllipsePositions } from '@/utils/cesium/shapeTools'
 import { AREA_TYPE_STYLE_MAP, BUFFER_LEVEL_STYLES, DEFAULT_AREA_STYLE } from '@ztzf/constants'
-import { fwAreaDivideListApi } from '@/views/areaManage/partition/partitionApi'
 
-import { fwDefenseSceneManageListApi } from '@/views/areaManage/sceneManage/sceneManageApi'
+import { newAreaDivideList, newDefenseSceneManageList } from '@/api/dataCockpit/index'
 
-import { cockpitAggregationApi } from '@/api/dataCockpit'
+import { newCockpitAggregationApi } from '@/api/dataCockpit'
 import layerControlIcon from '@/assets/images/dataCockpit/layerControl.png'
 import equipmentIcon from '@/assets/images/dataCockpit/map/equipment.png'
 import offlineEquipmentIcon from '@/assets/images/dataCockpit/map/offline-equipment.png'
@@ -77,7 +76,7 @@
 const CLUSTER_HEIGHT = 100000
 const DETAIL_HEIGHT = 10000
 const POLYGON_HEIGHT_M = 0.2
-const DRONE_TRACK_DURATION_S = 10 * 60
+const DRONE_TRACK_DURATION_S = 30 * 60
 
 const props = defineProps({
 	allDevices: {
@@ -132,9 +131,9 @@
 let favoritePulseElapsed = 0
 const favoritePulseEntities = []
 const pulseBaseColor = Cesium.Color.fromCssColorString('#FF3B30')
-const PULSE_MIN_RADIUS_M = 60
-const PULSE_MAX_RADIUS_M = 180
-const PULSE_DURATION_S = 1.6
+const PULSE_MIN_RADIUS_M = 2
+const PULSE_MAX_RADIUS_M = 30
+const PULSE_DURATION_S = 1.4
 const detailVisible = ref(true)
 const clusterVisible = ref(false)
 const countyCenterMap = new Map()
@@ -217,24 +216,93 @@
 	return canvas
 }
 
+class PulseSphereMaterialProperty {
+	constructor(color, speed = 1.2, bands = 3.0, softness = 0.18) {
+		this._definitionChanged = new Cesium.Event()
+		this.color = color
+		this.speed = speed
+		this.bands = bands
+		this.softness = softness
+	}
+	get isConstant() {
+		return true
+	}
+	get definitionChanged() {
+		return this._definitionChanged
+	}
+	getType() {
+		return 'PulseSphereMaterial'
+	}
+	getValue(_time, result = {}) {
+		result.color = this.color
+		result.time = (performance.now() / 1000) * this.speed
+		result.bands = this.bands
+		result.softness = this.softness
+		return result
+	}
+	equals(other) {
+		return (
+			other instanceof PulseSphereMaterialProperty &&
+			Cesium.Color.equals(this.color, other.color) &&
+			this.speed === other.speed &&
+			this.bands === other.bands &&
+			this.softness === other.softness
+		)
+	}
+}
+
+let pulseSphereMaterial = null
+const getPulseSphereMaterial = () => {
+	if (pulseSphereMaterial) return pulseSphereMaterial
+	Cesium.Material._materialCache.addMaterial('PulseSphereMaterial', {
+		fabric: {
+			type: 'PulseSphereMaterial',
+			uniforms: {
+				color: pulseBaseColor.withAlpha(0.45),
+				time: 0,
+				bands: 3.0,
+				softness: 0.18,
+			},
+			source: `
+				czm_material czm_getMaterial(czm_materialInput materialInput)
+				{
+					czm_material material = czm_getDefaultMaterial(materialInput);
+					vec3 normalEC = normalize(materialInput.normalEC);
+					vec3 viewEC = normalize(-materialInput.positionToEyeEC);
+					float ndv = max(dot(normalEC, viewEC), 0.0);
+					float fresnel = pow(1.0 - ndv, 1.6);
+					float wave = sin((ndv * bands + time) * 6.2831853);
+					float ring = smoothstep(-softness, softness, wave);
+					float alpha = (ring * 0.6 + fresnel * 0.4) * color.a;
+					material.diffuse = color.rgb;
+					material.alpha = alpha;
+					return material;
+				}
+			`,
+		},
+		translucent: () => true,
+	})
+	pulseSphereMaterial = new PulseSphereMaterialProperty(pulseBaseColor.withAlpha(0.45), 1.1, 3.2, 0.22)
+	return pulseSphereMaterial
+}
+
 const createFavoritePulseEntity = (billboard) => {
 	if (!viewer || !billboard) return
-	const material = new Cesium.ImageMaterialProperty({
-		image: getPulseCanvas(),
-		transparent: true,
-	})
+	const material = getPulseSphereMaterial()
 	const pulse = {
 		material,
 		offset: Math.random() * PULSE_DURATION_S,
 		entity: null,
 	}
+	const getPulseRadius3D = () => {
+		const radius = getPulseRadius(pulse)
+		return new Cesium.Cartesian3(radius, radius, radius)
+	}
 	pulse.entity = viewer.entities.add({
 		position: new Cesium.CallbackProperty(() => getBillboardPosition(billboard), false),
-		ellipse: {
-			semiMajorAxis: new Cesium.CallbackProperty(() => getPulseRadius(pulse), false),
-			semiMinorAxis: new Cesium.CallbackProperty(() => getPulseRadius(pulse), false),
+		ellipsoid: {
+			radii: new Cesium.CallbackProperty(() => getPulseRadius3D(), false),
 			material,
-			heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
 		},
 	})
 	favoritePulseEntities.push(pulse)
@@ -1073,7 +1141,7 @@
 const loadPartitions = async () => {
 	if (!viewer) return
 	try {
-		const res = await fwAreaDivideListApi({
+		const res = await newAreaDivideList({
 			isSetSceneManage: 1,
 			flyTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
 		})
@@ -1226,7 +1294,7 @@
 
 const loadAggregation = async () => {
 	try {
-		const res = await cockpitAggregationApi({
+		const res = await newCockpitAggregationApi({
 			effectiveRangeKmIsNotNull: 1
 		})
 		renderAggregation(res?.data?.data ?? [])
@@ -1237,7 +1305,7 @@
 
 const loadCommandPosts = async () => {
 	try {
-		const res = await fwDefenseSceneManageListApi({
+		const res = await newDefenseSceneManageList({
 			time: dayjs().format('YYYY-MM-DD HH:mm:ss')
 		})
 		renderCommandPosts(res?.data?.data ?? [])

--
Gitblit v1.9.3