chenyao
2025-02-18 d3cea5df5077c60ad4aabb4dbedc6d56dd4783be
修改样式
2 files modified
38 ■■■■ changed files
src/views/DronePilotDetails.vue 24 ●●●● patch | view | raw | blame | history
src/views/hooks/droneFly.ts 14 ●●●● patch | view | raw | blame | history
src/views/DronePilotDetails.vue
@@ -6,6 +6,7 @@
          Your browser is too old which doesn't support HTML5 video.
        </video>
        <el-empty v-show="videoUrl == ''" description="当前设备已关机,无法进行直播" :image="imageUrl"></el-empty>
        <div v-if="videoUrl" class="center-point"></div>
      </div>
      <div class="l-map" :style="{ width: screenWidthVideo + 'px', height: (screenHeightVideo) + 'px'}">
        <div id="cesiumContainerBigMap"></div>
@@ -301,6 +302,7 @@
    }
    case EBizCode.FlightTaskProgress: { // 获取进度
      // 如果点击列表进入没有获取到航线文件,那么这里重新请求一次
      console.log('航线有么?',payload)
      if (ssLinePath.value == '') {
        getWrjSsLx()
      }
@@ -420,6 +422,9 @@
    lZoom.style.position = 'fixed';
    cesiumContainer.style.width = `${screenWidth.value/2}px`
    cesiumContainer.style.height = `${screenHeight.value}px`
    cesiumContainer.style.position = 'static'
    cesiumContainer.style.right = '0'
    cesiumContainer.style.marginLeft = '0%'
  } else { //竖屏
    isLandscape.value = false;
    screenWidthVideo.value = window.innerWidth
@@ -430,6 +435,8 @@
    lZp.style.right = '32%';
    cesiumContainer.style.width = `${screenHeight.value}px`
    cesiumContainer.style.height = `${screenHeight.value/2}px`
    // cesiumContainer.style.position = 'absolute'
    cesiumContainer.style.marginLeft = '-32%'
  }
};
@@ -549,8 +556,6 @@
    // position: relative;
    // display: flex;
    .l-map {
      position: absolute;
      right: 36%;
      .l-zp {
        position: fixed;
        right: 16%;
@@ -581,6 +586,7 @@
    }
  }
  .l-video {
    position: relative;
    .el-empty {
      width: 100%;
      height: 100%;
@@ -593,11 +599,23 @@
        margin: 0;
      }
    }
    .center-point {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0.4rem;
      height: 0.4rem;
      opacity: 0.5;
      border-radius: 50%;
      background-color: yellow;
      transform: translate(-50%, -50%);
      justify-content: center;
    }
  }
  #cesiumContainerBigMap {
    width: 100%;
    height: 100%;
    margin-right: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
src/views/hooks/droneFly.ts
@@ -40,9 +40,9 @@
  let me_longitude = 0;
  let me_altitude = 0;
  // 扫射定位
  let measure_target_longitude = 115.85635872364763;
  let measure_target_latitude = 28.624648387113627;
  let measure_target_altitude = 63.5;
  let measure_target_longitude = 0;
  let measure_target_latitude = 0;
  let measure_target_altitude = 0;
  async function initDock(data:any, sn:any, dockSn:any, workspaceId:any, ssLinePath:any, viewDroneInfo:any) {
@@ -567,10 +567,10 @@
  // 获取手机定位和激光发射定位的高度和距离
  function getTwoHeightWidth(workspaceId:String) {
    // 国内地图不会为0或者小于0
    // console.log('自身定位经纬度1', me_latitude)
    // console.log('自身定位经纬度2', me_longitude)
    // console.log('激光扫过定位1', measure_target_latitude)
    // console.log('激光扫过定位2', measure_target_longitude)
    console.log('自身定位经纬度1', me_latitude)
    console.log('自身定位经纬度2', me_longitude)
    console.log('激光扫过定位1', measure_target_latitude)
    console.log('激光扫过定位2', measure_target_longitude)
    if (me_latitude <= 0 || me_longitude <= 0 || measure_target_latitude <= 0 || measure_target_longitude <= 0) return
    getTwoPointInfo(workspaceId,me_latitude,me_longitude,measure_target_latitude,measure_target_longitude).then((res:any) => {
      const heightDifference = res.data.heightDifference