无人机管理后台前端(已迁走)
张含笑
2025-10-31 83cc3ab4a4e0298c3444c5f09c49e205170c147c
feat:国土不显示信息
1 files modified
25 ■■■■ changed files
src/views/layerManagement/index.vue 25 ●●●● patch | view | raw | blame | history
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;