guoshipeng
2023-08-20 a315f8bc5864848b2f408cbad42414ef09871464
src/components/Wind/Map.vue
@@ -1013,7 +1013,7 @@
        },
      }).then((data) => {
        // console.log('五分钟设备数据')
        console.log(data,'tata')
        console.log(data, 'tata')
        that.loading = false
        this.markDeviceSite(data)
      })
@@ -1334,7 +1334,7 @@
          iconUrl: require('@/assets/icon/ico' + colorNum + '.png'),
          // iconUrl: require('@/assets/icon/ico2.png'),
          iconSize: [60, 60],
          iconAnchor: [13, 21],
          iconAnchor: [30, 48],
          className: 'my-device',
        })
        // 添加标记到地图
@@ -1345,7 +1345,8 @@
        var myIcon = L.divIcon({
          html: this.keys[i],
          className: 'my-div-icon',
          iconSize: 30,
          iconSize: [60, 60],
          iconAnchor: [40, 40],
        })
        var marker = L.marker([lat, lng], { icon: myIcon }).addTo(group)
        // 给标记添加鼠标移入事件,mouseover事件会冒泡
@@ -1368,6 +1369,11 @@
              },
            })
            .then((res) => {
              if (res.message == '操作目标不存在') {
                var datafalse = '暂无五分钟数据'
                this.bindPopup(datafalse).openPopup()
                return
              }
              for (const key in res.data) {
                var tempDecimal = res.data[key]
                  .replace(/[^\d.]/g, '')
@@ -2112,4 +2118,9 @@
  background-color: #ff0000 !important;
  color: #790000 !important;
}
.leaflet-marker-icon.leaflet-interactive {
  pointer-events: auto;
  margin-left: -45px;
  margin-top: -40px;
}
</style>