jihongshun
2025-09-22 fd1a009c37bedda75e4ba1b1cb1eeaf3facecb04
bugfix
已修改2个文件
29 ■■■■ 文件已修改
src/utils/components/init-map.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/shootPoint/components/shootPointDialog.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/components/init-map.vue
@@ -287,7 +287,7 @@
  },
  beforeDestroy() {
    counter = 0
    this.removeKeyboardEvents();
    // this.removeKeyboardEvents();
    if (this.animationFrameId) cancelAnimationFrame(this.animationFrameId);
    window.removeEventListener("keydown", this.handleKeydown);
    if (viewerC) viewerC.destroy();
src/views/system/shootPoint/components/shootPointDialog.vue
@@ -467,7 +467,30 @@
      console.log(arr)
      console.log(this.treeData)
      // this.treeData = arr
      this.treeData = this.lastTableArr
      // this.treeData = this.lastTableArr
       this.treeData = arr.map((groundPoint, index) => {
        // 查找对应的新地面点数据
        const newGroundPoint = this.treeData[index];
        if (newGroundPoint && newGroundPoint.children) {
          // 更新每个地面点的子点经纬度
          groundPoint.children = groundPoint.children.map((child, childIndex) => {
            const newChild = newGroundPoint.children[childIndex];
            if (newChild) {
              return {
                ...child,
                longitude: newChild.longitude,
                latitude: newChild.latitude,
                height: newChild.height,
                heading: newChild.heading,
                pitch: newChild.pitch,
                actions: newChild.actions
              };
            }
            return child;
          });
        }
        return groundPoint;
      });
      const result = this.replaceCloseChildrenWithHighestPoint(this.treeData,mergeNumber);
      // const updated = this.insertRaisedPoints(result, 0,0, 236, 130);
      const updated = this.insertRaisedPoints(result, globalon, globalat, towerHeight);
@@ -507,7 +530,7 @@
      console.log(this.treeData)
    },
    //数组 塔的精度 塔的纬度  塔的高度  半径
    insertRaisedPoints(data, centerLon, centerLat, centerHeight, radius = 15) {
    insertRaisedPoints(data, centerLon, centerLat, centerHeight, radius = 1) {
      const center = Cesium.Cartesian3.fromDegrees(centerLon, centerLat, centerHeight);
      const result = JSON.parse(JSON.stringify(data)); // 深拷贝避免污染原数据
      const inserts = []; // 用于存储插入项及其目标位置