From 83cc3ab4a4e0298c3444c5f09c49e205170c147c Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 31 Oct 2025 16:41:01 +0800
Subject: [PATCH] feat:国土不显示信息
---
src/views/layerManagement/index.vue | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/views/layerManagement/index.vue b/src/views/layerManagement/index.vue
index b7bee22..59a4883 100644
--- a/src/views/layerManagement/index.vue
+++ b/src/views/layerManagement/index.vue
@@ -208,9 +208,8 @@
});
});
focusOnAllFeatures();
- if (activeName.value !== '国土空间规划') {
- viewInstance.value?.addLeftClickEvent(null, handleFenceClick);
- }
+ viewInstance.value?.addLeftClickEvent(null, handleFenceClick);
+
};
//计算所有图斑的包围球并定位
const focusOnAllFeatures = () => {
@@ -238,15 +237,15 @@
if (Cesium.defined(pickedObject) && pickedObject.id?.customType === 'fence_polygon') {
const selectedEntity = pickedObject.id;
const selectedData = selectedEntity.customInfo;
- viewer.entities.values.forEach(entity => {
- if (entity.customType === 'fence_polygon') {
- entity.polygon.material = entity === selectedEntity
- ? Cesium.Color.RED.withAlpha(0.5)
- : Cesium.Color.YELLOW.withAlpha(0.5);
- }
- });
-
- layerParams.value.editNest = true; // 显示右侧编辑组件
+ // viewer.entities.values.forEach(entity => {
+ // if (entity.customType === 'fence_polygon') {
+ // entity.polygon.material = entity === selectedEntity
+ // ? Cesium.Color.RED.withAlpha(0.5)
+ // : Cesium.Color.YELLOW.withAlpha(0.5);
+ // }
+ // });
+ if (activeName.value !== '国土空间规划') {
+ layerParams.value.editNest = true; // 显示右侧编辑组件
layerParams.value.decideWhetherToAddOrEdit = 2; // 标记为编辑模式
// 根据围栏类型设置fenceType
if (activeName.value === '电子围栏') {
@@ -258,6 +257,8 @@
layerParams.value.fenceArea = selectedData.area;
layerParams.value.editingIsProhibited = true
}
+ }
+
};
let publicCesiumInstance = null;
let viewer = null;
--
Gitblit v1.9.3