无人机管理后台前端(已迁走)
张含笑
2025-10-28 0f16db42e4e331bfaf084c27ca602c275e87668d
src/views/layerManagement/components/utils.js
@@ -61,6 +61,8 @@
      this.delPoint = this.delPoint.bind(this)
      // 外部订阅者
      this.listeners = []
      this.polygons = []; // 存储所有多边形数据 { id, positions, entity, pointsEntity }
      this.currentPolygonIndex = -1; // 当前操作的多边形索引
   }
   // 实体命名常量
@@ -351,9 +353,7 @@
   }
   // 鼠标右键点击(弹出菜单)
   handleRightClick(click) {
      console.log('click',click);
   handleRightClick(click) {
      const that = this
      if (that.drawingMode) return
      that.removeMenuPopup()
@@ -547,7 +547,8 @@
   initPolygon(viewer, positions, isPurePreview = false) {
      this.initHandler(viewer)
      this.isPureSpotPreview = isPurePreview
      // this.startDrawing()
      this.startDrawing()
      let newPosition = positions.map(item => {
         return Cesium.Cartesian3.fromDegrees(Number(item.lng), Number(item.lat), Number(item.height))
      })
@@ -578,7 +579,7 @@
   // 初始化事件处理器
   initHandler(viewer) {
      this.viewer = viewer
      // this.startDrawing()
      this.startDrawing()
      if (!this.handler) {
         this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas)