|
|
@@ -163,8 +163,33 @@ export default {
|
|
|
}).then((res) => {
|
|
|
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)
|
|
|
}).catch((err) => { });
|
|
|
},
|
|
|
+ ergodic(row){
|
|
|
+ row.forEach(item=>{
|
|
|
+ if(item.sub.length==0){
|
|
|
+ item.expand = true
|
|
|
+
|
|
|
+ }else{
|
|
|
+ item.expand = true
|
|
|
+ this.ergodic(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleSet () {
|
|
|
this.type = 1
|
|
|
this.showModal = true
|