Browse Source

开考超过三天不得继续考试

y595705120 2 years ago
parent
commit
e1a4cc312f

+ 0 - 1
src/containers/center/exam/indexTest.vue

@@ -404,7 +404,6 @@ export default {
     },
     selectCheckBox(value, cidx){
       let index = this.cindex;
-      console.log("selectCheckBox", cidx, value )
       let curAnswer= this.questionList[index];
       if( curAnswer.type == 4 ){
         this.questionList[index].child[cidx].answer = value;

+ 6 - 2
src/containers/center/play/components/iCourseInfo.vue

@@ -84,9 +84,13 @@
     },
     props:['tpl', 'info'],
      methods: {
-         startExam(){
+        startExam(){
+           if( this.tpl.isClosed ==1 ) {
+             this.$message.errorMsg("课程已经关闭", 2)
+             return;
+           }
              this.$emit("startExam",  0)
-         },
+        },
         printCert(){
             this.$emit("printCert")
          },

+ 8 - 0
src/containers/center/play/components/iCourseInfoTest.vue

@@ -135,6 +135,14 @@
         }
       },
       startExam(index) {
+        if( this.end.v <=0 ) {
+          this.$message.errorMsg("开考超过三天,不能继续考试")
+          return;
+        }
+        if( this.tpl.isClosed ==1 ) {
+          this.$message.errorMsg("课程已经关闭", 2)
+          return;
+        }
         this.$emit("startExam", +index)
       },
       printCert() {