From 4e4770fafafb63a593293c234fd23db78faefaae Mon Sep 17 00:00:00 2001 From: ChenZeping <chenzeping> Date: 星期二, 11 五月 2021 10:49:07 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/helpers/WfsHelper.js | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/helpers/WfsHelper.js b/src/components/helpers/WfsHelper.js index 9f9b781..2ea5c7e 100644 --- a/src/components/helpers/WfsHelper.js +++ b/src/components/helpers/WfsHelper.js @@ -6,11 +6,22 @@ this.filters = [] this.typeNames = [] this.url = WFS_URL + this.page = 1 + this.pageSize = 10 this.params = { REQUEST: 'getfeature', OUTPUTFORMAT: 'application/json', - maxFeatures: 20000, - version: '1.0.0' + maxFeatures: 10, + version: '1.0.0', + startIndex: 0 + } + + this.setTypeName = (typeName) => { + this.typeNames = typeName + } + + this.clearFilter = () => { + this.filters = [] } this.addTypeName = (typeName) => { @@ -89,6 +100,12 @@ } return url + this.getUrlParams() } + + this.setPage = (page) => { + const startIndex = page * this.pageSize + this.params.startIndex = startIndex + this.page = page + } } export default WfsHelper -- Gitblit v1.8.0