jihongshun
2025-09-01 a609467768fe6430815c93f27be829539d40c095
生成航线支持下载
已修改2个文件
43 ■■■■ 文件已修改
src/views/system/project/components/addPorjectDialog.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/shootPoint/components/shootPointDialog.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/project/components/addPorjectDialog.vue
@@ -740,6 +740,12 @@
              message: '生成航线成功',
              type: 'success'
            })
            const link = document.createElement('a');
            link.href = res.msg;  // 设置下载链接
            // link.download = 'filename.ext';  // 可选:指定文件名
            document.body.appendChild(link);  // 将链接添加到 DOM
            link.click();  // 模拟点击下载
            document.body.removeChild(link);  // 下载后移除链接
        }
      })
    },
src/views/system/shootPoint/components/shootPointDialog.vue
@@ -62,11 +62,11 @@
                                      class="action-icon"
                                      @click.stop="clickItem(action)">
                  
                                  <img src="@/assets/images/xuanting.svg" alt="svg图片" v-if="action.type==='悬停'" />
                                  <img src="@/assets/images/photo.svg" alt="svg图片" v-if="action.type==='拍照'" />
                                  <img src="@/assets/images/startVideo.svg" alt="svg图片" v-if="action.type==='开始录像'" />
                                  <img src="@/assets/images/stopVideo.svg" alt="svg图片" v-if="action.type==='结束录像'" />
                                  <img src="@/assets/images/zoom.svg" alt="svg图片" v-if="action.type==='变焦'" />
                                  <img src="@/assets/images/xuanting.svg" alt="svg图片" v-if="action.type==='悬停'" title="悬停"/>
                                  <img src="@/assets/images/photo.svg" alt="svg图片" v-if="action.type==='拍照'" title="拍照"/>
                                  <img src="@/assets/images/startVideo.svg" alt="svg图片" v-if="action.type==='开始录像'" title="开始录像"/>
                                  <img src="@/assets/images/stopVideo.svg" alt="svg图片" v-if="action.type==='结束录像'" title="结束录像"/>
                                  <img src="@/assets/images/zoom.svg" alt="svg图片" v-if="action.type==='变焦'" title="变焦"/>
                                  <!-- <i v-if="action.type==='拍照'" class="el-icon-video-camera"></i> -->
                                </span>
                              </div>
@@ -159,6 +159,7 @@
          console.log(res.data)
          this.getRowData(res.data)
          let drawArr = this.convertToTree(res.data.ardListWayPointsLS)
          console.log(drawArr)
          setTimeout(() => {
            //渲染时间问题 加个延时器
            this.drawLines(drawArr)
@@ -340,14 +341,16 @@
      // 2. 每个空中点与地面点用蓝色虚线连接
      treeData.forEach(point => {
        const airPos = Cesium.Cartesian3.fromDegrees(point.longitude, point.latitude, point.height);
        this.addLabel(point)
        point.children.forEach(child => {
          const groundPos = Cesium.Cartesian3.fromDegrees(child.longitude, child.latitude, child.height);
          this.addLabel(child)
          viewer.entities.add({
            polyline: {
              positions: [airPos, groundPos],
              width: 1,
              material: new Cesium.PolylineDashMaterialProperty({
                color: Cesium.Color.BLUE,
                color: Cesium.Color.RED,
                dashLength: 8
              })
            }
@@ -355,6 +358,28 @@
        });
      });
    },
    addLabel(point) {
      const position = Cesium.Cartesian3.fromDegrees(
        point.longitude,
        point.latitude,
        point.height
      );
      let viewer = window.viewerM
      // Create a label entity
      viewer.entities.add({
        position: position,
        label: {
          text: point.label,
          font: "14px sans-serif",
          fillColor: Cesium.Color.WHITE,
          backgroundColor: Cesium.Color.BLACK,
          style: Cesium.LabelStyle.FILL_AND_OUTLINE,
          outlineWidth: 2,
          horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
          verticalOrigin: Cesium.VerticalOrigin.BOTTOM
        }
      });
    },
    addPoint(viewer, position, color, label) {
      viewer.entities.add({
        name: label,