From 1d85f0febade61aa76d15ab7a65e03cf89c92fab Mon Sep 17 00:00:00 2001
From: YANGDL <114714267@qq.com>
Date: 星期五, 05 三月 2021 16:16:25 +0800
Subject: [PATCH] 修改污水管网png图片大小

---
 src/components/helpers/WfsHelper.js |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/components/helpers/WfsHelper.js b/src/components/helpers/WfsHelper.js
index 64a6dd3..9cac21f 100644
--- a/src/components/helpers/WfsHelper.js
+++ b/src/components/helpers/WfsHelper.js
@@ -1,10 +1,11 @@
 /**
  * 鍔犺浇WMS,鎷兼帴FILTER,LAYERS鍙傛暟绛�
  */
+import MapConfig from '../../conf/MapConfig'
 function WfsHelper () {
   this.filters = []
   this.typeNames = []
-  this.url = 'http://xearth.cn:6289/server/ogcserver/PipeLine/wfs'
+  this.url = MapConfig.BLUEMAP_HOST + '/server/ogcserver/PipeLine/wfs'
   this.params = {
     REQUEST: 'getfeature',
     OUTPUTFORMAT: 'JSON',
@@ -16,11 +17,20 @@
     this.typeNames.push(typeName)
   }
 
-  this.appendEquals = (property, literal) => {
+  this.addEquals = (property, literal) => {
     var filter = '<PropertyIsEqualTo><PropertyName>' + property + '</PropertyName><Literal>' + literal + '</Literal></PropertyIsEqualTo>'
     this.filters.push(filter)
   }
 
+  this.addLike = (property, literal) => {
+    var filter = '<PropertyIsLike><PropertyName>' + property + '</PropertyName><Literal>*' + literal + '*</Literal></PropertyIsLike>'
+    this.filters.push(filter)
+  }
+
+  /**
+   * 寰楀埌filter鍙傛暟鍊�
+   * @returns {string|null}
+   */
   this.getFilterParams = () => {
     var head = '<Filter xmlns="http://www.opengis.net/ogc">'
     var end = '</Filter>'
@@ -29,6 +39,10 @@
       for (var i = 0; i < this.filters.length; i++) {
         filter += this.filters[i]
       }
+      // 褰撴潯浠舵暟 > 1鏃讹紝闇�瑕佺敤and鏍囩鍖呰9
+      if (this.filters.length > 1) {
+        return ('FILTER=' + head + '<And>' + filter + '</And>' + end)
+      }
       return ('FILTER=' + head + filter + end)
     }
     return null

--
Gitblit v1.8.0