wangting
2025-01-07 49cdf259bfdb99b0c6b3b4430df8b7a715989795
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -11,12 +11,12 @@
              <el-radio v-model="treeRadio" label="1" @input="TreeRadioChange">链接类型树</el-radio>
            </div>
            <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>
                {{ (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>
@@ -90,12 +90,12 @@
            </div>
            <avue-tree ref="cloneTree" v-loading="cloneTreeLoading" :data="cloneTreeData" :option="treeOption"
                       @node-click="cloneTreeNodeClick">
          <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>
@@ -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
        });