From b9e41e3fe07d9d33e07e1c7f16fe68a8edc52f5a Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期六, 08 五月 2021 10:37:08 +0800 Subject: [PATCH] 管段高亮 --- src/components/helpers/WfsHelper.js | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/helpers/WfsHelper.js b/src/components/helpers/WfsHelper.js index b9cd594..20093e6 100644 --- a/src/components/helpers/WfsHelper.js +++ b/src/components/helpers/WfsHelper.js @@ -1,11 +1,11 @@ /** * 鍔犺浇WMS,鎷兼帴FILTER,LAYERS鍙傛暟绛� */ -import MapConfig from '../../conf/MapConfig' +import { PIPELINE_WFS } from '../../conf/Constants' function WfsHelper () { this.filters = [] this.typeNames = [] - this.url = MapConfig.PIPELINE_WFS + this.url = PIPELINE_WFS this.params = { REQUEST: 'getfeature', OUTPUTFORMAT: 'JSON', @@ -23,8 +23,10 @@ } this.addLike = (property, literal) => { - var filter = '<PropertyIsLike><PropertyName>' + property + '</PropertyName><Literal>*' + literal + '*</Literal></PropertyIsLike>' - this.filters.push(filter) + if (property && literal) { + var filter = '<PropertyIsLike><PropertyName>' + property + '</PropertyName><Literal>*' + literal + '*</Literal></PropertyIsLike>' + this.filters.push(filter) + } } /** -- Gitblit v1.8.0