|
@@ -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){
|