01686fa18ef51e970ccd17d199e26a5ccfa9e074..0b906280ec163a3e80364e091550d8462db6b9f9
3 天以前 jihongshun
更改默认值
0b9062 对比 | 目录
3 天以前 jihongshun
创建项目全区配置参数
262867 对比 | 目录
已修改4个文件
248 ■■■■ 文件已修改
src/utils/components/init-map.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/project/components/addPorjectDialog.vue 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/project/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/shootPoint/components/shootPointDialog.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/components/init-map.vue
@@ -262,10 +262,10 @@
        pointFly: { lon: 0, lat: 0, height: 0 },
        rowData:null,
        time: 10,
        takePhoto: '111',  // 初始数据
        takePhoto: '默认名称',  // 初始数据
        newTakePhoto: '',  // 编辑时的新数据
        isEditingPhoto: false,  // 控制是否处于编辑状态
        takeVideo: '111',  // 初始数据
        takeVideo: '默认名称',  // 初始数据
        newTakeVideo: '',  // 编辑时的新数据
        isEditingVideo: false,  // 控制是否处于编辑状态
        actionCounter:0,
@@ -1371,10 +1371,10 @@
      console.log(point)
      this.$emit('dealAction',point)
      this.time = 10
      this.newTakePhoto = '111'
      this.newTakeVideo = '111'
      this.takeVideo = '111'
      this.takePhoto = '111'
      this.newTakePhoto = '默认名称'
      this.newTakeVideo = '默认名称'
      this.takeVideo = '默认名称'
      this.takePhoto = '默认名称'
      // 切换到右侧
      this.currentAction = action;
    },
@@ -1470,6 +1470,7 @@
  background-color:#232323;
  /* height: calc(100% - 55px); */
  height: calc(100% - 5px);
  height: calc(100% +  15px);
  width: 100%;
}
.flyData{
@@ -1489,7 +1490,7 @@
.groundPoi {
  position: absolute;
  top: 15px;
  left: 350px;
  left: 340px;
}
.moveResult{position:absolute;z-index:2;background-color:rgba(47,53,60,1);padding:0 5px;right:50%;bottom:30px;
    border:1px solid rgba(255,255,255,.1);box-sizing:content-box;width:220px;height:30px;font-size:14px;text-align:center}
src/views/system/project/components/addPorjectDialog.vue
@@ -71,65 +71,61 @@
      title="航线设置"
      :visible.sync="drawer"
      direction="rtl">
      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <el-form-item label="起飞爬升" prop="region">
          <el-select v-model="ruleForm.region" placeholder="请选择起飞爬升">
            <el-option label="垂直" value="垂直"></el-option>
            <el-option label="倾斜" value="倾斜"></el-option>
      <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="region">
        <el-form-item label="全局航线速度" prop="autoFlightSpeed">
          <div class="speed-control">
            <el-input-number
              v-model="ruleForm.speed"
              :min="0"
              :max="50"
              v-model="ruleForm.autoFlightSpeed"
              :min="1"
              :max="15"
              :step="1"
              controls-position="both"
              @change="handleChange"
              @change="handleChangeAutoFlightSpeed"
            />
            <span class="unit">m/s</span>
          </div>
        </el-form-item>
        <el-form-item label="起飞速度" prop="fly">
        <el-form-item label="起飞速度" prop="globalTransitionalSpeed">
          <div class="speed-control">
            <el-input-number
              v-model="ruleForm.flySpeed"
              :min="0"
              :max="50"
              v-model="ruleForm.globalTransitionalSpeed"
              :min="1"
              :max="15"
              :step="1"
              controls-position="both"
              @change="handleChange"
              @change="handleChangeGlobalTransitionalSpeed"
            />
            <span class="unit">m/s</span>
          </div>
        </el-form-item>
        <el-form-item label="航点类型" prop="region1">
          <el-select v-model="ruleForm.region1" placeholder="请选择航点类型">
            <el-option label="协调转弯,不过点,提前转弯" value="协调转弯,不过点,提前转弯"></el-option>
            <el-option label="直线飞行,飞行器到点停" value="直线飞行,飞行器到点停"></el-option>
            <el-option label="平滑过点,提前转弯" value="平滑过点,提前转弯"></el-option>
        <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="region2">
          <el-select v-model="ruleForm.region2" placeholder="请选择飞行器偏航角模式">
            <el-option label="沿航线方向" value="沿航线方向"></el-option>
            <el-option label="手动控制" value="手动控制"></el-option>
            <el-option label="锁定当前偏航角" value="锁定当前偏航角"></el-option>
        <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="region3">
          <el-select v-model="ruleForm.region3" placeholder="请选择航点间云台俯仰角控制模式">
            <el-option label="手动控制" value="手动控制"></el-option>
            <el-option label="依照每个航点设置" value="依照每个航点设置"></el-option>
        <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="region4">
          <el-select v-model="ruleForm.region4" placeholder="请选择完成动作">
            <el-option label="自动返航" value="自动返航"></el-option>
            <el-option label="返回航线起始点悬停" value="返回航线起始点悬停"></el-option>
            <el-option label="退出航线模式" value="退出航线模式"></el-option>
            <el-option label="原地降落" value="原地降落"></el-option>
         <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>
@@ -153,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,
@@ -168,8 +238,8 @@
        deviceId:null,
        drawer:false,
        ruleForm:{
          speed:14,
          flySpeed:15
          autoFlightSpeed:14,
          globalTransitionalSpeed:15
        },
        
    }
@@ -206,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,
@@ -425,7 +495,8 @@
          label: groundPoint.targetName,
          longitude: groundPoint.longitude,
          latitude: groundPoint.latitude,
          height: groundPoint.height
          height: groundPoint.height,
          actions:groundPoint.actions
        }] : [];
        // 生成空中点
@@ -527,7 +598,7 @@
                position: groundPos,
                point: {
                  pixelSize: 6,
                  color: Cesium.Color.BLUE
                  color: Cesium.Color.RED
                },
                label: {
                  text: groundPoint.label || '',
@@ -548,7 +619,7 @@
                  positions: [airPos, groundPos],
                  width: 2,
                  material: new Cesium.PolylineDashMaterialProperty({
                    color: Cesium.Color.BLUE,
                    color: Cesium.Color.RED,
                    dashLength: 8
                  })
                }
@@ -628,6 +699,7 @@
    },
    submit(){
      console.log(this.treeData)
      console.log(this.ruleForm)
      const routePointList = [];
@@ -639,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,
@@ -658,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: '生成航线成功',
@@ -670,6 +745,29 @@
    },
    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
    }
  }
}
src/views/system/project/index.vue
@@ -18,7 +18,21 @@
      </el-col>
     </el-row>
    
    <addPorjectDialog  v-if="showDialog" @close="close"></addPorjectDialog>
    <addPorjectDialog
      v-if="showDialog"
      @close="close"
      :dji_execute_type="dict.type.dji_execute_type"
      :dji_finish_type="dict.type.dji_finish_type"
      :dji_fly_type="dict.type.dji_fly_type"
      :dji_exitlost_type="dict.type.dji_exitlost_type"
      :dji_drone_value_type="dict.type.dji_drone_value_type"
      :dji_template_type="dict.type.dji_template_type"
      :dji_execute_height_type="dict.type.dji_execute_height_type"
      :dji_auto_flight_speed="dict.type.dji_auto_flight_speed"
      :dji_global_waypoint_turn_mode="dict.type.dji_global_waypoint_turn_mode"
      :dji_mapping_heading_mode="dict.type.dji_mapping_heading_mode"
      :dji_gimbal_pitch_mode="dict.type.dji_gimbal_pitch_mode"
     ></addPorjectDialog>
  </div>
</template>
@@ -27,7 +41,19 @@
import CesiumMap from "../../../utils/components/cesium-map.vue";
export default {
  name: "towers",
  dicts: ['model_typpe'],
  dicts: [
  'dji_execute_type',
  'dji_finish_type',
  'dji_fly_type',
  'dji_exitlost_type',
  'dji_drone_value_type',
  'dji_template_type',
  'dji_execute_height_type',
  'dji_auto_flight_speed',
  'dji_global_waypoint_turn_mode',
  'dji_mapping_heading_mode',
  'dji_gimbal_pitch_mode'
],
  components: {
    addPorjectDialog,
    CesiumMap
src/views/system/shootPoint/components/shootPointDialog.vue
@@ -144,10 +144,6 @@
        form:{},
        deviceData:null,
        activeName: 'first',
        totalDistance: 3054.9,
        totalTime: '5m 56s',
        totalPoints: 11,
        totalPhotos: 3,
        waypoints:[],
        selectedIndex:null,
        chooseItem: null,
@@ -223,7 +219,7 @@
        Cesium.Matrix4.inverseTransformation(transform, new Cesium.Matrix4()),
        direction,
        new Cesium.Cartesian3()
      );
      );
      Cesium.Cartesian3.normalize(directionLocal, directionLocal);
      return Math.asin(directionLocal.z); // z轴向上
    },
@@ -504,7 +500,7 @@
          const groundA = result[i];
          const raisedA = {
            id: this.generateId(),
            label: groundA.label+ "-加高111",
            label: groundA.label+ "-加高",
            longitude: groundA.longitude,
            latitude: groundA.latitude,
            height: groundA.height,
@@ -512,8 +508,9 @@
              {
                ...pointA,
                id: this.generateId(),
                label: pointA.label + "-加高2222",
                height: pointA.height + 50,
                label: pointA.label + "-加高",
                // height: pointA.height + 50,
                height: pointA.height  + (towerHeight  - pointA.height  +  20),
                actions:[]
              }
            ]
@@ -532,8 +529,8 @@
              {
                ...pointB,
                id: this.generateId(),
                label: pointB.label + "-加高3333",
                height: pointB.height + 50,
                label: pointB.label + "-加高",
                height: pointB.height  + (towerHeight  - pointB.height  +  20),
                actions:[]
              }
            ]
@@ -977,13 +974,13 @@
  height: 36px;
  line-height: 36x;
  transition: transform 0.2s;
  font-size: 24px;
  font-size: 22px;
}
.waypoint-header .waypoint-index {
  font-size: 24px;
  font-size: 22x;
}
.rotated {
  transform: rotate(-90deg);