| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="安全返航真高" prop="rth_altitude"> |
| | | <el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height"> |
| | | <el-input-number |
| | | v-model="form.rth_altitude" |
| | | :min="50" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="关联航线" prop="file_id"> |
| | | <el-select |
| | | v-model="form.file_id" |
| | |
| | | :value="item.wayline_id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="关联航线" prop="file_id"> |
| | | <el-select v-model="form.file_id" placeholder="请选择航线" :disabled="true"> |
| | | <el-option |
| | |
| | | :value="item.wayline_id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </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-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | const maxItem = this.device_sns.reduce((max, item) => { |
| | | return item.drone_height > max.drone_height ? item : max; |
| | | }); |
| | | console.log(maxItem, '高度'); |
| | | console.log(maxItem.drone_height, '高度'); |
| | | console.log(this.lastHeight, '最后一点高度'); |
| | | let result = _.round((maxItem.drone_height + this.form.rth_altitude), 2); |
| | | |
| | | let resultHeight = this.lastHeight - maxItem.drone_height |
| | | let resultH = _.round(resultHeight, 2) |
| | | |
| | | if (this.lastHeight > result) { |
| | | this.$confirm(`安全返航真高${result}米低于航线返航点高度${this.lastHeight}米,为确保返航路径安全,建议您进行调整后再发布`, '提示', { |
| | | this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | |
| | | justify-content: center; |
| | | } |
| | | |
| | | .safe-height { |
| | | :deep(.el-form-item__label) { |
| | | width: 120px !important; |
| | | } |
| | | :deep(.el-input-number) { |
| | | width: 180px !important; |
| | | } |
| | | } |
| | | |
| | | .flex { |
| | | display: flex; |
| | | } |