quanyawei
2023-10-09 9e6f52a0a7d0d466db1cb0eaa5260be18b9b1032
src/views/UVA/index.vue
@@ -45,8 +45,6 @@
          <el-collapse
            v-show="shou1 === true"
            v-loading="loading"
            accordion
            style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)"
          >
            <el-collapse-item
              style="text-indent: 2em; position: relative; padding-botton: 10px"
@@ -146,8 +144,6 @@
                <span>无人机飞行高度范围(米): </span>
                <el-input
                  ref="uvas"
                  v-model="tallone"
                  class="inputtu"
                />
                --
                <el-input
@@ -887,7 +883,10 @@
  },
  mounted() {
    this.initStart()
    this.$nextTick(() => {
      this.initStart()
    })
    // this.$refs.datePick.focus()
    // this.getDate()
    // this.flyData()
@@ -1223,7 +1222,10 @@
      this.abc += 1
      const that = this
      if (!res) {
        that.map = new window.window.BMapGL.Map('map_container')
        that.map = new BMap.Map('map_container')
        console.log('BMap', BMap)
        console.log('BMapGL', BMapGL)
        console.log('window', window.BMapGL)
        that.map.enableScrollWheelZoom(true) // 开启鼠标滚轮,地图可以进行放大、缩小s
        that.map.setMapType(BMAP_EARTH_MAP) // 设置地图类型为地球模式
        that.map.setDisplayOptions({
@@ -1302,7 +1304,7 @@
            // lat = GPS.bd_encrypt(lat, lng).lat
            // lng = GPS.bd_decrypt(lat, lng).lon
            // lat = GPS.bd_decrypt(lat, lng).lat
            var point = new window.BMapGL.Point(lng, lat)
            var point = new BMap.Point(lng, lat)
            point.a34004 = parseInt(value.a34004)
            point.a34002 = parseInt(value.a34002)
            point.a21026 = parseInt(value.a21026)
@@ -1413,12 +1415,12 @@
          var data = point[sensor]
          // 根据因子浓度变换方块颜色
          var color = getColorAndLevel(sensor, data).color
          var polygon = new window.BMapGL.Polygon(
          var polygon = new BMap.Polygon(
            [
              new window.BMapGL.Point(sw.lng, sw.lat), // 左下角
              new window.BMapGL.Point(ne.lng, sw.lat), // 左上角
              new window.BMapGL.Point(ne.lng, ne.lat), // 右上角
              new window.BMapGL.Point(sw.lng, ne.lat) // 右下角
              new BMap.Point(sw.lng, sw.lat), // 左下角
              new BMap.Point(ne.lng, sw.lat), // 左上角
              new BMap.Point(ne.lng, ne.lat), // 右上角
              new BMap.Point(sw.lng, ne.lat) // 右下角
            ],
            {
              strokeWeight: 0.1, // 边框线的宽度,以像素为单位
@@ -1437,24 +1439,24 @@
      // 起点和终点标注
      function drawStartAndEnd() {
        var startIcon = new window.BMapGL.Icon(
        var startIcon = new BMap.Icon(
          require('@/assets/images/start.png'),
          new window.BMapGL.Size(48, 48)
          new BMap.Size(48, 48)
        )
        var startMark = new window.BMapGL.Marker(that.showPoints[0], {
        var startMark = new BMap.Marker(that.showPoints[0], {
          icon: startIcon,
          offset: new window.BMapGL.Size(0, -20)
          offset: new BMap.Size(0, -20)
        })
        that.map.addOverlay(startMark)
        var endIcon = new window.BMapGL.Icon(
        var endIcon = new BMap.Icon(
          require('@/assets/images/end.png'),
          new window.BMapGL.Size(48, 48)
          new BMap.Size(48, 48)
        )
        var endMark = new window.BMapGL.Marker(
        var endMark = new BMap.Marker(
          that.showPoints[that.showPoints.length - 1],
          {
            icon: endIcon,
            offset: new window.BMapGL.Size(0, -20)
            offset: new BMap.Size(0, -20)
          }
        )
        that.map.addOverlay(endMark)
@@ -1534,7 +1536,7 @@
        lng = (lng * 180) / Math.PI
        lat = (lat * 180) / Math.PI
        // console.log(lng, lat)
        return new window.BMapGL.Point(lng, lat)
        return new BMap.Point(lng, lat)
      }
      function getGrading(sensor, type, carMac) {
@@ -1885,14 +1887,14 @@
      // point上添加label文本
      function setLabelStyle(content, point) {
        var label = new window.BMapGL.Label(
        var label = new BMap.Label(
          "<span class='my-maptip'>" + content + '<br /><span>', // 为lable填写内容
          {
            offset: new window.BMapGL.Size(-8, -10), // label的偏移量,为了让label的中心显示在点上
            offset: new BMap.Size(-8, -10), // label的偏移量,为了让label的中心显示在点上
            position: point
          } // label的位置
        )
        var offsetSize = new window.BMapGL.Size(0, 0)
        var offsetSize = new BMap.Size(0, 0)
        var size = '10px'
        if (that.map.getZoom() <= 15.5) {
          size = '0px'
@@ -2002,7 +2004,22 @@
}
</script>
<style  lang="scss" >
<style  lang="scss" scoped>
.main-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-flow: column;
    flex-flow: column;
    min-height: 100%;
    -webkit-transition: margin-left .28s;
    transition: margin-left .28s;
    margin-left: 210px;
    position: relative;
    height: 100%;
}
/deep/.BMap_cpyCtrl {
  display: none;
}