|
@@ -48,7 +48,7 @@
|
|
<div class="page-total">共{{ total }}条</div>
|
|
<div class="page-total">共{{ total }}条</div>
|
|
|
|
|
|
<div class="task-page">
|
|
<div class="task-page">
|
|
- <div class="page-item" @click="toPage(1)" title="首页">
|
|
|
|
|
|
+ <div class="page-item" @click="toFirstPage" title="首页">
|
|
<Icon type="ios-skip-backward" />
|
|
<Icon type="ios-skip-backward" />
|
|
</div>
|
|
</div>
|
|
<div class="page-item" @click="toPrevPage" title="上一页">
|
|
<div class="page-item" @click="toPrevPage" title="上一页">
|
|
@@ -67,7 +67,7 @@
|
|
<div class="page-item" @click="toNextPage" title="下一页">
|
|
<div class="page-item" @click="toNextPage" title="下一页">
|
|
<Icon type="md-arrow-dropright" />
|
|
<Icon type="md-arrow-dropright" />
|
|
</div>
|
|
</div>
|
|
- <div class="page-item" @click="toPage(totalPage)" title="尾页">
|
|
|
|
|
|
+ <div class="page-item" @click="toLastPage" title="尾页">
|
|
<Icon type="ios-skip-forward" />
|
|
<Icon type="ios-skip-forward" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -141,7 +141,7 @@ export default {
|
|
async initData() {
|
|
async initData() {
|
|
const res = await paperCheckProgress({ paperCheckId: this.taskInfo.id });
|
|
const res = await paperCheckProgress({ paperCheckId: this.taskInfo.id });
|
|
if (res && res.secretNumber) {
|
|
if (res && res.secretNumber) {
|
|
- await this.toPage(res.pageNumber + 1);
|
|
|
|
|
|
+ await this.toPage(res.pageNumber);
|
|
const index = this.papers.findIndex(
|
|
const index = this.papers.findIndex(
|
|
(item) => item.sn === res.secretNumber
|
|
(item) => item.sn === res.secretNumber
|
|
);
|
|
);
|
|
@@ -163,8 +163,8 @@ export default {
|
|
|
|
|
|
const res = await fetchFunc({
|
|
const res = await fetchFunc({
|
|
paperCheckId: this.taskInfo.id,
|
|
paperCheckId: this.taskInfo.id,
|
|
- pageNumber: this.current - 1,
|
|
|
|
- pageSize: this.size,
|
|
|
|
|
|
+ page: this.current - 1,
|
|
|
|
+ size: this.size,
|
|
});
|
|
});
|
|
this.papers = res.data.map((item) => {
|
|
this.papers = res.data.map((item) => {
|
|
return {
|
|
return {
|
|
@@ -177,7 +177,7 @@ export default {
|
|
this.current = res.page + 1;
|
|
this.current = res.page + 1;
|
|
},
|
|
},
|
|
async toPage(page) {
|
|
async toPage(page) {
|
|
- if (page > this.totalPage || page < 1) return;
|
|
|
|
|
|
+ if ((this.totalPage && page > this.totalPage) || page < 1) return;
|
|
this.current = page;
|
|
this.current = page;
|
|
await this.getList();
|
|
await this.getList();
|
|
this.pageNo = this.current;
|
|
this.pageNo = this.current;
|
|
@@ -198,17 +198,28 @@ export default {
|
|
this.changePage();
|
|
this.changePage();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- changePage() {
|
|
|
|
|
|
+ async changePage() {
|
|
if (!this.pageNo) return;
|
|
if (!this.pageNo) return;
|
|
- this.toPage(Number(this.pageNo));
|
|
|
|
|
|
+ await this.toPage(Number(this.pageNo));
|
|
|
|
+ this.selectPaper(0);
|
|
|
|
+ },
|
|
|
|
+ async toFirstPage() {
|
|
|
|
+ await this.toPage(1);
|
|
|
|
+ this.selectPaper(0);
|
|
},
|
|
},
|
|
async toPrevPage() {
|
|
async toPrevPage() {
|
|
if (this.current <= 1) return;
|
|
if (this.current <= 1) return;
|
|
await this.toPage(this.current - 1);
|
|
await this.toPage(this.current - 1);
|
|
|
|
+ this.selectPaper(0);
|
|
},
|
|
},
|
|
async toNextPage() {
|
|
async toNextPage() {
|
|
if (this.current >= this.totalPage) return;
|
|
if (this.current >= this.totalPage) return;
|
|
await this.toPage(this.current + 1);
|
|
await this.toPage(this.current + 1);
|
|
|
|
+ this.selectPaper(0);
|
|
|
|
+ },
|
|
|
|
+ async toLastPage() {
|
|
|
|
+ await this.toPage(this.totalPage);
|
|
|
|
+ this.selectPaper(0);
|
|
},
|
|
},
|
|
// menu
|
|
// menu
|
|
async toSwitchMenu(item) {
|
|
async toSwitchMenu(item) {
|