dedsudiyu hace 1 semana
padre
commit
9847966f26

+ 8 - 0
src/api/safetyEducationExaminationNew/index.js

@@ -907,3 +907,11 @@ export function examUserPracticeSummary(query) {
     params: query
   })
 }
+//二次确认考试是否已结束
+export function examUserExamAttemptFinished(data) {
+  return request({
+    url: '/exam/user/exam/attempt/finished',
+    method: 'post',
+    data: data
+  })
+}

+ 41 - 7
src/views/safetyEducationExaminationNew/featurePage/mockExam/index.vue

@@ -222,9 +222,17 @@
 
     },
     mounted() {
-      this.initialize()
+      this.initialize();
+      window.addEventListener('beforeunload', this.handleBeforeUnload);
     },
     methods: {
+      //离开提示
+      handleBeforeUnload(e) {
+        if (this.shadeType) return
+        e.preventDefault()
+        e.returnValue = ''
+      },
+      //初始化
       initialize() {
         if (this.$route.query) {
           this.$set(this, 'newData', this.$route.query)
@@ -438,7 +446,8 @@
       },
       //重新考试
       retakeExam(){
-        examUserExamStart({examId:this.newData.examId,examScene:2,}).then(response => {
+        let newData = this.$route.query;
+        examUserExamStart({examId:newData.examId,examScene:2,}).then(response => {
           if(response.data.attemptId){
             this.$set(this.newData, 'attemptId',response.data.attemptId)
             this.$set(this,'shadeType',false);
@@ -510,16 +519,12 @@
             //考试时间即将结束提示
             // console.log('考试时间即将结束提示')
             this.msgError('请注意剩余时间');
-            this.msgError('请注意剩余时间');
-            this.msgError('请注意剩余时间');
           },
           // 倒计时结束
           onFinished: () => {
             //自动交卷
             // console.log('自动交卷')
             this.msgError('考试时间结束,已自动交卷');
-            this.msgError('考试时间结束,已自动交卷');
-            this.msgError('考试时间结束,已自动交卷');
             if(this.currentQuestion.answerTags[0]){
               examUserExamAnswerSave({
                 attemptId: this.newData.attemptId,
@@ -568,7 +573,36 @@
         this.warningTimer.destroy()
         this.warningTimer = null
       }
-    }
+      //销毁提示
+      window.removeEventListener('beforeunload', this.handleBeforeUnload)
+    },
+    //路由跳转时提示
+    beforeRouteLeave(to, from, next) {
+      if (this.submitType) {
+        next()
+        return
+      }
+      let self = this;
+      setTimeout(() => {
+        self.$confirm(
+          '离开页面后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。',
+          '您还有题目未作答',
+          {
+            confirmButtonText: '确定离开',
+            cancelButtonText: '继续答题',
+            type: 'warning',
+            closeOnClickModal: false,
+            closeOnPressEscape: false
+          }
+        ).then(() => {
+          next()
+        }).catch(() => {
+          next(false)
+        })
+      },200)
+      // const confirmed = window.confirm('离开页面后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。')
+      // confirmed ? next() : next(false)
+    },
   }
 </script>
 <style scoped lang="scss">

+ 41 - 7
src/views/safetyEducationExaminationNew/featurePage/startTheExam/index.vue

@@ -172,9 +172,17 @@
     created() {
     },
     mounted() {
-      this.initialize()
+      this.initialize();
+      window.addEventListener('beforeunload', this.handleBeforeUnload);
     },
     methods: {
+      //离开提示
+      handleBeforeUnload(e) {
+        if (this.shadeType) return
+        e.preventDefault()
+        e.returnValue = ''
+      },
+      //初始化
       initialize() {
         if (this.$route.query) {
           this.$set(this, 'newData', this.$route.query)
@@ -419,7 +427,8 @@
       },
       //重新考试
       retakeExam(){
-        examUserExamStart({examId:this.newData.examId,examScene:1,}).then(response => {
+        let newData = this.$route.query;
+        examUserExamStart({examId:newData.examId,examScene:1,}).then(response => {
           if(response.data.attemptId){
             this.$set(this.newData, 'attemptId',response.data.attemptId)
             this.$set(this,'shadeType',false);
@@ -487,16 +496,12 @@
             //考试时间即将结束提示
             // console.log('考试时间即将结束提示')
             this.msgError('请注意剩余时间');
-            this.msgError('请注意剩余时间');
-            this.msgError('请注意剩余时间');
           },
           // 倒计时结束
           onFinished: () => {
             //自动交卷
             // console.log('自动交卷')
             this.msgError('考试时间结束,已自动交卷');
-            this.msgError('考试时间结束,已自动交卷');
-            this.msgError('考试时间结束,已自动交卷');
             if(this.currentQuestion.answerTags[0]){
               examUserExamAnswerSave({
                 attemptId: this.newData.attemptId,
@@ -545,7 +550,36 @@
         this.warningTimer.destroy()
         this.warningTimer = null
       }
-    }
+      //销毁提示
+      window.removeEventListener('beforeunload', this.handleBeforeUnload)
+    },
+    //路由跳转时提示
+    beforeRouteLeave(to, from, next) {
+      if (this.submitType) {
+        next()
+        return
+      }
+      let self = this;
+      setTimeout(() => {
+        self.$confirm(
+          '离开页面后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。',
+          '您还有题目未作答',
+          {
+            confirmButtonText: '确定离开',
+            cancelButtonText: '继续答题',
+            type: 'warning',
+            closeOnClickModal: false,
+            closeOnPressEscape: false
+          }
+        ).then(() => {
+          next()
+        }).catch(() => {
+          next(false)
+        })
+      },200)
+      // const confirmed = window.confirm('离开页面后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。')
+      // confirmed ? next() : next(false)
+    },
   }
 </script>
 <style scoped lang="scss">

+ 93 - 22
src/views/safetyEducationExaminationNew/safetyTest/mockExam/index.vue

@@ -46,6 +46,7 @@
       </div>
       <div class="page-content-box">
         <div class="for-max-big-box scrollbar-box">
+          <p class="for-null-p" v-if="!dataList[0]">暂无数据</p>
           <div class="for-big-box" v-for="(item,index) in dataList" :key="index">
             <div class="top-box">
               <p class="title-p">{{item.examTypeName}}</p>
@@ -55,7 +56,7 @@
             <div class="bottom-box">
               <p class="text-big-p">{{item.examName}}</p>
               <p class="text-p">{{parseTime(item.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(item.endTime,"{y}-{m}-{d} {h}:{i}")}}</p>
-              <p class="time-p">时长:{{item.answerDuration}}分钟 丨 总分:{{item.totalScore}}分 丨 及格分:{{item.passScore}}分 丨 可考试次数:{{item.attemptLimit==0?'无限':item.attemptLimit}}次</p>
+              <p class="time-p">时长:{{item.answerDuration}}分钟 丨 总分:{{item.totalScore}}分 丨 及格分:{{item.passScore}}分</p>
             </div>
             <p class="position-p-1" v-if="item.conditionType == 1" @click="tableButton(1,item)">完成学时要求后解锁</p>
             <p class="position-p-1" v-if="item.conditionType == 2" @click="tableButton(2,item)">完成考前课程学习后解锁</p>
@@ -81,7 +82,10 @@
   //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
   import { Encrypt,Decrypt} from '@/utils/secret'
-  import { examUserExamMockList,examUserExamTypeSelectExamType,examUserExamStart, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    examUserExamMockList,examUserExamTypeSelectExamType,
+    examUserExamStart,examUserExamAttemptFinished,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'index',
     data() {
@@ -210,27 +214,16 @@
         }else if(type == 3){
           //模拟考试
           if(item.attemptId){
-            this.$router.push({
-              path: '/mockExam',
-              query: {
-                examId: item.examId,
-                attemptId: item.attemptId,
-              }
-            })
+            let obj = {
+              examId: item.examId,
+              attemptId: item.mockExamId,
+            };
+            this.examUserExamAttemptFinished(2,obj);
           }else{
-            examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
-              if(response.data.attemptId){
-                this.$router.push({
-                  path: '/mockExam',
-                  query: {
-                    examId: item.examId,
-                    attemptId: response.data.attemptId,
-                  }
-                })
-              }else{
-                this.msgError(response.message)
-              }
-            })
+            let obj = {
+              examId: item.examId,
+            };
+            this.examUserExamStartPlay(2,obj);
           }
         }else if (type == 6) {
           //返回并刷新
@@ -238,6 +231,78 @@
           this.getList()
         }
       },
+      //二次验证考试是否已结束
+      examUserExamAttemptFinished(type,item){
+        examUserExamAttemptFinished({attemptId:item.attemptId}).then(response => {
+          if(response.data){
+            //已结束
+            if(type == 1){
+              //在线考试
+              if(item.attemptLimit == 0 || item.attemptCount < item.attemptLimit){
+                //获取新试卷
+                this.examUserExamStartPlay(type,item)
+              }else{
+                //无可用次数 提示并刷新数据列表
+                this.msgError('当前考试已结束')
+                this.handleQuery();
+              }
+            }else if(type == 2){
+              //模拟考试-获取新试卷
+              this.examUserExamStartPlay(type,item)
+            }
+          }else{
+            //未结束
+            this.confirmTitle(type,item);
+          }
+        })
+      },
+      //获取考试试卷
+      examUserExamStartPlay(type,item){
+        examUserExamStart({examId:item.examId,examScene:type,}).then(response => {
+          if(response.data.attemptId){
+            let obj = {
+              examId: item.examId,
+              attemptId: response.data.attemptId,
+            };
+            if(type == 1){
+              obj.type = 1;
+              obj.examKind = item.examKind;
+            }
+            this.confirmTitle(type,obj);
+          }else{
+            this.msgError(response.message)
+          }
+        })
+      },
+      //提示与跳转
+      confirmTitle(type,obj){
+        let self = this;
+        if(type == 1){
+          this.$confirm(
+            '考试期间未完成答题请勿离开页面,离开后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。',
+            '进入考试页面',
+            {
+              confirmButtonText: '确定进入',
+              cancelButtonText: '取消',
+              type: 'warning',
+              closeOnClickModal: false,
+              closeOnPressEscape: false
+            }
+          ).then(() => {
+            //在线考试
+            this.$router.push({
+              path: '/startTheExam',
+              query: obj
+            })
+          }).catch(() => {})
+        }else if(type == 2){
+          //模拟考试
+          self.$router.push({
+            path: '/mockExam',
+            query: obj
+          })
+        }
+      },
       examUserExamTypeSelectExamType(){
         let self = this;
         examUserExamTypeSelectExamType({examType:2}).then(response => {
@@ -355,6 +420,12 @@
       }
       .for-max-big-box{
         flex:1;
+        .for-null-p{
+          text-align: center;
+          font-size:14px;
+          line-height:400px;
+          color:#999;
+        }
         .for-big-box{
           display: inline-block;
           width:760px;

+ 103 - 63
src/views/safetyEducationExaminationNew/safetyTest/onlineExam/index.vue

@@ -46,6 +46,7 @@
       </div>
       <div class="page-content-box">
         <div class="for-max-big-box scrollbar-box">
+          <p class="for-null-p" v-if="!dataList[0]">暂无数据</p>
           <div class="for-big-box" v-for="(item,index) in dataList" :key="index">
             <div class="top-box">
               <p class="title-p">{{item.examTypeName}}</p>
@@ -98,7 +99,11 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
-  import { examUserExamList,examUserExamTypeSelectExamType,examUserExamStart,examUserExamCommitmentConfirm, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    examUserExamList,examUserExamTypeSelectExamType,
+    examUserExamStart,examUserExamCommitmentConfirm,
+    examUserExamAttemptFinished,
+  } from "@/api/safetyEducationExaminationNew/index";
   import richTextPdf from '@/views/safetyEducationExaminationNew/components/richTextPdf.vue';
   export default {
     name: 'index',
@@ -213,26 +218,15 @@
       },
       examUserExamCommitmentConfirm(type,attemptId){
         examUserExamCommitmentConfirm({attemptId:attemptId}).then(response => {
-          if(type == 1){
-            this.$router.push({
-              path: '/startTheExam',
-              query: {
-                attemptId: attemptId,
-                type: '1',
-                examKind:this.preData.examKind,
-              }
-            })
-          }else if(type == 2){
-            this.$router.push({
-              path: '/startTheExam',
-              query: {
-                examId: this.preData.examId,
-                attemptId: attemptId,
-                type: '1',
-                examKind:this.preData.examKind,
-              }
-            })
+          let obj = {
+            examId: this.preData.examId,
+            attemptId: attemptId,
+            type: '1',
+            examKind:this.preData.examKind,
+            attemptLimit:this.preData.attemptLimit,
+            attemptCount:this.preData.attemptCount,
           }
+          this.examUserExamAttemptFinished(1,obj);
         })
       },
       //开始考试判断是否有承诺书
@@ -244,30 +238,9 @@
           this.$set(this,'preExamDialogType',true);
         }else{
           if(item.attemptId){
-            this.$router.push({
-              path: '/startTheExam',
-              query: {
-                attemptId: item.attemptId,
-                type: '1',
-                examKind:item.examKind,
-              }
-            })
+            this.examUserExamAttemptFinished(1,item);
           }else{
-            examUserExamStart({examId:item.examId,examScene:1,}).then(response => {
-              if(response.data.attemptId){
-                this.$router.push({
-                  path: '/startTheExam',
-                  query: {
-                    examId: item.examId,
-                    attemptId: response.data.attemptId,
-                    type: '1',
-                    examKind:item.examKind,
-                  }
-                })
-              }else{
-                this.msgError(response.message)
-              }
-            })
+            this.examUserExamStartPlay(1,item);
           }
         }
       },
@@ -312,27 +285,16 @@
         }else if(type == 3){
           //模拟考试
           if(item.mockExamId){
-            this.$router.push({
-              path: '/mockExam',
-              query: {
-                examId: item.examId,
-                attemptId: item.mockExamId,
-              }
-            })
+            let obj = {
+              examId: item.examId,
+              attemptId: item.mockExamId,
+            };
+            this.examUserExamAttemptFinished(2,obj);
           }else{
-            examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
-              if(response.data.attemptId){
-                this.$router.push({
-                  path: '/mockExam',
-                  query: {
-                    examId: item.examId,
-                    attemptId: response.data.attemptId,
-                  }
-                })
-              }else{
-                this.msgError(response.message)
-              }
-            })
+            let obj = {
+              examId: item.examId,
+            };
+            this.examUserExamStartPlay(2,obj);
           }
         }else if(type == 4){
           //在线考试//补考
@@ -343,6 +305,78 @@
           this.getList()
         }
       },
+      //二次验证考试是否已结束
+      examUserExamAttemptFinished(type,item){
+        examUserExamAttemptFinished({attemptId:item.attemptId}).then(response => {
+          if(response.data){
+            //已结束
+            if(type == 1){
+              //在线考试
+              if(item.attemptLimit == 0 || item.attemptCount < item.attemptLimit){
+                //获取新试卷
+                this.examUserExamStartPlay(type,item)
+              }else{
+                //无可用次数 提示并刷新数据列表
+                this.msgError('当前考试已结束')
+                this.handleQuery();
+              }
+            }else if(type == 2){
+              //模拟考试-获取新试卷
+              this.examUserExamStartPlay(type,item)
+            }
+          }else{
+            //未结束
+            this.confirmTitle(type,item);
+          }
+        })
+      },
+      //获取考试试卷
+      examUserExamStartPlay(type,item){
+        examUserExamStart({examId:item.examId,examScene:type,}).then(response => {
+          if(response.data.attemptId){
+            let obj = {
+              examId: item.examId,
+              attemptId: response.data.attemptId,
+            };
+            if(type == 1){
+              obj.type = 1;
+              obj.examKind = item.examKind;
+            }
+            this.confirmTitle(type,obj);
+          }else{
+            this.msgError(response.message)
+          }
+        })
+      },
+      //提示与跳转
+      confirmTitle(type,obj){
+        let self = this;
+        if(type == 1){
+          this.$confirm(
+            '考试期间未完成答题请勿离开页面,离开后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。',
+            '进入考试页面',
+            {
+              confirmButtonText: '确定进入',
+              cancelButtonText: '取消',
+              type: 'warning',
+              closeOnClickModal: false,
+              closeOnPressEscape: false
+            }
+          ).then(() => {
+            //在线考试
+            this.$router.push({
+              path: '/startTheExam',
+              query: obj
+            })
+          }).catch(() => {})
+        }else if(type == 2){
+          //模拟考试
+          self.$router.push({
+            path: '/mockExam',
+            query: obj
+          })
+        }
+      },
       examUserExamTypeSelectExamType(){
         let self = this;
         examUserExamTypeSelectExamType({examType:1}).then(response => {
@@ -461,6 +495,12 @@
       }
       .for-max-big-box{
         flex:1;
+        .for-null-p{
+          text-align: center;
+          font-size:14px;
+          line-height:400px;
+          color:#999;
+        }
         .for-big-box{
           display: inline-block;
           width:760px;

+ 7 - 0
src/views/safetyEducationExaminationNew/safetyTest/practiceQuestions/index.vue

@@ -64,6 +64,7 @@
           </div>
           <div class="page-content-box">
             <div class="for-max-big-box scrollbar-box">
+              <p class="for-null-p" v-if="!dataList[0]">暂无数据</p>
               <div class="for-big-box" v-for="(item,index) in dataList" :key="index" @click="tableButton(1,item)">
                 <p class="title-p">{{item.knowledgePointName}}</p>
                 <div class="text-box">
@@ -368,6 +369,12 @@
           }
           .for-max-big-box{
             flex:1;
+            .for-null-p{
+              text-align: center;
+              font-size:14px;
+              line-height:400px;
+              color:#999;
+            }
             .for-big-box{
               cursor: pointer;
               display: inline-block;

+ 103 - 83
src/views/safetyEducationExaminationNew/workbench/TaskCard.vue

@@ -142,7 +142,7 @@
   import {
     examUserCoursewareLearningRestart,examElLabEduRelationAcademicYearProgress,
     examUserExamStudyTaskList,examUserExamStart,examUserPracticeSummary,
-    examUserExamCommitmentConfirm,
+    examUserExamCommitmentConfirm,examUserExamAttemptFinished,
   } from "@/api/safetyEducationExaminationNew/index";
   import richTextPdf from '@/views/safetyEducationExaminationNew/components/richTextPdf.vue';
 export default {
@@ -201,28 +201,18 @@ export default {
         })
       }
     },
+    //确认考试承诺书
     examUserExamCommitmentConfirm(type,attemptId){
       examUserExamCommitmentConfirm({attemptId:attemptId}).then(response => {
-        if(type == 1){
-          this.$router.push({
-            path: '/startTheExam',
-            query: {
-              attemptId: attemptId,
-              type: '1',
-              examKind:this.preData.examKind,
-            }
-          })
-        }else if(type == 2){
-          this.$router.push({
-            path: '/startTheExam',
-            query: {
-              examId: this.preData.examId,
-              attemptId: attemptId,
-              type: '1',
-              examKind:this.preData.examKind,
-            }
-          })
+        let obj = {
+          examId: this.preData.examId,
+          attemptId: attemptId,
+          type: '1',
+          examKind:this.preData.examKind,
+          attemptLimit:this.preData.attemptLimit,
+          attemptCount:this.preData.attemptCount,
         }
+        this.examUserExamAttemptFinished(1,obj);
       })
     },
     //开始考试判断是否有承诺书
@@ -234,30 +224,9 @@ export default {
         this.$set(this,'preExamDialogType',true);
       }else{
         if(item.attemptId){
-          this.$router.push({
-            path: '/startTheExam',
-            query: {
-              attemptId: item.attemptId,
-              type: '1',
-              examKind:item.examKind,
-            }
-          })
+          this.examUserExamAttemptFinished(1,item);
         }else{
-          examUserExamStart({examId:item.examId,examScene:1,}).then(response => {
-            if(response.data.attemptId){
-              this.$router.push({
-                path: '/startTheExam',
-                query: {
-                  examId: item.examId,
-                  attemptId: response.data.attemptId,
-                  type: '1',
-                  examKind:item.examKind,
-                }
-              })
-            }else{
-              this.msgError(response.message)
-            }
-          })
+          this.examUserExamStartPlay(1,item);
         }
       }
     },
@@ -309,27 +278,16 @@ export default {
       }else if(type == 3){
         //模拟考试
         if(item.mockExamId){
-          this.$router.push({
-            path: '/mockExam',
-            query: {
-              examId: item.examId,
-              attemptId: item.mockExamId,
-            }
-          })
+          let obj = {
+            examId: item.examId,
+            attemptId: item.mockExamId,
+          };
+          this.examUserExamAttemptFinished(2,obj);
         }else{
-          examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
-            if(response.data.attemptId){
-              this.$router.push({
-                path: '/mockExam',
-                query: {
-                  examId: item.examId,
-                  attemptId: response.data.attemptId,
-                }
-              })
-            }else{
-              this.msgError(response.message)
-            }
-          })
+          let obj = {
+            examId: item.examId,
+          };
+          this.examUserExamStartPlay(2,obj);
         }
       }else if(type == 4){
         //在线考试//补考
@@ -377,33 +335,95 @@ export default {
       }else if(type == 3){
         //模拟考试
         if(item.mockExamId){
-          this.$router.push({
-            path: '/mockExam',
-            query: {
-              examId: item.examId,
-              attemptId: item.mockExamId,
-            }
-          })
+          let obj = {
+            examId: item.examId,
+            attemptId: item.mockExamId,
+          };
+          this.examUserExamAttemptFinished(2,obj);
         }else{
-          examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
-            if(response.data.attemptId){
-              this.$router.push({
-                path: '/mockExam',
-                query: {
-                  examId: item.examId,
-                  attemptId: response.data.attemptId,
-                }
-              })
-            }else{
-              this.msgError(response.message)
-            }
-          })
+          let obj = {
+            examId: item.examId,
+          };
+          this.examUserExamStartPlay(2,obj);
         }
       }else if(type == 4){
         //在线考试//补考
         this.setRichExamData(item);
       }
     },
+    //二次验证考试是否已结束
+    examUserExamAttemptFinished(type,item){
+      examUserExamAttemptFinished({attemptId:item.attemptId}).then(response => {
+        if(response.data){
+          //已结束
+          if(type == 1){
+            //在线考试
+            if(item.attemptLimit == 0 || item.attemptCount < item.attemptLimit){
+              //获取新试卷
+              this.examUserExamStartPlay(type,item)
+            }else{
+              //无可用次数 提示并刷新数据列表
+              this.msgError('当前考试已结束')
+              this.examUserExamStudyTaskList();
+              this.examUserExamStudyTaskList2();
+            }
+          }else if(type == 2){
+            //模拟考试-获取新试卷
+            this.examUserExamStartPlay(type,item)
+          }
+        }else{
+          //未结束
+          this.confirmTitle(type,item);
+        }
+      })
+    },
+    //获取考试试卷
+    examUserExamStartPlay(type,item){
+      examUserExamStart({examId:item.examId,examScene:type,}).then(response => {
+        if(response.data.attemptId){
+          let obj = {
+            examId: item.examId,
+            attemptId: response.data.attemptId,
+          };
+          if(type == 1){
+            obj.type = 1;
+            obj.examKind = item.examKind;
+          }
+          this.confirmTitle(type,obj);
+        }else{
+          this.msgError(response.message)
+        }
+      })
+    },
+    //提示与跳转
+    confirmTitle(type,obj){
+      let self = this;
+      if(type == 1){
+        this.$confirm(
+          '考试期间未完成答题请勿离开页面,离开后倒计时仍会继续,超时将自动交卷并记录成绩,扣除 1 次考试机会。',
+          '进入考试页面',
+          {
+            confirmButtonText: '确定进入',
+            cancelButtonText: '取消',
+            type: 'warning',
+            closeOnClickModal: false,
+            closeOnPressEscape: false
+          }
+        ).then(() => {
+          //在线考试
+          this.$router.push({
+            path: '/startTheExam',
+            query: obj
+          })
+        }).catch(() => {})
+      }else if(type == 2){
+        //模拟考试
+        self.$router.push({
+          path: '/mockExam',
+          query: obj
+        })
+      }
+    },
     //查询学年进度列表
     examElLabEduRelationAcademicYearProgress(){
       examElLabEduRelationAcademicYearProgress({}).then(response => {