派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-17 50b5bca4861dbeb97b6a817f03c24c919ebaab40
企业点展示控制
5个文件已修改
58 ■■■■■ 已修改文件
src/components/LayerController/logic/Company.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/SourcesPollution.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/DischargeSearch.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/Company.js
@@ -14,7 +14,6 @@
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = async (layer, L) => {
    this.animalService = new AnimalService({
      L: L,
@@ -40,29 +39,11 @@
        className: 'company-bindTooltip',
        iconSize: 16
      })
      const marker = L.marker([positionX, positionY], {
        /* icon: L.icon({
          iconUrl: iconUrl,
          iconSize: [30, 30],
          iconAnchor: [15, 15]
        }), */
        icon: myIcon,
        test: data[i]
      })
      /* const htmls = '<ul><li>' + data[i].name + '</li></ul>'
      marker.bindTooltip(htmls, {
        permanent: true,
        offset: [0, 5],
        direction: 'bottom',
        className: 'company-bindTooltip'
      }) */
      // layer.addLayer(marker)
      if (window.map.getZoom() <= 5) {
        layer.addLayer(marker)
      } else if (window.map.getZoom() >= 12) {
        layer.removeLayer()
      }
      layer.addLayer(marker)
    }
  }
  /*
@@ -80,15 +61,13 @@
  *
  * */
  this.clickListener = (e) => {
    console.log(e)
    window.map.setView(e.latlng, 13)
    if (window.map.getZoom() >= 12) {
      e.layer.remove()
    }
    // if (window.map.getZoom() <= 5) {
    //   e.layer.addLayer()
    // } else if (window.map.getZoom() >= 12) {
    //   e.layer.removeLayer()
    // console.log(e)
    window.map.setView(e.latlng, 15)
    // if (window.map.getZoom() >= 10) {
    //   window.map.removeLayer(e.layer)
    //   e.layer.remove()
    // } else if (window.map.getZoom() < 10) {
    //   window.map.addLayer(e.layer)
    // }
    // const dataValue = {
    //   StoragePlaceId: e.layer.options.test.name
src/components/LayerController/logic/SourcesPollution.js
@@ -14,9 +14,23 @@
      layer: layer
    })
    const result = await mapApi.getSourcesPoll()
    console.log(result)
    // console.log(result)
    const resultData = result.Result.DataInfo || []
    const polygon = L.polygon(resultData, { color: 'yellow' })
    polygon.addTo(layer)
  }
  this.bindTooltip = (layer) => {
    return 'layer'
  }
  this.click = () => {
    window.$layer.open({
      content: {
        content: 'Popup', // 组件
        data: { // 传递的参数
          datas: 'popupDatas'
        }
      },
      title: ''
    })
  }
}
src/components/panel/topicSearch/DischargeSearch.vue
@@ -170,7 +170,7 @@
  methods: {
    flyto () {
      const pos = [39.90751504898071, 116.38927817344666]
      window.map.flyTo(pos, 15)
      window.map.setView(pos, 15)
    },
    // 区域筛选
    areaType (val) {
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -527,9 +527,7 @@
      this.bgPoint = res.data[0].startControlPoint
      // const point = JSON.parse(this.bgPoint.geomText)
      // const p = [point.coordinates[1], point.coordinates[0]]
      // this.bgMarker = this.createFlowMarker(p)
      // this.bgMarker = pulseEffect(p)
      // this.bgMarker.bindTooltip(this.bgPoint.pointnumbe)
src/conf/MapConfig.js
@@ -23,7 +23,6 @@
  crs: L.CRS.EPSG4326,
  minZoom: 3,
  maxZoom: 21,
  // center: [26, 104],
  center: [34.828558921813965, 117.41676807403564],
  zoom: 5,
  // center: [39.907214641571045, 116.39019012451172],