|
@@ -749,12 +749,20 @@ export default {
|
|
|
},
|
|
|
nodeClick(data){
|
|
|
console.log(data,'treedata');
|
|
|
+ if(data.hasChildren){
|
|
|
+ this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
|
|
|
+ this.loadData=res.records
|
|
|
+ this.page.total=res.total
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ let arr=[]
|
|
|
+ arr.push(data)
|
|
|
+ this.loadData=arr
|
|
|
+ this.page.total=1
|
|
|
+ }
|
|
|
this.curTreeData=data
|
|
|
this.treeId=data.id
|
|
|
- this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
|
|
|
- this.loadData=res.records
|
|
|
- this.page.total=res.total
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|