From 6db05874981169137dac69b6cee328c496c7d518 Mon Sep 17 00:00:00 2001
From: QI_YUJIE <2878090898@qq.com>
Date: Tue, 29 Aug 2023 09:06:39 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/contracted/village/map/map.vue | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/views/contracted/village/map/map.vue b/src/views/contracted/village/map/map.vue
index 7fa68b58..725ddeb0 100644
--- a/src/views/contracted/village/map/map.vue
+++ b/src/views/contracted/village/map/map.vue
@@ -19,12 +19,12 @@
图例
-
-
-
-
-
-
+
+
+
+
+
+
@@ -182,7 +182,6 @@
name: "contractedVillageContractor",
data() {
return {
- result: [],
form: {}, // 地块信息表单参数
map: "", // 地图
mapGeoServerUrl: "", // geoserver地址
@@ -215,6 +214,7 @@
showDeleteBtn: false, // 控制删除按钮的显示隐藏
isDisabled: false, // 是否禁用
taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成
+ landCategory: ['10'], // 地块类别
};
},
created() {
@@ -418,6 +418,13 @@
});
});
},
+ filterLandLayer() {
+ if (this.landLayer) {
+ this.map.removeLayer(this.landLayer);
+ this.landLayer = "";
+ }
+ this.addLandLayer();
+ },
// 添加地块图层
addLandLayer() {
this.landLayer = new ol.layer.Image({
@@ -425,7 +432,7 @@
url: this.mapGeoServerUrl + '/wms',
params: {
LAYERS: this.landLayerName,
- cql_filter: "dept_id = '" + this.$route.query.deptId + "'",
+ cql_filter: "dept_id = '" + this.$route.query.deptId + "' and DKLB in (" + this.landCategory + ")",
SRID: 3857,
abc: Math.random() // 无效参数,保证每次发送的请求都不一样
}