wangting
2025-01-07 49cdf259bfdb99b0c6b3b4430df8b7a715989795
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -13,7 +13,7 @@
            <avue-tree v-loading="treeLoading" :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>
@@ -92,7 +92,7 @@
                       @node-click="cloneTreeNodeClick">
          <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>
@@ -230,6 +230,7 @@
        const data = res.data.data.map(item => {
          this.processChildren(item); // 处理每个节点
          item.attributes.id = item.attributes.id;
          item.attributes.icon = item.attributes.imageName;
          return item.attributes; // 返回处理后的 attributes
        });
        this.treeData = data;
@@ -248,6 +249,7 @@
          const data = res.data.data.map(item => {
            this.processChildren(item); // 处理每个节点
            item.attributes.id = item.attributes.id;
            item.attributes.icon = item.attributes.imageName;
            return item.attributes; // 返回处理后的 attributes
          });
          this.treeData = data;
@@ -270,6 +272,7 @@
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.id = child.attributes.id;
          child.attributes.icon = child.attributes.imageName;
          this.processChildren(child); // 递归处理每个子节点
          return child.attributes; // 只返回子节点的 attributes
        });