无人机管理后台前端(已迁走)
shuishen
2025-06-14 7df04e699ff6538da079478962d1873c8e8e87ae
Merge branch 'master' into test
3 files modified
25 ■■■■ changed files
src/components/map-container/mapContainer.vue 2 ●●● patch | view | raw | blame | history
src/hooks/useRouteLine/useRouteLine.js 16 ●●●● patch | view | raw | blame | history
src/views/tickets/orderLog.vue 7 ●●●●● patch | view | raw | blame | history
src/components/map-container/mapContainer.vue
@@ -113,7 +113,7 @@
 * @param data 数据  数据格式 [[lng, lat], [lng, lat], [lng, lat]]
 */
async function addPolyline (data) {
    await renderPreviewLine(data.url, data.type, data.cb)
    await renderPreviewLine(data.url, data.type, data.cb, data.infos)
}
onMounted(() => {
src/hooks/useRouteLine/useRouteLine.js
@@ -33,6 +33,7 @@
        execute_height_mode: '',
        auto_flight_speed: '',
        wayline_type: '',
        infos: {}
    })
    const routeLineListClick = async data => {
@@ -42,7 +43,9 @@
        await renderRouteLine(data.data)
    }
    async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }) {
    async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }, infos = {}) {
        resetCurRouteLineData()
        const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed } =
@@ -55,6 +58,7 @@
            execute_height_mode,
            auto_flight_speed,
            wayline_type,
            infos: infos
        }
        cb(curRouteLineData.value.polygonList.map(item => [Number(item[0]), Number(item[1])]))
@@ -130,8 +134,6 @@
            })
        }
        let pointList = handlePointListForKmz({
            placemark: data,
            startPoint: curRouteLineData.value.startPoint,
@@ -141,6 +143,14 @@
        pointList.shift()
        if (JSON.stringify(curRouteLineData.value.infos) != '{}') {
            pointList.unshift({
                longitude: curRouteLineData.value.infos[0].longitude,
                latitude: curRouteLineData.value.infos[0].latitude,
                height: curRouteLineData.value.infos[0].height || 0,
            })
        }
        const routePositions = pointList.map(i => Cesium.Cartesian3.fromDegrees(Number(i.longitude), Number(i.latitude), Number(i.height)))
        previewDataSource.entities.add({
src/views/tickets/orderLog.vue
@@ -1056,7 +1056,7 @@
      this.initMapLine()
    },
    initMapLine (cb = () => { }) {
    initMapLine (infos = {}, cb = () => { }) {
      let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id)
      if (!currentLine) return
@@ -1066,7 +1066,8 @@
          this.$refs.MapContainer.initAddEntity('polyline', {
            url: `${import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key}?_t=${new Date().getTime()}`,
            type: currentLine.wayline_type,
            cb
            cb,
            infos
          })
        }
      })
@@ -1078,7 +1079,7 @@
      that.device_sns = []
      this.initMapLine(async (polygon) => {
      this.initMapLine({}, async (polygon) => {
        const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId)
        //按照航线来