派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-03-29 17ba6febdaacf7563f7688bae473a4a89e914ff5
src/components/flueGas/flueGas.js
@@ -15,8 +15,8 @@
  }
  // 获取数据
  requestData () {
    FlueGas().then(res => {
  requestData (data) {
    FlueGas(data).then(res => {
      console.log(res)
      this.DrawFlueGasContent(res.Result.DataInfo)
    }).catch(err => {
@@ -35,8 +35,8 @@
    }
    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) {
@@ -55,16 +55,16 @@
      // // 线
      // var polyline = this.L.polyline(latlngs, { color: 'red' }).addTo(this.map)
      // console.log(polyline)
      marker.bindPopup(() => {
        return this.FlueGasPopup.$el
      }, {
        className: 's-map-popup',
        minWidth: 1548,
        closeButton: true,
        autoClose: false
      })
      // marker.bindPopup(() => {
      //   return this.FlueGasPopup.$el
      // }, {
      //   className: 's-map-popup',
      //   minWidth: 1548,
      //   closeButton: true,
      //   autoClose: false
      // })
      // 划过出现 展示数据
      marker.bindTooltip(data[i].StoragePlaceName, {
      marker.bindTooltip(data[i].porltName, {
        permanent: true,
        offset: [0, -16],
        direction: 'top',
@@ -73,9 +73,10 @@
      // 点击 事件
      marker.on('click', (e) => {
        try {
          // console.log(e)
          console.log(e)
          this.EffectOfPulse(e.target.getLatLng())
          this.FlueGasPopup.setDate(data[i])
          this.FlueGasPopup.setData(data[i])
          return this.FlueGasPopup.$el
        } catch (error) {
          console.log(error)
        }
@@ -116,7 +117,7 @@
  // 脉冲效果设置实现
  EffectOfPulse (position, markers, layerGroup) {
    // // 区分直接执行 和判断执行的不同区别
    var differentColor = ''
    let differentColor = ''
    if (markers) {
      differentColor = '#ff0000'
    } else {