派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-29 b5e596e670ecb194157436b61e1ffd635e1130f7
src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
@@ -37,7 +37,8 @@
    return {
      // 点击定位绑定数据
      clickLocation: '',
      searchList: []
      searchList: [],
      marker: null
    }
  },
  methods: {
@@ -88,7 +89,7 @@
      //   iconSize: 16
      // })
      const htmls = '<div><ul><li>' + val.name + '</li> <br/> <li>' + val.address + '</li> <br/> <li>' + val.phone + '</li></ul></div>'
      const marker = window.L.marker([ps[1], ps[0]], {
      this.marker = window.L.marker([ps[1], ps[0]], {
        icon: window.L.icon({
          iconUrl: iconUrl,
          iconSize: [30, 30],
@@ -103,12 +104,14 @@
          sticky: true,
          className: ''
        })
      window.map.addLayer(marker)
      window.map.addLayer(this.marker)
      window.map.setView([ps[1], ps[0]], 17)
      pulseEffect([ps[1], ps[0]])
    },
    // 点击确认按钮事件
    confirm () {
      window.mapManager.clearHighlight()
      window.map.removeLayer(this.marker)
      this.searchList = []
      this.clickLocation = ''
      eventBus.$emit('location-setChange', true)