| | |
| | | import { requestSolidWaste } from '@/api/request' |
| | | import { QueryStoragePlaceListByCompanyAndName } from '@/api/request' |
| | | // 展示图片 |
| | | import defaultImg from '@assets/images/map-pages/basenav/solidwaste/voc.png' |
| | | import Setting from '@assets/images/map-pages/basenav/solidwaste/gf_green.png' |
| | |
| | | } |
| | | |
| | | // 请求数据 data 为参数, 请求后台数据时 携带data参数 |
| | | requestData () { |
| | | requestSolidWaste().then(res => { |
| | | // console.log(res) |
| | | requestData (data) { |
| | | QueryStoragePlaceListByCompanyAndName(data).then(res => { |
| | | console.log(res) |
| | | this.DrawTheSolidWasteContent(res.Result.DataInfo) |
| | | }).catch(err => { |
| | | console.log(err) |
| | |
| | | } |
| | | for (let i = 0; i < data.length; i++) { |
| | | // 经纬度 位置 |
| | | const positionX = data[i].positionX |
| | | const positionY = data[i].positionY |
| | | const positionX = data[i].Latitude |
| | | const positionY = data[i].Longitude |
| | | |
| | | // 判断 经纬度位置信息是否存在 |
| | | // if (positionX != null && positionY != null) { |
| | | if (positionX != null && positionY != null) { |
| | | // 用于 判断 => 判断是否展示脉冲效果 => temp(临时) |
| | | const determineValueOne = data[i].LongDayWarning |
| | | var determineValueTwo = data[i].StorageQty |
| | |
| | | |
| | | const marker = this.L.marker([positionX, positionY], { icon: Icon }) |
| | | |
| | | marker.bindPopup(() => { |
| | | return this.SolidWastePopup.$el |
| | | }, { |
| | | className: 's-map-popup', |
| | | minWidth: 600, |
| | | closeButton: true, |
| | | autoClose: false |
| | | }) |
| | | // 划过出现 展示数据 |
| | | marker.bindTooltip(data[i].StoragePlaceName, { |
| | | marker.bindTooltip(data[i].Name, { |
| | | permanent: true, |
| | | offset: [0, -16], |
| | | direction: 'top', |
| | | offset: [0, 16], |
| | | direction: 'bottom', |
| | | className: '' |
| | | }) |
| | | // 点击 事件 |
| | |
| | | try { |
| | | // console.log(e) |
| | | this.EffectOfPulse(e.target.getLatLng()) |
| | | this.SolidWastePopup.setDate(data[i]) |
| | | this.SolidWastePopup.setData(data[i]) |
| | | return this.SolidWastePopup.$el |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | }) |
| | | // 设置内容添加到图层 |
| | | this.SolidWasteLayerGroup.addLayer(marker) |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | fillColor: '' |
| | | }) |
| | | if (markers) { |
| | | markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) |
| | | this.L.layerGroup(markers).addLayer(layerGroup) |
| | | // markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) |
| | | // this.L.layerGroup(markers).addLayer(layerGroup) |
| | | } else { |
| | | var picGroupMarker = new this.L.FeatureGroup() |
| | | this.L.marker(FinalPosition, { icon: pulsingIcon }).addTo(picGroupMarker) |
| | |
| | | PulseCountSetting () { |
| | | var HeightLightTime = 5 |
| | | var PulseNumber = 5 |
| | | const pulseinterver = setInterval(() => { |
| | | const pulseinterver = setInterval((e) => { |
| | | console.log(e) |
| | | if (PulseNumber > 0) { |
| | | PulseNumber-- |
| | | } else { |