|
@@ -28,12 +28,14 @@
|
|
|
<!-- 添加 -->
|
|
|
<span>
|
|
|
<!-- 调整排序 -->
|
|
|
- <i
|
|
|
- class="el-icon-sort"
|
|
|
- @click="sortpai(data, node)"
|
|
|
- v-if="node.level == 2"
|
|
|
- title="调整排序"
|
|
|
- ></i>
|
|
|
+ <el-link :underline="false">
|
|
|
+ <i
|
|
|
+ class="el-icon-sort"
|
|
|
+ @click="sortpai(data, node)"
|
|
|
+ v-if="node.level == 2"
|
|
|
+ title="调整排序"
|
|
|
+ ></i>
|
|
|
+ </el-link>
|
|
|
</span>
|
|
|
</div>
|
|
|
</span>
|
|
@@ -78,6 +80,9 @@
|
|
|
@on-load="onLoad"
|
|
|
@selection-change="selectionChange"
|
|
|
:table-loading="tabloading"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
>
|
|
|
|
|
|
<template slot="menuRight">
|
|
@@ -832,10 +837,13 @@ export default {
|
|
|
//console.log(cellValue)
|
|
|
},
|
|
|
currentChange (currentPage) {
|
|
|
- this.page.currentPage = currentPage;
|
|
|
+ console.log('currentPage');
|
|
|
+ this.page.current = currentPage;
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
sizeChange (pageSize) {
|
|
|
- this.page.pageSize = pageSize;
|
|
|
+ this.page.size = pageSize;
|
|
|
},
|
|
|
selectionChange (list) {
|
|
|
this.selectionList = list;
|
|
@@ -858,14 +866,10 @@ export default {
|
|
|
this.curNode=node
|
|
|
this.curTreeData=data
|
|
|
this.treeId=data.id
|
|
|
-
|
|
|
+ this.page.current=1;
|
|
|
+ this.page.currentPage=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;
|
|
@@ -887,15 +891,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.tabloading=true;
|
|
|
this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize).then((res)=>{
|
|
|
this.loadData=res.records
|
|
|
this.page.total=res.total
|
|
|
+ this.tabloading=false
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -910,7 +915,7 @@ export default {
|
|
|
})
|
|
|
}else{
|
|
|
|
|
|
- this.tabTypeLazyTreeAll(this.curNode.data.parentId,this.page.current,this.page.size,this.input3).then((res)=>{
|
|
|
+ this.tabTypeLazyTreeAll(this.curNode.data.parentId,this.page.current,1000,this.input3).then((res)=>{
|
|
|
let faArr=res.records;
|
|
|
this.loadData=faArr.filter((item)=>{
|
|
|
if(item.id===this.treeId){
|
|
@@ -944,6 +949,7 @@ export default {
|
|
|
|
|
|
}, 1000);
|
|
|
}else{
|
|
|
+ this.tabloading=true;
|
|
|
this.loadData=[]
|
|
|
this.page.total=0
|
|
|
setTimeout(() => {
|
|
@@ -1470,4 +1476,5 @@ export default {
|
|
|
background-color: #9dc5ee;
|
|
|
color: white;
|
|
|
}
|
|
|
+
|
|
|
</style>
|