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