From eec84c09617c519754324dbd4e98b558574d0dac Mon Sep 17 00:00:00 2001
From: ChenZeping02609 <chenzeping02609@163.com>
Date: 星期四, 13 五月 2021 15:15:15 +0800
Subject: [PATCH] 企业应急修改

---
 src/components/panel/topicSearch/SewersSearch.vue |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index f667fe9..b2f1dde 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -99,6 +99,7 @@
       list: [],
       items: [LayerPipeLines, LayerFsss, LayerHbss, LayerPk, LayerArea],
       subItems: LayerPipeLines.layers,
+      pageSize: 10,
       total: 0,
       form: {
         pipelineType: '绠$嚎',
@@ -112,7 +113,8 @@
       facilitiesParameter: null,
       fuShuSheShiShow: true,
       fuShuSheShiPanelShow: true,
-      activeNum: -1
+      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,18 +148,22 @@
     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
       // layer && layer.openPopup()
       window.layerFactory.flyByFeature(val, this.form.dataType.code)
@@ -169,6 +179,9 @@
       }
       window.layerFactory.flyByFeature(val, this.form.dataType.code)
     }
+  },
+  mounted () {
+    this.wfsHelper = new WfsHelper()
   }
 }
 </script>

--
Gitblit v1.8.0