| | |
| | | },
|
| | | mounted() {
|
| | | this.currentHour()
|
| | | this.$Bus.$on('alarmTableVisible', (res) => (this.alarmTableVisible = res))
|
| | | this.$Bus.$on(
|
| | | 'alarmTableVisible',
|
| | | (res) => (
|
| | | (this.alarmTableVisible = res),
|
| | | this.alertData(this.PageSize, this.currentPage)
|
| | | )
|
| | | )
|
| | | // 初始化地图容器
|
| | | this.initMap()
|
| | |
|
| | |
| | | this.getParamsData()
|
| | | this.windDir()
|
| | | this.newDate()
|
| | | this.alertData(this.PageSize, this.currentPage)
|
| | | // this.alertData(this.PageSize, this.currentPage)
|
| | | },
|
| | | beforeDestroy() {
|
| | | if (this.timer) {
|
| | |
| | | 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',
|
| | | })
|
| | | // 添加标记到地图
|
| | |
| | | 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事件会冒泡
|
| | |
| | | background-color: #ff0000 !important;
|
| | | color: #790000 !important;
|
| | | }
|
| | | .leaflet-marker-icon.leaflet-interactive {
|
| | | pointer-events: auto;
|
| | | margin-left: -45px;
|
| | | margin-top: -40px;
|
| | | }
|
| | | </style>
|