From 2cbc4c3ce921f22ae2fd498098d46dbda06c0452 Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期五, 14 五月 2021 14:59:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop

---
 src/components/helpers/WfsHelper.js |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/src/components/helpers/WfsHelper.js b/src/components/helpers/WfsHelper.js
index 9f9b781..8505070 100644
--- a/src/components/helpers/WfsHelper.js
+++ b/src/components/helpers/WfsHelper.js
@@ -6,11 +6,21 @@
   this.filters = []
   this.typeNames = []
   this.url = WFS_URL
+  this.page = 1
+  this.pageSize = 10
   this.params = {
     REQUEST: 'getfeature',
     OUTPUTFORMAT: 'application/json',
-    maxFeatures: 20000,
+    maxFeatures: 10,
     version: '1.0.0'
+  }
+
+  this.setTypeName = (typeName) => {
+    this.typeNames = typeName
+  }
+
+  this.clearFilter = () => {
+    this.filters = []
   }
 
   this.addTypeName = (typeName) => {
@@ -89,6 +99,20 @@
     }
     return url + this.getUrlParams()
   }
+
+  this.setPage = (page) => {
+    const startIndex = page * this.pageSize
+    this.params.startIndex = startIndex
+    this.page = page
+  }
+
+  this.setPageSize = (pageSize) => {
+    this.pageSize = pageSize
+  }
+
+  this.setMaxFeatures = (maxFeatures) => {
+    this.params.maxFeatures = maxFeatures
+  }
 }
 
 export default WfsHelper

--
Gitblit v1.8.0