From 0b906280ec163a3e80364e091550d8462db6b9f9 Mon Sep 17 00:00:00 2001 From: jihongshun <1151753686@qq.com> Date: 星期四, 28 八月 2025 17:25:25 +0800 Subject: [PATCH] 更改默认值 --- src/views/system/project/components/addPorjectDialog.vue | 191 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 185 insertions(+), 6 deletions(-) diff --git a/src/views/system/project/components/addPorjectDialog.vue b/src/views/system/project/components/addPorjectDialog.vue index 9a082c5..cb12104 100644 --- a/src/views/system/project/components/addPorjectDialog.vue +++ b/src/views/system/project/components/addPorjectDialog.vue @@ -12,6 +12,7 @@ <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' @@ -66,6 +67,73 @@ </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> @@ -81,6 +149,80 @@ 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, @@ -93,7 +235,13 @@ showDevice:false, multipleSelection: [], showModel:false, - deviceId:null + deviceId:null, + drawer:false, + ruleForm:{ + autoFlightSpeed:14, + globalTransitionalSpeed:15 + }, + } }, methods:{ @@ -128,7 +276,7 @@ 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, @@ -347,7 +495,8 @@ label: groundPoint.targetName, longitude: groundPoint.longitude, latitude: groundPoint.latitude, - height: groundPoint.height + height: groundPoint.height, + actions:groundPoint.actions }] : []; // 鐢熸垚绌轰腑鐐� @@ -449,7 +598,7 @@ position: groundPos, point: { pixelSize: 6, - color: Cesium.Color.BLUE + color: Cesium.Color.RED }, label: { text: groundPoint.label || '', @@ -470,7 +619,7 @@ positions: [airPos, groundPos], width: 2, material: new Cesium.PolylineDashMaterialProperty({ - color: Cesium.Color.BLUE, + color: Cesium.Color.RED, dashLength: 8 }) } @@ -550,6 +699,7 @@ }, submit(){ console.log(this.treeData) + console.log(this.ruleForm) const routePointList = []; @@ -561,6 +711,7 @@ latitude: airPoint.latitude, height: airPoint.height, isStartAndEndPoint: false, + actions:airPoint.children[0].actions || [], coordinatePointReq: { height: airPoint.children[0].height, latitude:airPoint.children[0].latitude, @@ -580,8 +731,10 @@ 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: '鐢熸垚鑸嚎鎴愬姛', @@ -589,6 +742,32 @@ }) } }) + }, + 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 } } } -- Gitblit v1.9.3