派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-04-01 404b9d331ba10fd1683e77c916c01aaa4cba4f0b
src/components/LayerController/logic/SolidWaste.js
@@ -1,6 +1,7 @@
/**
 * 固废
 */
// 区分不同类型 使用不同img
const defaultImg = '/assets/images/map/solidwaste/voc.png'
const setting = '/assets/images/map/solidwaste/gf_green.png'
@@ -50,8 +51,17 @@
    return layer.options.test.Name
  }
  this.clickListener = async (e) => {
  this.clickListener = (e) => {
    // 点击marker的pulse()光波
    this.animalService.pulseEffect(e.latlng)
    /* flyTo()弹出框平移事件 */
    // this.setPanTo(e.latlng, 200)
    /* 点击数据的接口请求 */
    this.requestSolidWasteData(e).then(e)
  }
  // 根据点击不同数据 进行接口的数据请求
  this.requestSolidWasteData = async (e) => {
    const dataValue = {
      StoragePlaceId: e.layer.options.test.StoragePlaceId
    }
@@ -59,11 +69,20 @@
    // console.log(result)
    const PublicBounced = window.Vue.extend(publicBounced)
    const instance = new PublicBounced()
    instance.setData(result, 'gufei')
    instance.$mount()
    document.body.appendChild(instance.$el)
    instance.setData(result.Result.DataInfo, 'gufei')
  }
  // flayTo()
  // this.setPanTo = (pos, value) => {
  //   var position = pos
  //   position = this.map.latLngToLayerPoint(position)
  //   position.y += value
  //   position = this.map.layerPointToLatLng(position)
  //   this.map.flyTo(position)
  // }
  // 不同类型图片封装
  this.differentTypes = (judgeValue) => {
    var effectOfChange