无人机管理后台前端(已迁走)
张含笑
2025-10-29 e17c0a2eceac008182504bdd40143658ab494c0b
src/views/layerManagement/index.vue
@@ -15,6 +15,7 @@
          @update:coverData="handleCoverDataUpdate"
          @update:deitData="handleEdit"
          :activeName="activeName"
          @newFencesMethods="newFencesMethods"
        ></leftList>
        <rightEdit
          v-if="layerParams.addNest || layerParams.editNest && activeType !== '2'"
@@ -63,6 +64,7 @@
  total_count: 0,
  total_area: 0,
  polygonPosition:null,
  decideWhetherToAddOrEdit:null,//新增or编辑围栏
});
provide('layerParams', layerParams);
const handleClick = tab => {
@@ -76,6 +78,7 @@
const selectDataList = ref([]);
// 编辑围栏区域
const handleEdit = val => {
viewer.entities.removeAll();
  layerParams.value.editDetailData = val;
  drawPolygonExample.editThePatch(true);
  const positions = parseGeoDataToPositions(val.geo_data, val.altitude);
@@ -84,6 +87,13 @@
  drawPolygonExample.initPolygon(viewer, positions, true);
 
};
// 新增开启绘制
const newFencesMethods =()=>{
viewer.entities.removeAll();
drawPolygonExample.initHandler(viewer);
   drawPolygonExample.drawTheArea(true)
   drawPolygonExample.startDrawing();
}
// 清除地图数据
const parentMethod = () => {
drawPolygonExample.delPolygon()
@@ -212,7 +222,7 @@
  viewer = publicCesiumInstance.getViewer();
  viewInstance.value = publicCesiumInstance;
  // drawPolygonExample.initHandler(viewer);
};
// 编辑/绘制