jihongshun
8 天以前 c110295e9d7e87ec5012e37ad5ba2b38f745ccd3
优化线的逻辑
已修改2个文件
29 ■■■■ 文件已修改
src/utils/components/init-map.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/shootPoint/components/shootPointDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/components/init-map.vue
@@ -180,6 +180,7 @@
        cameraT:0.0,
        pointGround: { lon: 0, lat: 0, height: 0 },
        pointFly: { lon: 0, lat: 0, height: 0 },
        rowData:null
    }
  },
  mounted(){
@@ -322,6 +323,7 @@
    creatPin(id, position, font, color, viewer) {
      let pinBuilder = new Cesium.PinBuilder();
      let addPin = viewer.entities.getById(id);
      console.log(addPin)
      if (addPin == undefined) {
        viewer.entities.add({
          id: id,
@@ -617,6 +619,13 @@
            const gure = Cesium.Cartesian3.distance(point1, point2)
            this.betweenDistance  = gure
        }
        if(this.rowData) {
          this.pointGround = {
            lon:this.rowData.longitude,
            lat:this.rowData.latitude,
            height:this.rowData.height
          }
        }
        this.pointFly = { 
          lon: lon, 
          lat: lat, 
@@ -820,7 +829,9 @@
              label: `空中点${idx}`,
              longitude: Cesium.Math.toDegrees(aerialPos.longitude),
              latitude: Cesium.Math.toDegrees(aerialPos.latitude),
              height: aerialPos.height
              height: aerialPos.height,
              heading:Cesium.Math.toDegrees(viewerC.camera.heading),
              pitch:Cesium.Math.toDegrees(viewerC.camera.pitch)
            }
          ]
        };
@@ -1139,6 +1150,18 @@
      return Math.asin(directionLocal.z); // z轴向上
    },
    DealVisualCone(data,node){
      this.rowData = data
      console.log(data)
      this.pointGround = {
        lon:data.children[0].longitude,
        lat:data.children[0].latitude,
        height:data.children[0].height
      }
      this.pointFly = {
        lon:data.longitude,
        lat:data.latitude,
        height:data.height
      }
      if(data.children && data.children?.length > 0) {
        preVideoScopePrimitiveArrTie.map((item)=>{
          if(item.name != data.children[0].label){
src/views/system/shootPoint/components/shootPointDialog.vue
@@ -228,12 +228,12 @@
        //点击父级
        const from = [data.children[0].longitude,data.children[0].latitude, data.children[0].height];
        const to = [data.longitude,data.latitude, data.height];      
        this.flyToAndLookAt(from, to);
        // this.flyToAndLookAt(from, to);
      } else  {
        //点击子级
        const from = [data.longitude,data.latitude, data.height]; 
        const to = [node.parent?.data?.longitude,node.parent?.data?.latitude, node.parent?.data?.height]; 
        this.flyToAndLookAt(from, to);
        // this.flyToAndLookAt(from, to);
      }
      this.$refs.initMap.DealVisualCone(data,node)
    },