无人机管理后台前端(已迁走)
张含笑
2025-11-17 d2e39841423059e03d9dddb1de976081fcf16e34
feat:全量聚焦
1 files modified
29 ■■■■ changed files
src/views/layerManagement/index.vue 29 ●●●● patch | view | raw | blame | history
src/views/layerManagement/index.vue
@@ -244,10 +244,7 @@
      },
      zIndex: 99, 
    });
  });
  console.log('layerParams.value.isSingleLocating',layerParams.value.isSingleLocating);
  });
 if (!layerParams.value.isSingleLocating) {
    focusOnAllFeatures(); 
  }
@@ -258,8 +255,6 @@
  
  // 判断是否有指定定位的文件夹
  if (layerParams.value.currentLocationFolderId) {
  console.log('11111111');
    // 筛选当前文件夹下的所有子节点坐标
    const targetFolderPositions = selectDataList.value
      .filter(item => item.folder_id === layerParams.value.currentLocationFolderId)
@@ -283,8 +278,8 @@
      return; // 仅聚焦当前文件夹,结束方法
    }
  }
 console.log('333333');
  // 无指定文件夹时,聚焦所有选中数据(保持原有逻辑)
  // 无指定文件夹时,聚焦所有选中数据
  const positionsData = tbJwdList.map(pos => [
    pos.lng,
    pos.lat,
@@ -456,24 +451,6 @@
});
//定位到指定节点
// const focusOnNode = (nodeData) => {
//   if (!viewer || !nodeData?.geo_data) return;
//   // 解析节点坐标
//   const positions = parseGeoDataToPositions(nodeData.geo_data, nodeData.altitude);
// if (positions.length < 3) {
//     return;
//   }
//   flyVisual({
//     positionsData: positions.map(pos => [pos.lng, pos.lat, pos.height || 0]),
//     viewer,
//       multiple:activeName.value == '国土空间规划' ? 13 :7, // 缩放倍数
//     pitch: -90
//   });
// };
// 父组件中修改 focusOnNode 方法
const focusOnNode = (nodeData) => {
  if (!viewer || !nodeData?.geo_data) return;