派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-15 69fa4c84656dca30f92d605221c0098917cb613d
src/components/panel/topicSearch/SewersSearch.vue
@@ -1,8 +1,5 @@
<template>
 <div :class="'sewers-search map-background'">
    <div class="el-message-box__content" style="padding:6px;font-size: 13px;">
      <div class="box__content" v-if="gdVisible">
        <div>
        <div class="sewers-search" v-if="gdVisible">
          <div class="search-panel ">
            <el-form ref="form" :model="form" label-width="90px" class="search-form">
              <el-form-item label="设施类型:" size="mini" class="search-panel-item">
@@ -40,7 +37,6 @@
            </el-form>
          </div>
          <el-scrollbar style="height:100%">
          <el-card class="search-result" >
            <div class="B-TMD-table-list" v-for="(item,index) in list" :key="index">
              <div class="B-TMD-table-list-title">
                <div class="B-TMD-table-list-head">
@@ -82,7 +78,6 @@
              <!--                  货物名称:<span :title="item.materialName">{{ item.materialName }}</span></div>-->
              <!--              </div>-->
            </div>
          </el-card>
          </el-scrollbar>
          <el-card class="footer-page" v-if="total > 10">
            <el-pagination
@@ -97,16 +92,12 @@
            </el-pagination>
          </el-card>
        </div>
      </div>
      <!--        <div class="monitor2" v-if="hbVisible">-->
      <!--          <env-protect-search></env-protect-search>-->
      <!--        </div>-->
      <!--        <div class="monitor2" v-if="pkVisible">-->
      <!--          <discharge-search></discharge-search>-->
      <!--        </div>-->
    </div>
  </div>
</template>
<script>
@@ -159,7 +150,7 @@
        }
      })
    },
    handleSearch () {
    async handleSearch () {
      const param = {
        pipelineType: this.form.pipelineType,
        dataType: this.form.dataType
@@ -169,17 +160,15 @@
      wfsHelper.addTypeName(this.form.query.layerName)
      wfsHelper.addLike(this.form.query.key, this.form.keyword)
      // const _this = this
      AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}, (res) => {
        console.log(res)
        this.list = res.features
      })
      const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {})
      if (res.data instanceof Object && Object.prototype.hasOwnProperty.call(res.data, 'features')) {
        this.list = res.data.features
      }
    },
    handleLocation (val) {
      console.log(val)
      const bound = this.L.geoJSON([val], {}).getBounds()
      console.log(bound)
      var layer = window.serviceLayerHelper.getByLayerId(val.id)
      console.log(layer)
      layer && layer.openPopup()
      this.$store.state.map.map.flyToBounds(bound)
    }
@@ -188,10 +177,9 @@
</script>
<style lang="less" scoped>
.sewers-search{
  position: relative;
  width: 1.79167rem;
  height: 3.4375rem;
  overflow: hidden;
  .search-panel{
   background-color: transparent;
@@ -218,7 +206,6 @@
  //location-btn{
  //
  //}
  .location-btn:hover,.el-input__icon:hover{
    color: @color;
    cursor: pointer;