feat:智飞工单已审核通过的工单详情,地图航线显示处理
| | |
| | | * @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(() => { |
| | |
| | | execute_height_mode: '', |
| | | auto_flight_speed: '', |
| | | wayline_type: '', |
| | | infos: {} |
| | | }) |
| | | |
| | | const routeLineListClick = async data => { |
| | |
| | | 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 } = |
| | |
| | | execute_height_mode, |
| | | auto_flight_speed, |
| | | wayline_type, |
| | | infos: infos |
| | | } |
| | | |
| | | cb(curRouteLineData.value.polygonList.map(item => [Number(item[0]), Number(item[1])])) |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | let pointList = handlePointListForKmz({ |
| | | placemark: data, |
| | | startPoint: curRouteLineData.value.startPoint, |
| | |
| | | |
| | | pointList.shift() |
| | | |
| | | const routePositions = pointList.map(i => Cesium.Cartesian3.fromDegrees(Number(i.longitude), Number(i.latitude), Number(i.height))) |
| | | let dronePosition = {} |
| | | if (JSON.stringify(curRouteLineData.value.infos) != '{}') dronePosition = { |
| | | longitude: curRouteLineData.value.infos[0].longitude, |
| | | latitude: curRouteLineData.value.infos[0].latitude, |
| | | height: curRouteLineData.value.infos[0].height || 0, |
| | | } |
| | | |
| | | const routePositions = [dronePosition, ...pointList].map(i => Cesium.Cartesian3.fromDegrees(Number(i.longitude), Number(i.latitude), Number(i.height))) |
| | | |
| | | previewDataSource.entities.add({ |
| | | polyline: { |
| | |
| | | this.initMapLine() |
| | | }, |
| | | |
| | | initMapLine (cb = () => { }) { |
| | | initMapLine (infos = {}, cb = () => { }) { |
| | | let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id) |
| | | |
| | | if (!currentLine) return |
| | |
| | | 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 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | |
| | | that.device_sns = [] |
| | | |
| | | this.initMapLine(async (polygon) => { |
| | | this.initMapLine({}, async (polygon) => { |
| | | const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId) |
| | | |
| | | //按照航线来 |