|
@@ -431,6 +431,7 @@
|
|
|
<ExamRecordDetail
|
|
|
:exam-record-data-id="curSelectedExamRecordDataId"
|
|
|
:show-audit-button="curSelectedShowAuditButton"
|
|
|
+ :need-loading="needLoading"
|
|
|
@changeExamRecordData="changeExamRecordData"
|
|
|
@auditExamRecordData="auditExamRecordData"
|
|
|
></ExamRecordDetail>
|
|
@@ -451,6 +452,7 @@ export default {
|
|
|
return {
|
|
|
curSelectedExamRecordDataId: null,
|
|
|
curSelectedShowAuditButton: false,
|
|
|
+ needLoading: false,
|
|
|
examRecordDataDialog: false,
|
|
|
toNext: false,
|
|
|
curTotalPages: 0,
|
|
@@ -705,7 +707,7 @@ export default {
|
|
|
this.resetForm();
|
|
|
this.showAllCondition = false;
|
|
|
},
|
|
|
- search(type) {
|
|
|
+ async search(type) {
|
|
|
if (!this.form.examId) {
|
|
|
this.$notify({
|
|
|
title: "警告",
|
|
@@ -728,7 +730,7 @@ export default {
|
|
|
// params.status = "UN_PASS";
|
|
|
// }
|
|
|
|
|
|
- this.$http
|
|
|
+ await this.$http
|
|
|
.post("/api/ecs_oe_admin/exam/audit/list", params)
|
|
|
.then((response) => {
|
|
|
if (response.data) {
|
|
@@ -792,7 +794,7 @@ export default {
|
|
|
this.curSelectedExamRecordDataId = examRecordDataId;
|
|
|
this.curSelectedRow(examRecordDataId);
|
|
|
},
|
|
|
- changeExamRecordData(isNext) {
|
|
|
+ async changeExamRecordData(isNext) {
|
|
|
// console.log("isNext:" + isNext);
|
|
|
let curId = null;
|
|
|
let isFirst = false;
|
|
@@ -808,31 +810,50 @@ export default {
|
|
|
if (!isLast) {
|
|
|
curId = this.tableData[n + 1].examRecordDataId;
|
|
|
} else {
|
|
|
- // if (this.form.pageNo < this.curTotalPages) {
|
|
|
- // // 跳到下一页
|
|
|
- // curId = null;
|
|
|
- // this.handleCurrentChange(this.form.pageNo + 1);
|
|
|
- // }
|
|
|
- this.$message({
|
|
|
- message: "当前数据为最后一条!",
|
|
|
- type: "warning",
|
|
|
- showClose: true,
|
|
|
- });
|
|
|
+ if (this.form.pageNo < this.curTotalPages) {
|
|
|
+ // 跳到下一页
|
|
|
+ curId = null;
|
|
|
+ this.form.pageNo = this.form.pageNo + 1;
|
|
|
+ console.log("+++>toPage:" + this.form.pageNo);
|
|
|
+ this.needLoading = true;
|
|
|
+ await this.search();
|
|
|
+ this.needLoading = false;
|
|
|
+
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ curId = this.tableData[0].examRecordDataId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为最后一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if (!isFirst) {
|
|
|
curId = this.tableData[n - 1].examRecordDataId;
|
|
|
} else {
|
|
|
- // if (this.form.pageNo > 1) {
|
|
|
- // // 跳到上一页
|
|
|
- // curId = null;
|
|
|
- // this.handleCurrentChange(this.form.pageNo - 1);
|
|
|
- // }
|
|
|
- this.$message({
|
|
|
- message: "当前数据为第一条!",
|
|
|
- type: "warning",
|
|
|
- showClose: true,
|
|
|
- });
|
|
|
+ if (this.form.pageNo > 1) {
|
|
|
+ // 跳到上一页
|
|
|
+ curId = null;
|
|
|
+ this.form.pageNo = this.form.pageNo - 1;
|
|
|
+ console.log("--->toPage:" + this.form.pageNo);
|
|
|
+ this.needLoading = true;
|
|
|
+ await this.search();
|
|
|
+ this.needLoading = false;
|
|
|
+
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ curId =
|
|
|
+ this.tableData[this.tableData.length - 1].examRecordDataId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为第一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
break;
|