|
@@ -164,19 +164,18 @@ export default {
|
|
|
this.treeData[0].sub = res.data
|
|
|
// this.openChildrenNode(this.treeData)
|
|
|
// this.ergodic(this.treeData)
|
|
|
- function a (row){debugger;
|
|
|
- row.forEach(item=>{
|
|
|
- if(item.sub.length==0){
|
|
|
- item.expand = true
|
|
|
-
|
|
|
- }else{
|
|
|
- item.expand = true
|
|
|
- this.ergodic(item)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- a(this.treeData)
|
|
|
- console.log(this.treeData)
|
|
|
+ this.treeData.forEach(item=>{
|
|
|
+ item.expand=true;
|
|
|
+ if(item.sub.length!=0)
|
|
|
+ item.sub.forEach(_item=>{
|
|
|
+ _item.expand=true;
|
|
|
+ if(_item.sub.length!=0){
|
|
|
+ _item.sub.forEach(__item=>{
|
|
|
+ __item.expand=true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}).catch((err) => { });
|
|
|
},
|
|
|
ergodic(row){
|