deason 2 жил өмнө
parent
commit
d31fa3c193

+ 12 - 1
src/modules/oe/component/ExamRecordDetail.vue

@@ -1,5 +1,9 @@
 <template>
-  <el-main style="overflow: unset; margin-left: 20px" class="el-main-padding">
+  <el-main
+    v-loading="needLoading"
+    style="overflow: unset; margin-left: 20px"
+    class="el-main-padding"
+  >
     <el-row>
       <el-col :span="5">
         <img :src="studentBasePhotoPath" alt width="180" />
@@ -234,6 +238,10 @@ export default {
       type: Boolean,
       default: false,
     },
+    needLoading: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {
@@ -254,6 +262,9 @@ export default {
     examRecordDataId() {
       this.initDetail();
     },
+    needLoading(val) {
+      console.log("needLoading:" + val);
+    },
   },
   created() {
     this.initDetail();

+ 8 - 2
src/modules/oe/views/awaitingAudit.vue

@@ -481,6 +481,7 @@
         <ExamRecordDetail
           :exam-record-data-id="curSelectedExamRecordDataId"
           :show-audit-button="curSelectedShowAuditButton"
+          :need-loading="needLoading"
           @changeExamRecordData="changeExamRecordData"
           @auditExamRecordData="auditExamRecordData"
         ></ExamRecordDetail>
@@ -521,6 +522,7 @@ export default {
     return {
       curSelectedExamRecordDataId: null,
       curSelectedShowAuditButton: false,
+      needLoading: false,
       examRecordDataDialog: false,
       toNext: false,
       curTotalPages: 0,
@@ -671,7 +673,7 @@ export default {
       }
       this.tableLoading = true;
       var params = JSON.parse(JSON.stringify(this.form));
-      this.$http
+      await this.$http
         .post("/api/ecs_oe_admin/exam/record/waiting/audit/list", params)
         .then((response) => {
           if (response.data) {
@@ -895,7 +897,9 @@ export default {
                 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].dataId;
@@ -917,10 +921,12 @@ export default {
                 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].dataId;
+                  curId = this.tableData[this.tableData.length - 1].dataId;
                 }
               } else {
                 this.$message({