dedsudiyu hace 2 días
padre
commit
f4c4c7bc43
Se han modificado 18 ficheros con 302 adiciones y 108 borrados
  1. 1 1
      src/views/safetyEducationExaminationNew/components/coursewareComponent.vue
  2. 2 0
      src/views/safetyEducationExaminationNew/courseManagement/courseManagement/index.vue
  3. 2 0
      src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/index.vue
  4. 4 4
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue
  5. 5 1
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue
  6. 2 0
      src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/index.vue
  7. 20 16
      src/views/safetyEducationExaminationNew/featurePage/mockExam/index.vue
  8. 19 15
      src/views/safetyEducationExaminationNew/featurePage/startPracticing/index.vue
  9. 19 15
      src/views/safetyEducationExaminationNew/featurePage/startTheExam/index.vue
  10. 2 0
      src/views/safetyEducationExaminationNew/featurePage/startTraining/index.vue
  11. 13 4
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/examinationConfiguration.vue
  12. 2 0
      src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/index.vue
  13. 29 6
      src/views/safetyEducationExaminationNew/safetyTest/mockExam/index.vue
  14. 2 2
      src/views/safetyEducationExaminationNew/safetyTest/myGrades/dataStatisticsReport.vue
  15. 79 30
      src/views/safetyEducationExaminationNew/safetyTest/onlineExam/index.vue
  16. 1 1
      src/views/safetyEducationExaminationNew/workbench/ResourceCard.vue
  17. 90 4
      src/views/safetyEducationExaminationNew/workbench/TaskCard.vue
  18. 10 9
      src/views/safetyEducationExaminationNew/workbench/UserInfoCard.vue

+ 1 - 1
src/views/safetyEducationExaminationNew/components/coursewareComponent.vue

@@ -23,7 +23,7 @@
           @rendered="renderedHandler"
           @error="errorHandler"/>
         <p v-if="officeNullType" class="office-null-text">加载失败...</p>
-        <video-component :userId="userId" :url="lookUrl" />
+        <video-component v-if="officeType === 'video'" :userId="userId" :url="lookUrl" />
         <!--<video v-if="officeType === 'video'" ref="videoPlayer"-->
                <!--class="video-box" :src="lookUrl" autoplay  controls muted></video>-->
         <div  v-if="officeType === 'text'" class="rich-text-box" v-html="lookUrl"></div>

+ 2 - 0
src/views/safetyEducationExaminationNew/courseManagement/courseManagement/index.vue

@@ -122,10 +122,12 @@
                    @click="tableButton(2,scope.row)"
                 >复制</p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:course:edit']"
                    @click="tableButton(3,scope.row)"
                 >编辑</p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:course:del']"
                    @click="tableButton(4,scope.row)"
                 >删除</p>

+ 2 - 0
src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/index.vue

@@ -117,10 +117,12 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:courseware:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:courseware:del']"
                 >删除</p>
                 <p class="table-button-null"></p>

+ 4 - 4
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue

@@ -176,11 +176,11 @@
                           {{scope.row.academicYear?scope.row.academicYear:'-'}}
                         </template>
                       </el-table-column>
-                      <el-table-column label="操作" width="140" align="center">
+                      <el-table-column label="操作" width="140" align="center" v-if="!showType">
                         <template slot-scope="{ $index }">
                           <div class="table-button-box">
                             <p class="table-button-null"></p>
-                            <p class="table-button-p" v-if="!showType"
+                            <p class="table-button-p"
                                @click="scopeList.splice($index, 1)"
                             >移除</p>
                             <p class="table-button-null"></p>
@@ -616,7 +616,7 @@
         }
       }
       const validateData1 = (rule, value, callback) => {
-        if (this.newData.studyHoursRequirementEnabled == 1 && !this.yzyhTest && this.newData.studyHoursRequirement == 0) {
+        if (this.newData.studyHoursRequirementEnabled == 1 && !this.yzyhTest && !this.placementTest && this.newData.studyHoursRequirement == 0) {
           callback(new Error('学时要求不能为0'))
         }else if (this.newData.studyHoursRequirementEnabled == 1 && this.yzyhTest && this.newData.mandatoryStudyHoursConfig.freshmanNoLabHours == 0) {
           callback(new Error('研究生-新生的学时要求不能为0'))
@@ -1142,7 +1142,7 @@
           } else {
             let list = [];
             for(let i=0;i<response.data.length;i++){
-              if(response.data[i].examTypeCode != 'CLASSIFIED' && response.data[i].examTypeCode != 'yzyh'){
+              if(response.data[i].examTypeCode != 'CLASSIFIED' && response.data[i].examTypeCode != 'yzyh' && response.data[i].examTypeCode != 'STUDENT'){
                 list.push(response.data[i])
               }
             }

+ 5 - 1
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue

@@ -112,7 +112,11 @@
               <span>{{parseTime(scope.row.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(scope.row.endTime,"{y}-{m}-{d} {h}:{i}")}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="可考次数" prop="attemptLimit" width="100" show-overflow-tooltip/>
+          <el-table-column label="可考次数" prop="attemptLimit" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.attemptLimit==0?'不限次数':scope.row.attemptLimit}}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="考试范围" prop="scopeType" width="140" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{scope.row.scopeType==1?'全校':(scope.row.scopeType==2?'规则范围':(scope.row.scopeType==3?'指定考生':''))}}</span>

+ 2 - 0
src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/index.vue

@@ -111,6 +111,7 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:elPaper:edit']"
                    @click="tableButton(3,scope.row)"
                 >编辑</p>
@@ -119,6 +120,7 @@
                    @click="tableButton(4,scope.row)"
                 >复制</p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:elPaper:del']"
                    @click="tableButton(5,scope.row)"
                 >删除</p>

+ 20 - 16
src/views/safetyEducationExaminationNew/featurePage/mockExam/index.vue

@@ -298,6 +298,7 @@
               const prevGroup = this.questionTypeGroups[this.groupIndex]
               this.questionIndex = prevGroup.questions.length - 1
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -310,6 +311,7 @@
             const prevGroup = this.questionTypeGroups[this.groupIndex]
             this.questionIndex = prevGroup.questions.length - 1
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       // 下一题
@@ -334,6 +336,7 @@
               this.groupIndex++
               this.questionIndex = 0
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -346,6 +349,7 @@
             this.groupIndex++
             this.questionIndex = 0
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       //右侧数据
@@ -371,11 +375,25 @@
       },
       //交卷按钮
       submitExam(){
+        if(this.currentQuestion.answerTags[0]){
+          examUserExamAnswerSave({
+            attemptId: this.newData.attemptId,
+            snapshotQuestionId:this.currentQuestion.snapshotQuestionId,
+            userAnswer:this.currentQuestion.answerTags+'',
+          }).then(response => {
+            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'isCorrect',response.data);
+            this.examUserExamAnswerSaveExamUserExamSubmit();
+          })
+        }else{
+          this.examUserExamAnswerSaveExamUserExamSubmit();
+        }
+      },
+      examUserExamAnswerSaveExamUserExamSubmit(){
         let self = this;
         let num = 0;
         for(let i=0;i<self.questionTypeGroups.length;i++){
           for(let o=0;o<self.questionTypeGroups[i].questions.length;o++){
-            if(self.questionTypeGroups[i].questions[o].isCorrect == 0){
+            if(self.questionTypeGroups[i].questions[o].isCorrect == null){
               num++
             }
           }
@@ -385,23 +403,9 @@
           cancelButtonText: "取消",
           type: "warning"
         }).then(async () => {
-          self.examUserExamAnswerSaveExamUserExamSubmit();
+          self.examUserExamSubmit();
         }).catch(() => {})
       },
-      examUserExamAnswerSaveExamUserExamSubmit(){
-        if(this.currentQuestion.answerTags[0]){
-          examUserExamAnswerSave({
-            attemptId: this.newData.attemptId,
-            snapshotQuestionId:this.currentQuestion.snapshotQuestionId,
-            userAnswer:this.currentQuestion.answerTags+'',
-          }).then(response => {
-            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'isCorrect',response.data);
-            this.examUserExamSubmit();
-          })
-        }else{
-          this.examUserExamSubmit();
-        }
-      },
       //交卷
       examUserExamSubmit(){
         examUserExamSubmit({ attemptId: this.newData.attemptId, }).then(response => {

+ 19 - 15
src/views/safetyEducationExaminationNew/featurePage/startPracticing/index.vue

@@ -272,6 +272,7 @@
               const prevGroup = this.questionTypeGroups[this.groupIndex]
               this.questionIndex = prevGroup.questions.length - 1
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -284,6 +285,7 @@
             const prevGroup = this.questionTypeGroups[this.groupIndex]
             this.questionIndex = prevGroup.questions.length - 1
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       // 下一题
@@ -307,6 +309,7 @@
               this.groupIndex++
               this.questionIndex = 0
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -319,6 +322,7 @@
             this.groupIndex++
             this.questionIndex = 0
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       //右侧数据
@@ -343,6 +347,20 @@
       },
       //交卷按钮
       submitExam(){
+        if(this.currentQuestion.userAnswer[0]){
+          examUserPracticeSubmit({
+            attemptId: this.newData.attemptId,
+            questionId:this.currentQuestion.id,
+            userAnswer:this.currentQuestion.userAnswer+'',
+          }).then(response => {
+            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'answerStatus',response.data.answerStatus);
+            this.examUserExamAnswerSaveExamUserExamSubmit();
+          })
+        }else{
+          this.examUserExamAnswerSaveExamUserExamSubmit();
+        }
+      },
+      examUserExamAnswerSaveExamUserExamSubmit(){
         let self = this;
         let num = 0;
         for(let i=0;i<self.questionTypeGroups.length;i++){
@@ -357,23 +375,9 @@
           cancelButtonText: "取消",
           type: "warning"
         }).then(async () => {
-          self.examUserExamAnswerSaveExamUserExamSubmit();
+          self.examUserExamSubmit();
         }).catch(() => {})
       },
-      examUserExamAnswerSaveExamUserExamSubmit(){
-        if(this.currentQuestion.userAnswer[0]){
-          examUserPracticeSubmit({
-            attemptId: this.newData.attemptId,
-            questionId:this.currentQuestion.id,
-            userAnswer:this.currentQuestion.userAnswer+'',
-          }).then(response => {
-            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'answerStatus',response.data.answerStatus);
-            this.examUserExamSubmit();
-          })
-        }else{
-          this.examUserExamSubmit();
-        }
-      },
       //交卷
       examUserExamSubmit(){
         examUserExamSubmit({ attemptId: this.newData.attemptId, }).then(response => {

+ 19 - 15
src/views/safetyEducationExaminationNew/featurePage/startTheExam/index.vue

@@ -248,6 +248,7 @@
               const prevGroup = this.questionTypeGroups[this.groupIndex]
               this.questionIndex = prevGroup.questions.length - 1
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -260,6 +261,7 @@
             const prevGroup = this.questionTypeGroups[this.groupIndex]
             this.questionIndex = prevGroup.questions.length - 1
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       // 下一题
@@ -284,6 +286,7 @@
               this.groupIndex++
               this.questionIndex = 0
             }
+            this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
           })
         }else{
           //切换索引至下一题
@@ -296,6 +299,7 @@
             this.groupIndex++
             this.questionIndex = 0
           }
+          this.examElExamAttemptReviewQuestion(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].snapshotQuestionId)
         }
       },
       //右侧数据
@@ -320,6 +324,20 @@
       },
       //交卷按钮
       submitExam(){
+        if(this.currentQuestion.answerTags[0]){
+          examUserExamAnswerSave({
+            attemptId: this.newData.attemptId,
+            snapshotQuestionId:this.currentQuestion.snapshotQuestionId,
+            userAnswer:this.currentQuestion.answerTags+'',
+          }).then(response => {
+            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'answered',1);
+            this.examUserExamAnswerSaveExamUserExamSubmit();
+          })
+        }else{
+          this.examUserExamAnswerSaveExamUserExamSubmit();
+        }
+      },
+      examUserExamAnswerSaveExamUserExamSubmit(){
         let self = this;
         let num = 0;
         for(let i=0;i<self.questionTypeGroups.length;i++){
@@ -334,23 +352,9 @@
           cancelButtonText: "取消",
           type: "warning"
         }).then(async () => {
-          self.examUserExamAnswerSaveExamUserExamSubmit();
+          self.examUserExamSubmit();
         }).catch(() => {})
       },
-      examUserExamAnswerSaveExamUserExamSubmit(){
-        if(this.currentQuestion.answerTags[0]){
-          examUserExamAnswerSave({
-            attemptId: this.newData.attemptId,
-            snapshotQuestionId:this.currentQuestion.snapshotQuestionId,
-            userAnswer:this.currentQuestion.answerTags+'',
-          }).then(response => {
-            this.$set(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex],'answered',1);
-            this.examUserExamSubmit();
-          })
-        }else{
-          this.examUserExamSubmit();
-        }
-      },
       //交卷
       examUserExamSubmit(){
         examUserExamSubmit({ attemptId: this.newData.attemptId, }).then(response => {

+ 2 - 0
src/views/safetyEducationExaminationNew/featurePage/startTraining/index.vue

@@ -272,6 +272,7 @@
           const prevGroup = this.questionTypeGroups[this.groupIndex]
           this.questionIndex = prevGroup.questions.length - 1
         }
+        this.examUserPracticeQuestionDetail(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].questionId,this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].userAnswer)
       },
       // 下一题
       nextQuestion() {
@@ -287,6 +288,7 @@
           this.groupIndex++
           this.questionIndex = 0
         }
+        this.examUserPracticeQuestionDetail(this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].questionId,this.questionTypeGroups[this.groupIndex].questions[this.questionIndex].userAnswer)
       },
       //右侧数据
       examUserPracticeQuestionDetail(questionId,userAnswer) {

+ 13 - 4
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/examinationConfiguration.vue

@@ -21,8 +21,8 @@
         </div>
         <div class="text-box" v-else>
           <p>{{item.examTypeName}}</p>
-          <p @click="editorButton(index)">修改</p>
-          <p @click="delButton(index)">删除</p>
+          <p @click="editorButton(index)" v-if="item.examTypeCode != 'CLASSIFIED'&&item.examTypeCode != 'yzyh'&&item.examTypeCode != 'STUDENT'">修改</p>
+          <p @click="delButton(index)" v-if="item.examTypeCode != 'CLASSIFIED'&&item.examTypeCode != 'yzyh'&&item.examTypeCode != 'STUDENT'">删除</p>
         </div>
       </div>
     </div>
@@ -56,7 +56,16 @@
     methods:{
       initialize(){
         examElExamTypeList({}).then(response => {
-          this.$set(this,'dataList',response.data);
+          this.$set(this,'dataList',this.sortExamTypeList(response.data));
+        });
+      },
+      sortExamTypeList(list) {
+        if (!Array.isArray(list)) return [];
+        const bottomCodes = new Set(['CLASSIFIED', 'yzyh', 'STUDENT']);
+        return [...list].sort((a, b) => {
+          const weightA = bottomCodes.has(a.examTypeCode) ? 1 : 0;
+          const weightB = bottomCodes.has(b.examTypeCode) ? 1 : 0;
+          return weightA - weightB;
         });
       },
       //修改按钮
@@ -79,7 +88,7 @@
           this.msgError('输入考试类型名称')
           return
         }
-        this.dataList.push({
+        this.dataList.unshift({
           examTypeName:this.newData.examTypeName
         })
         this.$set(this.newData,'examTypeName','');

+ 2 - 0
src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/index.vue

@@ -101,10 +101,12 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:elQuestionBank:edit']"
                    @click="tableButton(3,scope.row)"
                 >编辑</p>
                 <p class="table-button-p"
+                   v-if="scope.row.canEditDelete"
                    v-hasPermiRouter="['exam:elQuestionBank:del']"
                    @click="tableButton(4,scope.row)"
                 >删除</p>

+ 29 - 6
src/views/safetyEducationExaminationNew/safetyTest/mockExam/index.vue

@@ -57,7 +57,9 @@
               <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>
             </div>
-            <p class="position-p-1" :class="item.conditionType==4?'position-p-3':''" @click="tableButton(1,item)">{{item.conditionType!=4?'完成模拟考试练习后解锁':'开始模拟考试'}}</p>
+            <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>
+            <p class="position-p-3" v-if="item.conditionType == 3" @click="tableButton(3,item)">开始模拟考试</p>
             <!--<p class="position-p-2" @click="tableButton(2)">历史错题</p>-->
           </div>
         </div>
@@ -167,10 +169,21 @@
       tableButton(type, item) {
         let self = this
         if (type == 1) {
-          //模拟练习
-          if(item.conditionType!=4){
-            return
-          }
+          //学时要求
+          self.$router.push({
+            name: 'knowledgeLearning',
+            params: {}
+          })
+        }else if(type == 2){
+          //学习课程
+          this.$router.push({
+            name: 'learningCourse',
+            params: {
+              courseId: item.courseId,
+              examId: item.examId,
+            }
+          })
+        }else if(type == 3){
           //模拟考试
           if(item.attemptId){
             this.$router.push({
@@ -195,7 +208,7 @@
               }
             })
           }
-        } else if (type == 6) {
+        }else if (type == 6) {
           //返回并刷新
           this.$set(this, 'pageType', 1)
           this.getList()
@@ -356,6 +369,7 @@
             line-height:30px;
             width:180px;
             text-align: center;
+            cursor: pointer;
           }
           .position-p-2{
             position:absolute;
@@ -372,6 +386,15 @@
             cursor: pointer;
           }
           .position-p-3{
+            position:absolute;
+            top:30px;
+            right:30px;
+            border:1px solid #0183fa;
+            border-radius:4px;
+            font-size:14px;
+            line-height:30px;
+            width:180px;
+            text-align: center;
             cursor: pointer;
             color:#fff!important;
             background-color: #0183fa!important;

+ 2 - 2
src/views/safetyEducationExaminationNew/safetyTest/myGrades/dataStatisticsReport.vue

@@ -17,7 +17,7 @@
             <img :src="logUrl" />
           </div>
           <!--标题-->
-          <p class="title-p">实验室安全教育毕业报告</p>
+          <p class="title-p">实验室安全教育成绩报告</p>
           <!--用户信息-->
           <div class="user-box">
             <div class="user-min-box">
@@ -166,7 +166,7 @@
           const url = URL.createObjectURL(blob)
           const a = document.createElement('a')
           a.href = url
-          a.download = `实验室安全教育毕业报告_${this.newData.userName || ''}.pdf`
+          a.download = `实验室安全教育成绩报告_${this.newData.userName || ''}.pdf`
           document.body.appendChild(a)
           a.click()
           URL.revokeObjectURL(url)

+ 79 - 30
src/views/safetyEducationExaminationNew/safetyTest/onlineExam/index.vue

@@ -57,9 +57,10 @@
               <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>
             </div>
-            <p class="position-p-1" :class="item.conditionType==4?'position-p-3':''" @click="tableButton(1,item)">
-              {{item.conditionType==1?'完成学时要求后解锁':(item.conditionType==2?'完成考前课程学习后解锁':(item.conditionType==3?'完成模拟考试练习后解锁':(item.conditionType==4?'开始考试':'')))}}
-            </p>
+            <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>
+            <p class="position-p-1" v-if="item.conditionType == 3" @click="tableButton(3,item)">完成模拟考试练习后解锁</p>
+            <p class="position-p-3" v-if="item.conditionType == 4" @click="tableButton(4,item)">开始考试</p>
           </div>
         </div>
         <pagination :page-sizes="[20, 30, 40, 50]"
@@ -168,35 +169,73 @@
       tableButton(type, item) {
         let self = this
         if (type == 1) {
-          if(item.conditionType == 4){
-            //开始考试
-            if(item.attemptId){
-              this.$router.push({
-                name: 'startTheExam',
-                params: {
-                  examId: item.examId,
-                  attemptId: item.attemptId,
-                  examKind:item.examKind,
-                }
-              })
-            }else{
-              examUserExamStart({examId:item.examId,examScene:1,}).then(response => {
-                if(response.data.attemptId){
-                  this.$router.push({
-                    name: 'startTheExam',
-                    params: {
-                      examId: item.examId,
-                      attemptId: response.data.attemptId,
-                      examKind:item.examKind,
-                    }
-                  })
-                }else{
-                  this.msgError(response.message)
-                }
-              })
+          //学时要求
+          self.$router.push({
+            name: 'knowledgeLearning',
+            params: {}
+          })
+        }else if(type == 2){
+          //学习课程
+          this.$router.push({
+            name: 'learningCourse',
+            params: {
+              courseId: item.courseId,
+              examId: item.examId,
             }
+          })
+        }else if(type == 3){
+          //模拟考试
+          if(item.mockExamId){
+            this.$router.push({
+              name: 'mockExam',
+              params: {
+                examId: item.examId,
+                attemptId: item.mockExamId,
+              }
+            })
+          }else{
+            examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
+              if(response.data.attemptId){
+                this.$router.push({
+                  name: 'mockExam',
+                  params: {
+                    examId: item.examId,
+                    attemptId: response.data.attemptId,
+                  }
+                })
+              }else{
+                this.msgError(response.message)
+              }
+            })
           }
-        } else if (type == 6) {
+        }else if(type == 4){
+          //开始考试
+          if(item.attemptId){
+            this.$router.push({
+              name: 'startTheExam',
+              params: {
+                examId: item.examId,
+                attemptId: item.attemptId,
+                examKind:item.examKind,
+              }
+            })
+          }else{
+            examUserExamStart({examId:item.examId,examScene:1,}).then(response => {
+              if(response.data.attemptId){
+                this.$router.push({
+                  name: 'startTheExam',
+                  params: {
+                    examId: item.examId,
+                    attemptId: response.data.attemptId,
+                    examKind:item.examKind,
+                  }
+                })
+              }else{
+                this.msgError(response.message)
+              }
+            })
+          }
+        }else if (type == 6) {
           //返回并刷新
           this.$set(this, 'pageType', 1)
           this.getList()
@@ -357,8 +396,18 @@
             line-height:30px;
             width:180px;
             text-align: center;
+            cursor: pointer;
           }
           .position-p-3{
+            position:absolute;
+            top:30px;
+            right:30px;
+            border:1px solid #0183fa;
+            border-radius:4px;
+            font-size:14px;
+            line-height:30px;
+            width:180px;
+            text-align: center;
             cursor: pointer;
             color:#fff!important;
             background-color: #0183fa!important;

+ 1 - 1
src/views/safetyEducationExaminationNew/workbench/ResourceCard.vue

@@ -75,7 +75,7 @@
 
 <script>
   import {
-    examUserCoursewareLearningKnowledgePoints,
+    examUserCoursewareLearningKnowledgePoints,examUserCoursewareLearningRestart,
     examUserPracticeList,examUserCoursewareLearningList,
   } from "@/api/safetyEducationExaminationNew/index";
 export default {

+ 90 - 4
src/views/safetyEducationExaminationNew/workbench/TaskCard.vue

@@ -9,7 +9,7 @@
         <div class="year-card-top-title-box">
           <p>学年数据统计</p>
           <p>按学年统计历年考试通过情况与成绩</p>
-          <p v-if="yearType">毕业报告</p>
+          <!--<p v-if="yearType">成绩报告</p>-->
         </div>
         <div class="bottom-content-box scrollbar-box">
           <div class="bottom-big-box-1" v-for="(item,index) in yearMinList">
@@ -24,7 +24,7 @@
           <p>待完成的学习任务</p>
         </div>
         <div class="bottom-content-box scrollbar-box">
-          <div class="bottom-big-box-2" v-for="(item,index) in studyMinList" @click="tableButton(2,item)">
+          <div class="bottom-big-box-2" v-for="(item,index) in studyMinList" @click="studyTableButton(item)">
             <p>{{item.courseName}}</p>
             <p >{{item.deptName}}丨{{item.learnStatus==0?'待完成':(item.learnStatus==1?'进行中':(item.learnStatus==2?'已完成':''))}}</p>
           </div>
@@ -36,9 +36,9 @@
           <p>待完成的考前模拟练习</p>
         </div>
         <div class="bottom-content-box scrollbar-box">
-          <div class="bottom-big-box-3" v-for="(item,index) in examinationMinList" @click="tableButton(3,item)">
+          <div class="bottom-big-box-3" v-for="(item,index) in examinationMinList" @click="mockTableButton(item)">
             <p>{{item.examName}}</p>
-            <p >最高成绩 {{item.maxScore}}</p>
+            <p >最高成绩 {{item.maxScore?item.maxScore:0}}</p>
           </div>
         </div>
       </div>
@@ -124,6 +124,92 @@ export default {
       this.examUserExamMockList();
       this.examUserExamList();
     },
+    //学习任务
+    studyTableButton(item){
+      let self = this;
+      if(item.conditionType == 1){
+        this.$confirm('还未达到学时要求,是否现在去学习?', "警告", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          //学时要求
+          self.$router.push({
+            name: 'knowledgeLearning',
+            params: {}
+          })
+        }).catch(() => {});
+      }else{
+        //学习课程
+        this.$router.push({
+          name: 'learningCourse',
+          params: {
+            courseId: item.courseId,
+            examId: item.examId,
+          }
+        })
+      }
+    },
+    //模拟考试
+    mockTableButton(item){
+      let self = this;
+      if(item.conditionType == 1){
+        this.$confirm('完成学时要求后解锁,是否现在去学习?', "警告", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          //学时要求
+          self.$router.push({
+            name: 'knowledgeLearning',
+            params: {}
+          })
+        }).catch(() => {});
+      }else if(item.conditionType == 2){
+        this.$confirm('完成考前课程学习后解锁,是否现在去学习?', "警告", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          //学习课程
+          self.$router.push({
+            name: 'learningCourse',
+            params: {
+              courseId: item.courseId,
+              examId: item.examId,
+            }
+          })
+        }).catch(() => {});
+      }else{
+        //模拟考试
+        if(item.attemptId){
+          this.$router.push({
+            name: 'mockExam',
+            params: {
+              examId: item.examId,
+              attemptId: item.attemptId,
+            }
+          })
+        }else{
+          examUserExamStart({examId:item.examId,examScene:2,}).then(response => {
+            if(response.data.attemptId){
+              this.$router.push({
+                name: 'mockExam',
+                params: {
+                  examId: item.examId,
+                  attemptId: response.data.attemptId,
+                }
+              })
+            }else{
+              this.msgError(response.message)
+            }
+          })
+        }
+      }
+    },
     //考试跳转
     tableButton(type,item){
       let self = this;

+ 10 - 9
src/views/safetyEducationExaminationNew/workbench/UserInfoCard.vue

@@ -27,17 +27,18 @@
         <div class="left-sub-min-box" v-if="userInfo.userType == 2">
           <p class="name-p">实验室信息</p>
           <p class="text-p" v-if="userInfo.bound">{{userInfo.labName}}</p>
+          <p class="text-p" v-if="!userInfo.bound&&userInfo.educationType == 1">暂无绑定实验室</p>
           <p class="text-p" v-if="!userInfo.bound&&userInfo.educationType == 2">{{userInfo.isFinishExam?'暂无绑定实验室':'请先完成入学考试'}}</p>
-          <p class="button-p" v-if="!userInfo.bound&&(userInfo.educationType == 1 ||(userInfo.educationType == 2&&userInfo.isFinishExam))" @click="shadeButton(4)">去绑定</p>
+          <p class="button-p" v-if="(!userInfo.bound&&userInfo.educationType == 1)||(!userInfo.bound&&userInfo.educationType == 2&&userInfo.isFinishExam)" @click="shadeButton(4)">去绑定</p>
           <p class="sub-name-p" v-if="userInfo.bound">{{userInfo.bindStatus}}</p>
         </div>
       </div>
       <!--进度-->
       <div class="center-max-box">
         <div class="center-title-box scrollbar-x-box">
-          <p class="check-title-p">{{userInfo.gradeRange}}</p>
-          <p class="check-title-p" v-if="userInfo.labName">{{userInfo.labName}}</p>
-          <p class="check-title-p" v-if="userInfo.typeName">{{userInfo.typeName}}</p>
+          <p>{{userInfo.gradeRange}}</p>
+          <p :style="'color:'+userInfo.levelColor+';'" v-if="userInfo.labName">{{userInfo.levelName}} {{userInfo.labName}}</p>
+          <p v-if="userInfo.typeName">{{userInfo.typeName}}</p>
         </div>
         <div class="center-data-box">
           <div class="progress-max-box">
@@ -287,7 +288,7 @@ export default {
     examElLabEduRelationBindStatus(){
       examElLabEduRelationBindStatus({}).then(response => {
         this.$set(this, 'userInfo', response.data)
-        if(response.data.userType==2&&!response.data.bound){
+        if((!response.data.bound&&response.data.educationType == 1)||(!response.data.bound&&response.data.educationType == 2&&response.data.isFinishExam)){
           this.shadeButton(4);
         }
       })
@@ -490,7 +491,7 @@ export default {
         p{
           display: inline-block;
           border:1px solid #999;
-          color:#999;
+          color:#0183fa;
           border-radius:6px;
           padding: 0 15px;
           height:32px;
@@ -499,9 +500,9 @@ export default {
           cursor: pointer;
         }
         .check-title-p{
-          color:#fff;
-          border:1px solid #0183fa;
-          background-color: #0183fa;
+          /*color:#fff;*/
+          /*border:1px solid #0183fa;*/
+          /*background-color: #0183fa;*/
         }
       }
       .center-data-box{