guonan
2025-06-10 f0a0f01ca70e852caf0300fd47d1840799c4d65d
src/components/tools/LayerTree.vue
@@ -278,31 +278,31 @@
}
// 隐患点列表
// watchEffect(() => {
//   const dangerPoints = simStore.DangerPoint.filter((item) =>
//     item.position?.includes("孙胡沟")
//   );
watchEffect(() => {
  const dangerPoints = simStore.DangerPoint.filter((item) =>
    item.position?.includes("孙胡沟")
  );
//   if (dangerPoints && dangerPoints.length > 0) {
//     const list = [];
  if (dangerPoints && dangerPoints.length > 0) {
    const list = [];
//     dangerPoints.forEach((item) => {
//       // console.log(item, "item");
//       item.id = item.hdId;
//       item.name = item.hdName;
//       item.latitude = item.lat;
//       item.longitude = item.lon;
//       item.showBillboard = true;
//       item.type = item.disasterType;
//       item.className = "district";
//       const entity = createPoint(item);
//       entity.show = false;
//       list.push(entity);
//     });
    dangerPoints.forEach((item) => {
      // console.log(item, "item");
      item.id = item.hdId;
      item.name = item.hdName;
      item.latitude = item.lat;
      item.longitude = item.lon;
      item.showBillboard = true;
      item.type = item.disasterType;
      item.className = "district";
      const entity = createPoint(item);
      entity.show = false;
      list.push(entity);
    });
//     treeMap.set("孙胡沟隐患点", list);
//   }
// });
    treeMap.set("孙胡沟隐患点", list);
  }
});
let divPointList = [];
/**
@@ -351,7 +351,7 @@
 * 初始化所有数据
 */
function getData() {
  // initDevicePoint();
  initDevicePoint();
  // initDistrictPoint();
  initDuanmianPoint();
  addTetrahedron();