wangjuncheng
2025-04-23 8a368655576fd4eb3f517610aa8b30d633f1ea84
src/components/tools/LayerTree.vue
@@ -34,7 +34,7 @@
    label: "三维服务",
    children: [
      { label: "模型数据" },
      { label: "地形数据" }, // 确保这里的 label 是 "地形数据"
      { label: "地形数据" },
      { label: "影像数据" },
    ],
  },
@@ -204,16 +204,12 @@
 */
function toggleLayerVisible(name, checked) {
  const entityList = treeMap.get(name);
  console.log(`Toggling visibility for ${name}:`, checked);
  if (Array.isArray(entityList)) {
    entityList.forEach((entity) => {
      console.log(`Setting entity show to:`, checked);
      entity.show = checked;
    });
  } else if (entityList && typeof entityList.show !== "undefined") {
    console.log(`Setting layer show to:`, checked);
    entityList.show = checked;
  } else {
    console.error(`无法设置图层 ${name} 的可见性`);
@@ -228,7 +224,6 @@
 */
const getDevicetList = async () => {
  await getDevicetListData().then((res) => {
    console.log(res.data, "devicetList.value2");
    devicetList.value = res.data;
  });
};
@@ -392,7 +387,11 @@
.layer-tree {
  background: url("@/assets/img/tools/plotting_new.png");
  width: 200px;
  height: 200px;
  // height: 200px;
  z-index: 99;
  overflow: hidden;
}
/deep/ .el-tree {
    overflow: hidden !important;
}
</style>