wangting
2025-01-07 49cdf259bfdb99b0c6b3b4430df8b7a715989795
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -6,12 +6,12 @@
          <!-- 左侧树 -->
          <div style="height:  calc(100vh - 190px);">
            <avue-tree ref="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>
                {{ (node || {}).label }}
            </span>
          </span>
              <span slot-scope="{ node, data }" class="el-tree-node__label">
               <span>
                  <icon-show :name="data.icon"></icon-show>
                    {{ (node || {}).label }}
                </span>
              </span>
            </avue-tree>
          </div>
        </div>
@@ -866,6 +866,7 @@
        const data = res.data.data.map(item => {
          this.processChildren(item); // 处理每个节点
          item.attributes.TreeName = item.attributes.id;
          item.attributes.icon = item.attributes.imageName;
          return item.attributes; // 返回处理后的 attributes
        });
        this.treeData[0].children = data;
@@ -879,6 +880,7 @@
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.TreeName = child.attributes.id;
          child.attributes.icon = child.attributes.imageName;
          this.processChildren(child); // 递归处理每个子节点
          return child.attributes; // 只返回子节点的 attributes
        });