派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-17 db929db466201b100a5af70add4a8f6b46bb8b5d
企业图层展示控制
3个文件已修改
43 ■■■■■ 已修改文件
src/components/LayerController/logic/Company.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/Company.js
@@ -1,6 +1,7 @@
/**
 * 固废
 * 企业
 */
// 区分不同类型 使用不同img
const companyImg = '/assets/images/map/company_refining.png'
const companyOil = '/assets/images/map/company_oil.png'
@@ -13,8 +14,8 @@
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = async (layer, L) => {
    // const SolidWasteIcon = this.SolidWasteIcon()
    this.animalService = new AnimalService({
      L: L,
      layer: layer
@@ -56,7 +57,12 @@
        direction: 'bottom',
        className: 'company-bindTooltip'
      }) */
      // layer.addLayer(marker)
      if (window.map.getZoom() <= 5) {
      layer.addLayer(marker)
      } else if (window.map.getZoom() >= 12) {
        layer.removeLayer()
      }
    }
  }
  /*
@@ -74,12 +80,18 @@
  *
  * */
  this.clickListener = (e) => {
    // this.animalService.pulseEffect(e.latlng)
    const dataValue = {
      StoragePlaceId: e.layer.options.test.name
    console.log(e)
    window.map.setView(e.latlng, 13)
    if (window.map.getZoom() >= 12) {
      e.layer.remove()
    }
    debugger
    console.log(dataValue)
    // return this.PublicBounced.$el
    // if (window.map.getZoom() <= 5) {
    //   e.layer.addLayer()
    // } else if (window.map.getZoom() >= 12) {
    //   e.layer.removeLayer()
    // }
    // const dataValue = {
    //   StoragePlaceId: e.layer.options.test.name
    // }
  }
}
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
@@ -43,8 +43,8 @@
            <div class="environmental-risk-list" v-for="(item,index) in list" :key="index"
                 :class="activeNum===index?'hover':''" @click="handleLocation(item,index)">
                <img class="state" :src="getImgSrc(item.properties.type)" style="background: none"/>
                <h3>资源类型:{{item.properties.adminzonename}}</h3>
                <h5>资源名称:{{item.properties.type}}</h5>
                <h3>资源类型:{{item.properties.type}}</h3>
                <h5>资源名称:{{item.properties.companyname}}</h5>
                <p>负责人:<span>{{item.properties.resperson}}</span></p>
                <p>电话:<span>{{item.properties.telephone}}</span></p>
            </div>
@@ -125,6 +125,7 @@
        this.wfsHelper.addLike('name', this.form.keyword)
      }
      const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
      console.log(res)
      if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
        this.list = res.features
      }
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -526,12 +526,12 @@
      this.bgPoint = res.data[0].startControlPoint
      const point = JSON.parse(this.bgPoint.geomText)
      // const point = JSON.parse(this.bgPoint.geomText)
      const p = [point.coordinates[1], point.coordinates[0]]
      // const p = [point.coordinates[1], point.coordinates[0]]
      // this.bgMarker = this.createFlowMarker(p)
      this.bgMarker = pulseEffect(p)
      // this.bgMarker = pulseEffect(p)
      // this.bgMarker.bindTooltip(this.bgPoint.pointnumbe)
      // this.bgMarker.addTo(window.map)
      // window.map.flyTo(p)
@@ -561,11 +561,11 @@
    },
    bgFmClick (e) {
      // console.log('点击影响的阀门')
      console.log(e)
      // console.log(e)
      // const point = [e.data[0][0], e.data[0][1]]
      const point = [e.startControlPoint.y, e.startControlPoint.x]
      // const marker = this.createFlowMarker(point)
      pulseEffect(point)
      // const marker = this.createFlowMarker(point)
      // marker.addTo(window.map)
      // window.map.flyTo(point, 17)
    },