|
@@ -656,7 +656,7 @@ export default {
|
|
|
this.resetForm();
|
|
|
this.showAllCondition = false;
|
|
|
},
|
|
|
- search(type) {
|
|
|
+ async search(type) {
|
|
|
if (!this.form.examId) {
|
|
|
this.$notify({
|
|
|
title: "警告",
|
|
@@ -874,7 +874,7 @@ export default {
|
|
|
this.curSelectedExamRecordDataId = examRecordDataId;
|
|
|
this.curSelectedRow(examRecordDataId);
|
|
|
},
|
|
|
- changeExamRecordData(isNext) {
|
|
|
+ async changeExamRecordData(isNext) {
|
|
|
// console.log("isNext:" + isNext);
|
|
|
let curId = null;
|
|
|
let isFirst = false;
|
|
@@ -890,31 +890,45 @@ export default {
|
|
|
if (!isLast) {
|
|
|
curId = this.tableData[n + 1].dataId;
|
|
|
} 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);
|
|
|
+ await this.search();
|
|
|
+
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ curId = this.tableData[0].dataId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为最后一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if (!isFirst) {
|
|
|
curId = this.tableData[n - 1].dataId;
|
|
|
} 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);
|
|
|
+ await this.search();
|
|
|
+
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ curId = this.tableData[0].dataId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为第一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
break;
|