|
|
@@ -27,7 +27,7 @@
|
|
|
<el-tab-pane label="新建审核" name="checking">
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange(createCurrentPage, 'create', 'CHECKING')"
|
|
|
+ @current-change="handleCurrentChange_CREATE"
|
|
|
:current-page="createCurrentPage"
|
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
|
:page-size="pageSize"
|
|
|
@@ -49,7 +49,7 @@
|
|
|
<!--todo: 设计UpdateQuestionCard并且在这里应用-->
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange(updateCurrentPage, 'update', 'UPDATING')"
|
|
|
+ @current-change="handleCurrentChange_UPDATE"
|
|
|
:current-page="updateCurrentPage"
|
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
|
:page-size="pageSize"
|
|
|
@@ -70,7 +70,7 @@
|
|
|
<el-tab-pane label="删除审核" name="deleting">
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange(executeCurrentPage, 'execute', 'EXECUTED')"
|
|
|
+ @current-change="handleCurrentChange_EXECUTED"
|
|
|
:current-page="executeCurrentPage"
|
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
|
:page-size="pageSize"
|
|
|
@@ -182,10 +182,49 @@ export default {
|
|
|
console.log(error);
|
|
|
})
|
|
|
},
|
|
|
+ handleCurrentChange_CREATE(val){
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ this.checkQuestionPage = val;
|
|
|
+ this.$api.getStateQuestion('CREATING',val - 1, this.pageSize)
|
|
|
+ .then(res => {
|
|
|
+ console.log("handleCurrentChange-create");
|
|
|
+ console.log(res);
|
|
|
+ this.createQuestionList = res.data.result.content;
|
|
|
+ this.createTotalNum = res.data.result.totalElements;
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCurrentChange_UPDATE(val){
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ this.checkQuestionPage = val;
|
|
|
+ this.$api.getStateQuestion('UPDATING',val - 1, this.pageSize)
|
|
|
+ .then(res => {
|
|
|
+ console.log("handleCurrentChange-update");
|
|
|
+ console.log(res);
|
|
|
+ this.updateQuestionList = res.data.result.content;
|
|
|
+ this.updateTotalNum = res.data.result.totalElements;
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCurrentChange_EXECUTED(val){
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ this.checkQuestionPage = val;
|
|
|
+ this.$api.getStateQuestion('EXECUTED',val - 1, this.pageSize)
|
|
|
+ .then(res => {
|
|
|
+ console.log("handleCurrentChange-execute");
|
|
|
+ console.log(res);
|
|
|
+ this.executeQuestionList = res.data.result.content;
|
|
|
+ this.executeTotalNum = res.data.result.totalElements;
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
handleCurrentChange(val, currentPage, operate_type, states) { // 当点击新的页面时才请求新的数据
|
|
|
console.log(`Check-handleCurrentChange 当前页: ${val}`);
|
|
|
currentPage = val;
|
|
|
- this.$api.getStateQuestion(states, val, this.pageSize)
|
|
|
+ this.$api.getStateQuestion(states, val - 1, this.pageSize)
|
|
|
.then(res => {
|
|
|
console.log("handleCurrentChange-check");
|
|
|
console.log(res);
|