派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-21 c60e56e2b6ceb633c6b10f5dc52e3da88129ad70
src/components/panel/topicSearch/SewersSearch.vue
@@ -38,10 +38,10 @@
                         :class="activeNum===index?'hover':''">
                        <img class="state" :src="getImgSrc()" style="background: none"/>
                        <div>
                            <h3 @click="handleLocation(item,index)">{{ item.properties.pipename }}
                                {{item.properties.companyname }}</h3>
                            <h3 @click="handleLocation(item,index)">{{ item.properties.name || item.properties.code
                                }}</h3>
                            <p>所属企业:<span>{{ item.properties.orgname }}</span>
                            <p>设施类型:<span>{{form.pipelineType}}</span>
                            <p>设施类型:<span>{{ item.properties.type }}</span>
                                <el-button v-if="fuShuSheShiShow" class="rt btn00fff6" size="mini"
                                           style="margin-right: 0.04rem;"
                                           @click="btnAffiliatedFacilities(item,index)">
@@ -112,7 +112,6 @@
      list: [],
      // 图层控制
      items: [LayerPipeLines, LayerFsss, LayerHbss, LayerPk, LayerArea],
      subItems: LayerPipeLines.layers,
      // 分页
      pageSize: 10,
      total: 0,
@@ -132,9 +131,25 @@
    this.wfsHelper = new WfsHelper()
  },
  methods: {
    subItems () {
      const layers = LayerPipeLines.layers
      console.log(layers)
      const filtered = layers.filter(function (value, index, array) {
        console.log(value)
        return value.name !== '流向'
      })
      return filtered
    },
    // tab切换
    handleClick (tab, event) {
      console.log(tab, event)
      // if (tab.label === '分析') {
      //   // 关闭弹窗
      //   window.mapManager.clickDialogSwitch = false
      // } else {
      //   // 打开弹窗
      //   window.mapManager.clickDialogSwitch = true
      // }
    },
    // 根据返回数据 确认展示图片
    getImgSrc () {
@@ -167,17 +182,22 @@
      this.list = []
      this.wfsHelper.clearFilter()
      // todo 现在管网还没区分开类型,后面改
      this.wfsHelper.setTypeName([this.form.dataType.typeName])
      this.wfsHelper.setTypeName(['sewer:view_pipeline'])
      if (this.form.keyword) {
        this.wfsHelper.addLike('name', this.form.keyword)
      }
      this.wfsHelper.addEquals('type', '\'' + this.form.dataType.sname + '\'')
      // const filter = this.form.dataType.filter
      // if (filter) {
      //   this.wfsHelper.setFilter(filter)
      // }
      // const _this = this
      const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
      console.log(res)
      if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
        this.total = res.totalFeatures
        this.list = res.features
      }
      this.wfsHelper = new WfsHelper()
    },
    // 点击搜索到的数据 实现功能 = 定位 高亮 弹框
    handleLocation (val, index) {