zhuliu 1 سال پیش
والد
کامیت
9041c77c8a
1فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 11 2
      src/views/analyse/custom/index.vue

+ 11 - 2
src/views/analyse/custom/index.vue

@@ -322,8 +322,17 @@ export default {
               data.sort = 1
             }
           }else{
-            data.parentId = null
-            data.sort = 1
+            if(this.treeList.length>0){
+              data.parentId = this.treeList[0].id
+              if(this.treeList[0].children){
+                data.sort = this.treeList[0].children.length +1
+              }else{
+                data.sort = 1
+              }
+            }else{
+              data.parentId = null
+              data.sort = 1
+            }
           }
         }else{
           if(this.treeList.length>0){