| | |
| | | </div> |
| | | <!-- 左侧树 --> |
| | | <div style="height: calc(100vh - 330px);"> |
| | | <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <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 style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | |
| | | name: 'el-icon-tickets', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | treeLoading:false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | //树表查询 |
| | | getTreeList() { |
| | | this.treeLoading = true; |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | this.processChildren(item); // 处理每个节点 |
| | |
| | | return item.attributes; // 返回处理后的 attributes |
| | | }); |
| | | this.treeData[0].children = data; |
| | | console.log(this.treeData); |
| | | this.inheritTreeData = data; |
| | | this.treeLoading = false; |
| | | }); |
| | | }, |
| | | |