deason 2 年之前
父节点
当前提交
dc5c23395c
共有 2 个文件被更改,包括 51 次插入41 次删除
  1. 28 16
      src/modules/oe/component/ExamRecordDetail.vue
  2. 23 25
      src/modules/oe/views/awaitingAudit.vue

+ 28 - 16
src/modules/oe/component/ExamRecordDetail.vue

@@ -11,12 +11,15 @@
           <el-col :span="8" class="capture-title">
             <span>考试记录ID:{{ examRecordDataId }}</span>
           </el-col>
-          <el-col v-if="showAuditButton" :span="8" style="text-align: center">
+          <el-col
+            v-if="showAuditButton && needAudit"
+            :span="8"
+            style="text-align: center"
+          >
             <el-button
               size="small"
               type="success"
               icon="el-icon-check"
-              :disabled="!needAudit"
               round
               @click="auditExamRecordData(true)"
               >通过</el-button
@@ -25,18 +28,21 @@
               size="small"
               type="danger"
               icon="el-icon-close"
-              :disabled="!needAudit"
               round
               @click="auditExamRecordData(false)"
               >不通过</el-button
             >
           </el-col>
 
-          <el-col :span="showAuditButton ? 8 : 16" style="text-align: right">
+          <el-col
+            :span="showAuditButton && needAudit ? 8 : 16"
+            style="text-align: right"
+          >
             <el-button
               size="small"
               type="primary"
               icon="el-icon-arrow-left"
+              :disabled="needDisable"
               round
               @click="changeExamRecordData(false)"
               >上一条</el-button
@@ -44,6 +50,7 @@
             <el-button
               size="small"
               type="primary"
+              :disabled="needDisable"
               round
               @click="changeExamRecordData(true)"
               >下一条 <i class="el-icon-arrow-right el-icon--right"></i
@@ -226,9 +233,10 @@ export default {
       examRecordData: [],
       photoCaptures: [],
       examProcessRecords: [],
-      studentBasePhotoPath: "",
-      syncCapturePhotoPath: "",
+      studentBasePhotoPath: "/img/no-photo.jpg",
+      syncCapturePhotoPath: "/img/no-photo-blank.png",
       needAudit: false,
+      needDisable: false,
     };
   },
   computed: {
@@ -245,24 +253,28 @@ export default {
   methods: {
     changeExamRecordData(isNext) {
       this.$emit("changeExamRecordData", isNext);
+
+      this.needDisable = true;
+      setTimeout(() => {
+        this.needDisable = false;
+      }, 1000);
     },
     auditExamRecordData(isPass) {
       this.$emit("auditExamRecordData", isPass);
     },
     initDetail() {
+      console.log("initDetail... examRecordDataId:" + this.examRecordDataId);
+      this.examRecordData = [];
+      this.photoCaptures = [];
+      this.examProcessRecords = [];
+      this.studentBasePhotoPath = "/img/no-photo.jpg";
+      this.syncCapturePhotoPath = "/img/no-photo-blank.png";
+      this.needAudit = false;
+
       if (this.examRecordDataId) {
-        console.log("examRecordDataId:" + this.examRecordDataId);
         this.getExamRecordData();
         this.getPhotoCaptures();
         this.getExamProcessRecords();
-      } else {
-        console.log("initDetail...");
-        this.examRecordData = [];
-        this.photoCaptures = [];
-        this.examProcessRecords = [];
-        this.studentBasePhotoPath = "";
-        this.syncCapturePhotoPath = "";
-        this.needAudit = false;
       }
     },
     getExamRecordData() {
@@ -279,7 +291,7 @@ export default {
               this.syncCapturePhotoPath = result.syncCaptureFileUrl;
             }
             if (this.showAuditButton) {
-              this.needAudit = result.isWarn;
+              this.needAudit = result.isWarn && !result.isAudit;
             }
             this.getStudentInfo(result.studentId);
           }

+ 23 - 25
src/modules/oe/views/awaitingAudit.vue

@@ -893,7 +893,7 @@ export default {
       this.curSelectedRow(examRecordDataId);
     },
     changeExamRecordData(isNext) {
-      console.log("isNext:" + isNext);
+      // console.log("isNext:" + isNext);
       let curId = null;
       let isFirst = false;
       let isLast = false;
@@ -908,33 +908,31 @@ 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);
-              } else {
-                this.$message({
-                  message: "当前数据为最后一条!",
-                  type: "warning",
-                  showClose: true,
-                });
-              }
+              // if (this.form.pageNo < this.curTotalPages) {
+              //   // 跳到下一页
+              //   curId = null;
+              //   this.handleCurrentChange(this.form.pageNo + 1);
+              // }
+              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);
-              } else {
-                this.$message({
-                  message: "当前数据为第一条!",
-                  type: "warning",
-                  showClose: true,
-                });
-              }
+              // if (this.form.pageNo > 1) {
+              //   // 跳到上一页
+              //   curId = null;
+              //   this.handleCurrentChange(this.form.pageNo - 1);
+              // }
+              this.$message({
+                message: "当前数据为第一条!",
+                type: "warning",
+                showClose: true,
+              });
             }
           }
           break;
@@ -967,8 +965,8 @@ export default {
         return false;
       }
 
-      // let pendingOperate = !this.currentPagePrivileges.PENDING_OPERATE;
-      this.examRecordDataDialogOpen(row.dataId, true);
+      let pendingOperate = this.currentPagePrivileges.PENDING_OPERATE;
+      this.examRecordDataDialogOpen(row.dataId, pendingOperate);
 
       // this.routeSelectedIds = [];
       // this.routeSelectedIds.push(row.dataId);