wangting
2025-01-08 21b92307e71f2e0064f342dc1918c9002095287a
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue
@@ -9,7 +9,7 @@
            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span>
              <i class="el-icon-s-promotion"></i>
              <icon-show :name="data.icon"></icon-show>
                {{ (node || {}).label }}
            </span>
          </span>
@@ -175,6 +175,7 @@
        const data = res.data.data.map(item => {
          this.processChildren(item); // 处理每个节点
          item.attributes.label = item.attributes.id;
          item.attributes.icon = item.attributes.imageName;
          return item.attributes;
        });
        this.treeData[0].children = data;
@@ -188,6 +189,7 @@
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.label = child.attributes.id;
          child.attributes.icon = child.attributes.imageName;
          this.processChildren(child); // 递归处理每个子节点
          return child.attributes; // 只返回子节点的 attributes
        });