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