吉安感知网项目-前端
罗广辉
2026-01-17 c53aab006b9db28e62381dba4fca4d77ec3566b0
applications/drone-command/src/views/detectionCountermeasure/detectionRange/DetectionRangeDialog.vue
@@ -9,7 +9,15 @@
   >
      <div class="dialog-container">
         <div class="left-container">
            <div class="leftMap command-cesium" id="detectionRangeMap"></div>
            <CommonCesiumMap
               ref="mapRef"
               class="leftMap command-cesium"
               :active="visible"
               :flat-mode="false"
               :terrain="true"
               :layer-mode="4"
               :boundary="false"
            />
         </div>
         <div class="right-container">
@@ -138,7 +146,7 @@
   detectionRangePageApi,
   detectionRangeSubmitApi,
} from '@/api/detectionCountermeasure/detectionRange'
import { PublicCesium } from '@/utils/cesium/publicCesium'
import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue'
import * as Cesium from 'cesium'
import deviceZcImg from '@/assets/images/dataCockpit/device-zc.svg'
@@ -161,6 +169,7 @@
const submitting = ref(false) // 提交中
const deviceOptions = ref([])
const dialogReadonly = computed(() => dialogMode.value === 'view')
const mapRef = ref(null)
let viewer
let redPointEntity
let rangeCircleEntity
@@ -338,17 +347,12 @@
function initMap() {
   if (viewer) return
   const publicCesiumInstance = new PublicCesium({
      dom: 'detectionRangeMap',
      flatMode: false,
      terrain: true,
      layerMode: 4,
      boundary: false,
   })
   const map = mapRef.value?.getMap()
   if (!map?.viewer) return
   viewer = map.viewer
   if (!dialogReadonly.value) {
      publicCesiumInstance.addLeftClickEvent(null, handleMapClick)
      map.publicCesium?.addLeftClickEvent?.(null, handleMapClick)
   }
   viewer = publicCesiumInstance.getViewer()
}
function handleMapClick(click) {