|
@@ -78,6 +78,7 @@
|
|
<el-row type="flex" align="middle" justify="end" style="padding-top: 1rem" v-if="usePage">
|
|
<el-row type="flex" align="middle" justify="end" style="padding-top: 1rem" v-if="usePage">
|
|
<el-col :span="24" style="text-align: right">
|
|
<el-col :span="24" style="text-align: right">
|
|
<el-pagination
|
|
<el-pagination
|
|
|
|
+ v-if="showPageView"
|
|
background
|
|
background
|
|
layout="sizes,total, prev, pager, next"
|
|
layout="sizes,total, prev, pager, next"
|
|
:page-sizes="[1, 10, 50, 100, 150, 200]"
|
|
:page-sizes="[1, 10, 50, 100, 150, 200]"
|
|
@@ -117,8 +118,9 @@ export default {
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
pageSelected: [],
|
|
pageSelected: [],
|
|
- currentPage: 1,
|
|
|
|
|
|
+ currentPage: 0,
|
|
limit: this.$limit,
|
|
limit: this.$limit,
|
|
|
|
+ showPageView: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {},
|
|
created() {},
|
|
@@ -283,20 +285,19 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
resetPage() {
|
|
resetPage() {
|
|
- console.log('in 1')
|
|
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.skip = 0;
|
|
this.skip = 0;
|
|
},
|
|
},
|
|
getPageConfig() {
|
|
getPageConfig() {
|
|
- console.log('in 2')
|
|
|
|
return { skip: (this.currentPage - 1) * this.limit, limit: this.limit, currentPage: this.currentPage };
|
|
return { skip: (this.currentPage - 1) * this.limit, limit: this.limit, currentPage: this.currentPage };
|
|
},
|
|
},
|
|
setPage({ skip, limit }) {
|
|
setPage({ skip, limit }) {
|
|
- console.log('in 3')
|
|
|
|
let currentPage = skip / limit + 1;
|
|
let currentPage = skip / limit + 1;
|
|
- // this.currentPage = currentPage;
|
|
|
|
- this.$set(this,'currentPage',currentPage)
|
|
|
|
- console.log(JSON.parse(JSON.stringify(this.currentPage)));
|
|
|
|
|
|
+ this.$set(this, 'currentPage', currentPage);
|
|
|
|
+ this.showPageView = false;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.showPageView = true;
|
|
|
|
+ }, 1000);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|