duy 2 yıl önce
ebeveyn
işleme
bea7546b0d
1 değiştirilmiş dosya ile 12 ekleme ve 4 silme
  1. 12 4
      src/views/manager/wbsinfo/element.vue

+ 12 - 4
src/views/manager/wbsinfo/element.vue

@@ -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
-        })
+      
       },