| | |
| | | <div class="chooseModel"> |
| | | <div class="fontJust">设备列表</div> |
| | | <el-button @click="addDevice"> 新增</el-button> |
| | | <el-button @click="lineSet"> 航线设置</el-button> |
| | | <el-table |
| | | :data="tableData" |
| | | max-height = '180' |
| | |
| | | </el-dialog> |
| | | <chooseDeviceDialog v-if="showDevice" @cancel ='cancel' @dealChooseArr="dealChooseArr" ></chooseDeviceDialog> |
| | | <chooseModelDialog v-if="showModel" @cancelModel ='cancelModel' @receiveModel="receiveModel" :deviceId="deviceId"></chooseModelDialog> |
| | | <el-drawer |
| | | title="航线设置" |
| | | :visible.sync="drawer" |
| | | direction="rtl"> |
| | | <el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-form-item label="起飞爬升" prop="flyToWaylineMode"> |
| | | <el-select v-model="ruleForm.flyToWaylineMode" placeholder="起飞爬升"> |
| | | <el-option v-for="dict in dji_fly_type" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="全局航线速度" prop="autoFlightSpeed"> |
| | | <div class="speed-control"> |
| | | <el-input-number |
| | | v-model="ruleForm.autoFlightSpeed" |
| | | :min="1" |
| | | :max="15" |
| | | :step="1" |
| | | controls-position="both" |
| | | @change="handleChangeAutoFlightSpeed" |
| | | /> |
| | | <span class="unit">m/s</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="起飞速度" prop="globalTransitionalSpeed"> |
| | | <div class="speed-control"> |
| | | <el-input-number |
| | | v-model="ruleForm.globalTransitionalSpeed" |
| | | :min="1" |
| | | :max="15" |
| | | :step="1" |
| | | controls-position="both" |
| | | @change="handleChangeGlobalTransitionalSpeed" |
| | | /> |
| | | <span class="unit">m/s</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="航点类型" prop="globalWaypointTurnMode"> |
| | | <el-select v-model="ruleForm.globalWaypointTurnMode" placeholder="航点类型"> |
| | | <el-option v-for="dict in dji_global_waypoint_turn_mode" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="飞行器偏航角模式" prop="mappingHeadingMode"> |
| | | <el-select v-model="ruleForm.mappingHeadingMode" placeholder="飞行器偏航角模式"> |
| | | <el-option v-for="dict in dji_mapping_heading_mode" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="航点间云台俯仰角控制模式" prop="gimbalPitchMode"> |
| | | <el-select v-model="ruleForm.gimbalPitchMode" placeholder="飞行器偏航角模式"> |
| | | <el-option v-for="dict in dji_gimbal_pitch_mode" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="完成动作" prop="finishAction"> |
| | | <el-select v-model="ruleForm.finishAction" placeholder="起飞爬升"> |
| | | <el-option v-for="dict in dji_finish_type" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> |
| | | <el-button @click="resetForm('ruleForm')">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-drawer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | chooseDeviceDialog, |
| | | chooseModelDialog |
| | | }, |
| | | props: { |
| | | model_dji_execute_typetype: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_execute_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_finish_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_fly_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_exitlost_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_drone_value_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_template_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_execute_height_type: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_auto_flight_speed: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_global_waypoint_turn_mode: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_mapping_heading_mode: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | dji_gimbal_pitch_mode: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | }, |
| | | data(){ |
| | | return{ |
| | | dialogVisible :true, |
| | |
| | | showDevice:false, |
| | | multipleSelection: [], |
| | | showModel:false, |
| | | deviceId:null |
| | | deviceId:null, |
| | | drawer:false, |
| | | ruleForm:{ |
| | | autoFlightSpeed:14, |
| | | globalTransitionalSpeed:15 |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | methods:{ |
| | |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER, |
| | | font: '28px Helvetica', |
| | | outlineColor: Cesium.Color.BLUE, |
| | | outlineColor: Cesium.Color.RED, |
| | | outlineWidth: 3, |
| | | fillColor: Cesium.Color.fromCssColorString('#FFFFFF'), //44c3cc |
| | | text: row.deviceName, |
| | |
| | | label: groundPoint.targetName, |
| | | longitude: groundPoint.longitude, |
| | | latitude: groundPoint.latitude, |
| | | height: groundPoint.height |
| | | height: groundPoint.height, |
| | | actions:groundPoint.actions |
| | | }] : []; |
| | | |
| | | // 生成空中点 |
| | |
| | | position: groundPos, |
| | | point: { |
| | | pixelSize: 6, |
| | | color: Cesium.Color.BLUE |
| | | color: Cesium.Color.RED |
| | | }, |
| | | label: { |
| | | text: groundPoint.label || '', |
| | |
| | | positions: [airPos, groundPos], |
| | | width: 2, |
| | | material: new Cesium.PolylineDashMaterialProperty({ |
| | | color: Cesium.Color.BLUE, |
| | | color: Cesium.Color.RED, |
| | | dashLength: 8 |
| | | }) |
| | | } |
| | |
| | | }, |
| | | submit(){ |
| | | console.log(this.treeData) |
| | | console.log(this.ruleForm) |
| | | |
| | | const routePointList = []; |
| | | |
| | |
| | | latitude: airPoint.latitude, |
| | | height: airPoint.height, |
| | | isStartAndEndPoint: false, |
| | | actions:airPoint.children[0].actions || [], |
| | | coordinatePointReq: { |
| | | height: airPoint.children[0].height, |
| | | latitude:airPoint.children[0].latitude, |
| | |
| | | let params = { |
| | | routePointList:routePointList |
| | | } |
| | | this.ruleForm.routePointList = routePointList |
| | | console.log(this.ruleForm) |
| | | console.log('生成航线') |
| | | buildKmz(params).then(res=>{ |
| | | buildKmz(this.ruleForm).then(res=>{ |
| | | if(res.code == 200) { |
| | | this.$message({ |
| | | message: '生成航线成功', |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | lineSet(){ |
| | | this.drawer =true |
| | | }, |
| | | handleChangeAutoFlightSpeed(value){ |
| | | console.log(value) |
| | | this.ruleForm.autoFlightSpeed = value |
| | | }, |
| | | handleChangeGlobalTransitionalSpeed(value){ |
| | | console.log(value) |
| | | this.ruleForm.globalTransitionalSpeed = value |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | // alert('submit!'); |
| | | console.log(this.ruleForm) |
| | | this.drawer = false |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | resetForm(){ |
| | | this.drawer = false |
| | | } |
| | | } |
| | | } |