派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-18 be771111fb2a9770a9fbf13c5d7e976bf8688b6d
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
@@ -59,6 +59,8 @@
import { LayerEmergencySource } from '../../../../conf/layers/LayerEmergencySource'
import { LayerSurroundings } from '../../../../conf/layers/LayerSurroundings'
import { pulseEffect } from '../../../../utils/utils'
import { openPopup } from '../../../helpers/LocateHelper'
// import { fitBounds, highlight, openPopup } from '../../helpers/LocateHelper'
export default {
  name: 'ResourcesQuery',
@@ -128,16 +130,19 @@
        this.wfsHelper.addLike('name', this.form.keyword)
      }
      const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
      console.log(res)
      // console.log(res)
      if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
        this.list = res.features
      }
    },
    // 查询定位功能
    handleLocation (val, index) {
      // console.log(val)
      this.activeNum = index
      window.map.setView([val.properties.y, val.properties.x], 16)
      pulseEffect([val.properties.y, val.properties.x])
      const positionArea = [val.properties.y, val.properties.x]
      window.map.setView(positionArea, 16)
      pulseEffect(positionArea)
      openPopup(positionArea, val.id)
    }
  }
}