From b5a1f4cab551be9659e523af3d9df64b6466ced9 Mon Sep 17 00:00:00 2001
From: ChenZeping02609 <chenzeping02609@163.com>
Date: 星期四, 13 五月 2021 16:53:37 +0800
Subject: [PATCH] 分析地址更改

---
 src/components/panel/topicSearch/SewersSearch.vue |   58 +++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index 706f5e2..b2f1dde 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -32,14 +32,14 @@
             </div>
           </el-form>
         </div>
-        <el-scrollbar style="height:380.44px;">
+        <el-scrollbar style="height:413px;">
           <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum==index?'hover':''">
             <img class="state" :src="getImgSrc()" style="background: none"/>
             <div>
               <h3 @click="handleLocation(item,index)">{{ item.properties.pipename }}</h3>
               <p>鎵�灞炰紒涓氾細<span>{{ item.properties.orgcode }}</span>
               <p>璁炬柦绫诲瀷锛�<span>{{ item.properties.teetype }}</span>
-              <!--  <el-button v-if="fuShuSheShiShow" class="rt" size="mini" style="margin-right: 0.04rem" @click="btnAffiliatedFacilities(item)" >闄勫睘璁炬柦</el-button> -->
+               <el-button v-if="fuShuSheShiShow" class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;" @click="btnAffiliatedFacilities(item,index)" >闄勫睘璁炬柦</el-button>
               </p>
             </div>
           </div>
@@ -65,7 +65,7 @@
       </el-tab-pane>
     </el-tabs>
     <!-- 闄勫睘璁炬柦闈㈡澘 -->
-    <affiliated-facilities :facilitiesParameter="facilitiesParameter" :fuShuSheShiSubItems="fuShuSheShiSubItems" ></affiliated-facilities>
+    <affiliated-facilities :facilitiesParameter="facilitiesParameter"  v-if="fuShuSheShiShow" ></affiliated-facilities>
   </div>
 </template>
 
@@ -99,9 +99,10 @@
       list: [],
       items: [LayerPipeLines, LayerFsss, LayerHbss, LayerPk, LayerArea],
       subItems: LayerPipeLines.layers,
+      pageSize: 10,
       total: 0,
       form: {
-        pipelineType: '绠$綉',
+        pipelineType: '绠$嚎',
         dataType: '',
         keyword: ''
       },
@@ -110,9 +111,10 @@
       isWaybillHover: true,
       isRouteHover: false,
       facilitiesParameter: null,
-      //  fuShuSheShiShow: false,
-
-      activeNum: -1
+      fuShuSheShiShow: true,
+      fuShuSheShiPanelShow: true,
+      activeNum: -1,
+      wfsHelper: null
     }
   },
   props: ['title'],
@@ -123,6 +125,10 @@
     },
     handleClick (tab, event) {
       console.log(tab, event)
+    },
+    handlePage (page) {
+      this.wfsHelper.setPage(page)
+      this.handleSearch()
     },
     // 璁炬柦绫诲瀷绛涢��
     handlePipelineType (val) {
@@ -142,34 +148,40 @@
     async handleSearch () {
       // console.log(this.form.dataType.sname, this.form.keyword)
       this.list = []
-      var wfsHelper = new WfsHelper()
+      this.wfsHelper.clearFilter()
       // todo 鐜板湪绠$綉杩樻病鍖哄垎寮�绫诲瀷锛屽悗闈㈡敼
-      wfsHelper.addTypeName(this.form.dataType.sname)
-      wfsHelper.addLike('name', this.form.keyword)
+      this.wfsHelper.setTypeName([this.form.dataType.typeName])
+      if (this.form.keyword) {
+        this.wfsHelper.addLike('name', this.form.keyword)
+      }
       // const _this = this
-      const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {})
-      console.log(res)
+      const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
       if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
+        this.total = res.totalFeatures
         this.list = res.features
       }
     },
     handleLocation (val, index) {
+      console.log(val)
+      // console.log(val)
       this.activeNum = index
-
-      this.facilitiesParameter = val
       // layer && layer.openPopup()
+      window.layerFactory.flyByFeature(val, this.form.dataType.code)
+    },
+    btnAffiliatedFacilities (val, index) {
+      this.activeNum = index
+      this.facilitiesParameter = val
       // 鍒ゆ柇閫夋嫨鏄惁鏄绾匡紝濡傛灉鏄垯鏄剧ず銆婇檮灞炶鏂姐�嬪脊妗�
-      /* if (this.form.pipelineType === '绠$嚎') {
-        for (let i = 0; i < this.items.length; i++) {
-          const item = this.items[i]
-          if (item.name === '闄勫睘璁炬柦') {
-            this.fuShuSheShiSubItems = item.layers
-            // console.log(this.fuShuSheShiSubItems)
-          }
-        }
-      } */
+      if (this.form.pipelineType === '绠$嚎') {
+        this.fuShuSheShiShow = true
+      } else {
+        this.fuShuSheShiShow = false
+      }
       window.layerFactory.flyByFeature(val, this.form.dataType.code)
     }
+  },
+  mounted () {
+    this.wfsHelper = new WfsHelper()
   }
 }
 </script>

--
Gitblit v1.8.0