deason %!s(int64=2) %!d(string=hai) anos
pai
achega
3a2fe2a5d4
Modificáronse 1 ficheiros con 36 adicións e 22 borrados
  1. 36 22
      src/modules/oe/views/awaitingAudit.vue

+ 36 - 22
src/modules/oe/views/awaitingAudit.vue

@@ -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;