dedsudiyu 10 órája%!(EXTRA string=)
szülő
commit
d99388a057

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

@@ -876,6 +876,14 @@ export function examElQuestionBankGroupByKnowledgePoint(data) {
     data: data
   })
 }
+//确认考试承诺书
+export function examUserExamCommitmentConfirm(data) {
+  return request({
+    url: '/exam/user/exam/commitment/confirm',
+    method: 'post',
+    data: data
+  })
+}
 //工作台按知识点分组查询试题数量
 export function examUserPracticeSummary(query) {
   return request({

+ 28 - 19
src/views/safetyEducationExaminationNew/safetyTest/onlineExam/index.vue

@@ -98,7 +98,7 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
-  import { examUserExamList,examUserExamTypeSelectExamType,examUserExamStart, } from "@/api/safetyEducationExaminationNew/index";
+  import { examUserExamList,examUserExamTypeSelectExamType,examUserExamStart,examUserExamCommitmentConfirm, } from "@/api/safetyEducationExaminationNew/index";
   import richTextPdf from '@/views/safetyEducationExaminationNew/components/richTextPdf.vue';
   export default {
     name: 'index',
@@ -201,35 +201,44 @@
       //确认承诺-并考试
       examUserExamStart(){
         if(this.preData.attemptId){
-          this.$router.push({
-            path: '/startTheExam',
-            query: {
-              attemptId: this.preData.attemptId,
-              type: '1',
-              examKind:this.preData.examKind,
-            }
-          })
+          this.examUserExamCommitmentConfirm(1,this.preData.attemptId);
         }else{
           examUserExamStart({examId:this.preData.examId,examScene:1,}).then(response => {
             if(response.data.attemptId){
-              this.$router.push({
-                path: '/startTheExam',
-                query: {
-                  examId: this.preData.examId,
-                  attemptId: response.data.attemptId,
-                  type: '1',
-                  examKind:this.preData.examKind,
-                }
-              })
+              this.examUserExamCommitmentConfirm(2,response.data.attemptId);
             }else{
               this.msgError(response.message)
             }
           })
         }
       },
+      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,
+              }
+            })
+          }
+        })
+      },
       //开始考试判断是否有承诺书
       setRichExamData(item){
-        if(item.commitmentEnabled == 1){
+        if(item.commitmentEnabled == 1 && !item.commitmentConfirmed){
           this.$set(this,'preButtonType',item.commitmentPrintEnabled == 1?true:false);
           this.$set(this,'richTextHtml',item.commitmentContent);
           this.$set(this,'preData',item);

+ 28 - 18
src/views/safetyEducationExaminationNew/workbench/TaskCard.vue

@@ -141,6 +141,7 @@
   import {
     examUserCoursewareLearningRestart,examElLabEduRelationAcademicYearProgress,
     examUserExamStudyTaskList,examUserExamStart,examUserPracticeSummary,
+    examUserExamCommitmentConfirm,
   } from "@/api/safetyEducationExaminationNew/index";
   import richTextPdf from '@/views/safetyEducationExaminationNew/components/richTextPdf.vue';
 export default {
@@ -188,35 +189,44 @@ export default {
     //确认承诺-并考试
     examUserExamStart(){
       if(this.preData.attemptId){
-        this.$router.push({
-          path: '/startTheExam',
-          query: {
-            attemptId: this.preData.attemptId,
-            type: '1',
-            examKind:this.preData.examKind,
-          }
-        })
+        this.examUserExamCommitmentConfirm(1,this.preData.attemptId);
       }else{
         examUserExamStart({examId:this.preData.examId,examScene:1,}).then(response => {
           if(response.data.attemptId){
-            this.$router.push({
-              path: '/startTheExam',
-              query: {
-                examId: this.preData.examId,
-                attemptId: response.data.attemptId,
-                type: '1',
-                examKind:this.preData.examKind,
-              }
-            })
+            this.examUserExamCommitmentConfirm(2,response.data.attemptId);
           }else{
             this.msgError(response.message)
           }
         })
       }
     },
+    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,
+            }
+          })
+        }
+      })
+    },
     //开始考试判断是否有承诺书
     setRichExamData(item){
-      if(item.commitmentEnabled == 1){
+      if(item.commitmentEnabled == 1 && !item.commitmentConfirmed){
         this.$set(this,'preButtonType',item.commitmentPrintEnabled == 1?true:false);
         this.$set(this,'richTextHtml',item.commitmentContent);
         this.$set(this,'preData',item);

+ 4 - 2
src/views/safetyEducationExaminationNew/workbench/UserInfoCard.vue

@@ -172,7 +172,7 @@
               <p class="shade-text-p">毕业论文或毕业设计,科创等相关需要在具体的实验室开展业务的情况可申请绑定实验室,绑定完毕后需要完成对应的分级考试。</p>
             </div>
             <!--研究生选项-->
-            <div class="checkbox-box" v-if="userInfo.educationType == 1&&userInfo.isNew">
+            <div class="checkbox-box">
               <el-form-item label="" label-width="0">
                 <el-checkbox v-model="shadeFormData.isEnter">无需进入实验室</el-checkbox>
                 <p class="checkbox-text-p">人文、体育等相关学院无需进入实验室的新研究生可选择此项,选择后学时要求为4小时,需通过应知应会考试。</p>
@@ -551,7 +551,9 @@ export default {
               font-size:14px;
             }
             p:nth-child(2){
-              font-size:16px;
+              font-size:14px;
+              line-height:20px;
+              color:#60708a;
             }
           }
         }