| | |
| | | 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 |
| | | let valueHeight = 0 |
| | | await getWaylineMaxTerrainHeight(positions).then(res => { |
| | | resultHeight = this.safeHeight > (res.data.data + 30) ? this.safeHeight : (res.data.data + 30) |
| | | resultHeight = (this.safeHeight+maxItem.drone_height) > (res.data.data + 30) ? (this.safeHeight+maxItem.drone_height) : (res.data.data + 30) |
| | | valueHeight = (resultHeight - maxItem.drone_height) > backHeight ? _.round(resultHeight - maxItem.drone_height) : 0 |
| | | }) |
| | | let valueHeight = _.round(backHeight - resultHeight, 2) |
| | | |
| | | console.log('打印比较值', valueHeight) |
| | | |
| | | if (valueHeight < 0) { |
| | | this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultHeight}米以上后进行发布`, '提示', { |
| | | if (valueHeight > 0) { |
| | | this.$confirm(`当前返航高度存在安全隐患,建议调整为${valueHeight}米以上后进行发布`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |