| | |
| | | |
| | | // 获取返航最高 高度 |
| | | export const getWaylineMaxTerrainHeight = data => { |
| | | return request({ |
| | | url: `/drone-odm/odmTaskInfo/odmTaskInfo/getWaylineMaxTerrainHeight`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | return request({ |
| | | url: `/drone-odm/odmTaskInfo/odmTaskInfo/getWaylineMaxTerrainHeight`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | resetCurRouteLineData() |
| | | |
| | | const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed } = |
| | | const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed, take_off_security_height } = |
| | | await analysisPointLineKmz(kmzUrl) |
| | | |
| | | curRouteLineData.value = { |
| | |
| | | execute_height_mode, |
| | | auto_flight_speed, |
| | | wayline_type, |
| | | take_off_security_height, |
| | | infos: infos |
| | | } |
| | | |
| | |
| | | height: 50, |
| | | }, |
| | | }) |
| | | // 获取最后一点高度 |
| | | console.log(pointList, '查看数组最后一点高度') |
| | | store.commit('setLastHeight', Number(pointList[pointList.length - 1].height)) |
| | | // 获取航线拆分所有点 |
| | | store.commit('setPositionsArr', pointList) |
| | | // 获取安全起飞高度 |
| | | store.commit('setSafeHeight', curRouteLineData.value.take_off_security_height) |
| | | flyVisual({ |
| | | positionsData:pointList.map(i => [Number(i.longitude), Number(i.latitude), Number(i.height)]), |
| | | viewer, |
| | |
| | | execute_height_mode: '', |
| | | auto_flight_speed: '', |
| | | wayline_type: '', |
| | | take_off_security_height: '' |
| | | } |
| | | } |
| | | |
| | |
| | | htsjzx: 100, //数据中心 |
| | | htlsrwxq: 100, //历史任务详情 |
| | | }, |
| | | lastHeight: 0, // 获取最后一点高度 |
| | | safeHeight: 0, // 获取选择航线高度 |
| | | positionsArr: [], // 获取选择航线点数据 |
| | | }, |
| | | mutations: { |
| | | setLastHeight(state, data) { |
| | | state.lastHeight = data |
| | | setSafeHeight (state, data) { |
| | | state.safeHeight = data |
| | | }, |
| | | setPositionsArr(state, data) { |
| | | state.positionsArr = data |
| | | }, |
| | | setDownloadProgress(state, data) { |
| | | state.downloadProgress = data |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height"> |
| | | <el-input-number v-model="form.rth_altitude" :min="50" :max="300"></el-input-number> |
| | | <el-input-number v-model="form.rth_altitude" :min="50" :max="500"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height"> |
| | | <el-input-number :disabled="detailTitle === '工单详情'" v-model="form.rth_altitude" :min="50" |
| | | :max="300"></el-input-number> |
| | | :max="500"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height"> |
| | | <el-input-number :disabled="true" v-model="form.rth_altitude" :min="50" :max="300"></el-input-number> |
| | | <el-input-number :disabled="true" v-model="form.rth_altitude" :min="50" :max="500"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | orderLogExport, |
| | | jobStatusNum, |
| | | userPublish, |
| | | deleteOrderLog |
| | | deleteOrderLog, |
| | | getWaylineMaxTerrainHeight |
| | | } from '@/api/tickets/orderLog' |
| | | import { getTicketInfo } from '@/api/tickets/ticket' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | |
| | | return CircleClose |
| | | }, |
| | | ...mapGetters(['userInfo', 'permission']), |
| | | lastHeight () { |
| | | const height = this.$store.state.common.lastHeight |
| | | return Number(height) || 0 // 确保是数字类型 |
| | | safeHeight () { |
| | | const safeHeight = this.$store.state.common.safeHeight |
| | | return Number(safeHeight) || 0 // 确保是数字类型 |
| | | }, |
| | | positionsArr () { |
| | | const positionsArr = this.$store.state.common.positionsArr |
| | | return positionsArr || [] // 确保是数字类型 |
| | | }, |
| | | filteredTabs () { |
| | | // rejection_and_draft 权限控制“已驳回”和“草稿”tab |
| | |
| | | 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') |
| | | // 安全起飞高度 |
| | | let positions = this.positionsArr |
| | | positions.unshift({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height }) |
| | | positions.push({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height}) |
| | | let resultHeight = 0 |
| | | await getWaylineMaxTerrainHeight(positions).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' |