派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-21 f425c4dd7d48529f7f2e50bba8188463f8d60ee2
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
@@ -47,6 +47,8 @@
                <h5>{{changeAmount}}名称:{{item.properties.name}}</h5>
                <p>负责人:<span>{{item.properties.resperson}}</span></p>
                <p>电话:<span>{{item.properties.telephone}}</span></p>
                <p v-if="item.properties.address">地址:<span>{{item.properties.address}}</span></p>
                <p v-else>地址:<span>{{item.properties.adminzonename}}</span></p>
            </div>
        </el-scrollbar>
    </div>
@@ -61,8 +63,7 @@
import { LayerSurroundings } from '../../../../conf/layers/LayerSurroundings'
// 引入的方法
import { pulseEffect } from '../../../../utils/utils'
// import { locate } from '../../../helpers/LocateHelper'
// import { fitBounds, highlight, locate, openPropsPopup } from '../../../helpers/LocateHelper'
import { loadPointWfs, pointZoom } from '../../../helpers/LocateHelper'
export default {
  name: 'ResourcesQuery',
@@ -75,8 +76,8 @@
        dataType: '',
        keyword: '',
        eventNameList: [
          { name: '金陵石化' },
          { name: '南京化学' }
          { name: '扬子石化' },
          { name: '仪征化纤' }
        ]
      },
      // 搜索到的数据绑定的active的样式
@@ -130,14 +131,14 @@
    async handleSearch () {
      this.list = []
      this.wfsHelper.clearFilter()
      // todo 现在企业应急还没区分开类型,后面改
      // console.log(this.form.dataType)
      // this.wfsHelper.setTypeName([this.form.dataType.typeName])
      this.wfsHelper.setTypeName(['sewer:emergency'])
      this.wfsHelper.setMaxFeatures(100)
      // form表单选择搜索
      if (this.form.dataType) {
        this.wfsHelper.addEquals('orgname', '\'' + this.form.eventName + '\'')
        this.wfsHelper.addEquals('type', '\'' + this.form.dataType.name + '\'')
      }
      // 搜索框keyword
      if (this.form.keyword) {
        this.wfsHelper.addLike('name', this.form.keyword)
      }
@@ -153,11 +154,11 @@
      this.activeNum = index
      const positionArea = [val.properties.y, val.properties.x]
      window.map.setView(positionArea, 17)
      pointZoom(positionArea, this.form.dataType.icon)
      // 图片
      loadPointWfs(positionArea)
      // 弹窗
      pulseEffect(positionArea)
      // const config = this.form.dataType
      // locate(val, config)
      // fitBounds(val, this.form.dataType.code)
      // highlight(val, this.form.dataType)
    }
  }
}