wangting
2025-01-08 354cad3d3ab22ba147169beb6a0f6f51b9bab3a8
Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/UIDialog.vue
@@ -13,7 +13,7 @@
      <basic-container style="height: 500px">
        <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
           <span>
              <i class="el-icon-user-solid"></i>
                {{ (node || {}).label }}
            </span>
@@ -28,7 +28,7 @@
        <div style="height: 445px;">
          <avue-tree ref="uiTree" :data="uiTreeData" :option="uiTreeOption">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
            <span style="font-size: 15px">
            <span>
              <i :class="data.icon"></i>
                {{ (node || {}).label }}
            </span>
@@ -77,7 +77,7 @@
      uiTreeOption: {
        nodeKey:'oid',
        checkOnClickNode:true,
        defaultExpandKeys:[],
        defaultExpandedKeys:this.defaultExpandKeys,
        multiple: true,
        menu: false,
        addBtn: false,
@@ -124,7 +124,7 @@
      this.defaultExpandKeys=['root'];
      getUIAuthor(params).then(res => {
        this.processChildren(res.data.data[0]); // 处理每个节点
        this.uiTreeOption.defaultExpandKeys=this.defaultExpandKeys;
        this.uiTreeOption.defaultExpandedKeys=this.defaultExpandKeys;
        this.uiTreeData = [{
          attributes: {},
          checked: false,
@@ -145,12 +145,12 @@
    processChildren(item) {
      if (item.children && item.children.length > 0) {
        item.children = item.children.map(child => {
          if(child.level<5){
          if(child.level<4){
            this.defaultExpandKeys.push(child.oid)
          }
          if(child.level==1){
            child.icon='el-icon-s-promotion';
            child.label=child.data.label+'('+child.data.name+')'
            child.label=child.data.label+'('+child.data.name+')'
          }else if(child.level==2){
            child.icon='el-icon-s-order';
            child.label=child.text
@@ -161,7 +161,7 @@
            child.icon='el-icon-document';
            child.label=child.text
          }else if(child.level==5){
            child.icon='el-icon-s-ticket';
            child.icon='el-icon-s-tools';
            child.label=child.text
          }
          this.processChildren(child); // 递归处理每个子节点