无人机管理后台前端(已迁走)
chenyao
2025-11-12 933098a9244860d4b9f2f74f492741ce57293760
feat:提交返航高度对比
2 files modified
34 ■■■■ changed files
src/api/tickets/orderLog.js 9 ●●●●● patch | view | raw | blame | history
src/views/tickets/orderLog.vue 25 ●●●●● patch | view | raw | blame | history
src/api/tickets/orderLog.js
@@ -86,6 +86,15 @@
  });
};
// 获取返航最高 高度
export const getWaylineMaxTerrainHeight = data => {
    return request({
        url: `/drone-odm/odmTaskInfo/odmTaskInfo/getWaylineMaxTerrainHeight`,
        method: 'post',
        data,
    })
}
src/views/tickets/orderLog.vue
@@ -555,7 +555,8 @@
  orderLogExport,
  jobStatusNum,
  userPublish,
  deleteOrderLog
  deleteOrderLog,
  getWaylineMaxTerrainHeight
} from '@/api/tickets/orderLog'
import { getTicketInfo } from '@/api/tickets/ticket'
import { getDictionaryByCode } from '@/api/system/dictbiz'
@@ -996,15 +997,21 @@
          const maxItem = checkedList.reduce((max, item) => {
            return item.drone_height > max.drone_height ? item : max;
          });
          console.log(maxItem.drone_height, '高度');
          console.log(this.lastHeight, '最后一点高度');
          let result = _.round((maxItem.drone_height + this.form.rth_altitude), 2);
          // 返航绝对高度
          let backHeight = this.form.rth_altitude // + maxItem.drone_height
          console.log(backHeight,'backHeight')
          // 安全起飞高度
          this.positionsArr.unshift({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height })
          this.positionsArr.push({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height})
          let resultHeight = 0
          await getWaylineMaxTerrainHeight(this.positionsArr).then(res => {
            resultHeight = this.safeHeight > (res.data.data + 30) ? this.safeHeight : (res.data.data + 30)
          })
          let valueHeight = _.round(backHeight - resultHeight, 2)
          console.log('打印比较值', valueHeight)
          let resultHeight = this.lastHeight - maxItem.drone_height
          let resultH = _.round(resultHeight, 2)
          if (this.lastHeight > result) {
            this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', {
          if (valueHeight < 0) {
            this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultHeight}米以上后进行发布`, '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'