|
@@ -60,8 +60,11 @@
|
|
|
ref="crud"
|
|
|
@selection-change="selectionChange"
|
|
|
:page.sync="page"
|
|
|
- :table-loading="tabloading"
|
|
|
- @on-load="onLoad"
|
|
|
+ :table-loading="tabloading"
|
|
|
+ @on-load="onLoad"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
>
|
|
|
|
|
|
|
|
@@ -470,13 +473,24 @@ export default {
|
|
|
}))
|
|
|
})
|
|
|
},
|
|
|
- searchChange(){
|
|
|
+ searchChange(){
|
|
|
if(this.treeId){
|
|
|
this.onLoad2()
|
|
|
}else{
|
|
|
this.$message.warning("请先选择左侧节点");
|
|
|
}
|
|
|
},
|
|
|
+ currentChange (currentPage) {
|
|
|
+ this.page.current = currentPage;
|
|
|
+
|
|
|
+ },
|
|
|
+ sizeChange (pageSize) {
|
|
|
+ this.page.size = pageSize;
|
|
|
+ },
|
|
|
+ refreshChange () {
|
|
|
+ this.searchChange();
|
|
|
+
|
|
|
+ },
|
|
|
clearinput(){
|
|
|
this.searchChange()
|
|
|
},
|
|
@@ -546,15 +560,19 @@ export default {
|
|
|
console.log(data,node,'treedata');
|
|
|
this.curNode=node
|
|
|
this.treeId=data.id
|
|
|
- this.curTreeData=data
|
|
|
+ this.curTreeData=data;
|
|
|
+ this.page.current=1;
|
|
|
+ this.page.currentPage=1
|
|
|
+ console.log(this.page,'this.page111111');
|
|
|
if(data.hasChildren){
|
|
|
- this.tabloading=true;
|
|
|
- this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
|
|
|
- console.log(res.records);
|
|
|
- this.loadData=res.records;
|
|
|
- this.page.total=res.total;
|
|
|
- this.tabloading=false;
|
|
|
- })
|
|
|
+ this.onLoad(this.page)
|
|
|
+ // this.tabloading=true;
|
|
|
+ // this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
|
|
|
+ // console.log(res.records);
|
|
|
+ // this.loadData=res.records;
|
|
|
+ // this.page.total=res.total;
|
|
|
+ // this.tabloading=false;
|
|
|
+ // })
|
|
|
}
|
|
|
if(data.hasChildren===false&&node.level==2){
|
|
|
this.tabloading=true;
|