|
@@ -80,6 +80,9 @@
|
|
|
@on-load="onLoad"
|
|
|
@selection-change="selectionChange"
|
|
|
:table-loading="tabloading"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
>
|
|
|
|
|
|
<template slot="menuRight">
|
|
@@ -834,10 +837,13 @@ export default {
|
|
|
//console.log(cellValue)
|
|
|
},
|
|
|
currentChange (currentPage) {
|
|
|
- this.page.currentPage = currentPage;
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.page.current = currentPage;
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
sizeChange (pageSize) {
|
|
|
- this.page.pageSize = pageSize;
|
|
|
+ this.page.size = pageSize;
|
|
|
},
|
|
|
selectionChange (list) {
|
|
|
this.selectionList = list;
|
|
@@ -860,14 +866,9 @@ export default {
|
|
|
this.curNode=node
|
|
|
this.curTreeData=data
|
|
|
this.treeId=data.id
|
|
|
-
|
|
|
+ this.page.current=1
|
|
|
if(data.hasChildren){
|
|
|
- this.tabloading=true;
|
|
|
- this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
|
|
|
- this.loadData=res.records
|
|
|
- this.page.total=res.total
|
|
|
- this.tabloading=false;
|
|
|
- })
|
|
|
+ this.onLoad(this.page)
|
|
|
}
|
|
|
if(data.hasChildren===false&&node.level==2){
|
|
|
this.tabloading=true;
|
|
@@ -889,15 +890,16 @@ export default {
|
|
|
|
|
|
|
|
|
refreshChange () {
|
|
|
- this.getList();
|
|
|
- this.$message.success('刷新成功')
|
|
|
+ this.searchChange();
|
|
|
+
|
|
|
},
|
|
|
- onLoad(page){
|
|
|
- console.log(this.curNode,'curNode');
|
|
|
+ onLoad(page, params = {}){
|
|
|
if(this.treeId){
|
|
|
- this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize).then((res)=>{
|
|
|
+ this.tabloading=true;
|
|
|
+ this.tabTypeLazyTreeAll(this.treeId, page.current,page.size).then((res)=>{
|
|
|
this.loadData=res.records
|
|
|
this.page.total=res.total
|
|
|
+ this.tabloading=false
|
|
|
})
|
|
|
}
|
|
|
},
|