|
|
@@ -9,7 +9,6 @@
|
|
|
<div class="year-card-top-title-box">
|
|
|
<p>学年数据统计</p>
|
|
|
<p>按学年统计历年考试通过情况与成绩</p>
|
|
|
- <!--<p v-if="yearType">成绩报告</p>-->
|
|
|
</div>
|
|
|
<div class="bottom-content-box scrollbar-box">
|
|
|
<p class="null-p" v-if="!yearMinList[0]">暂无数据</p>
|
|
|
@@ -22,7 +21,7 @@
|
|
|
<!--任务卡列表-->
|
|
|
<div class="year-card-box for-max-big-box">
|
|
|
<div class="year-card-top-title-box">
|
|
|
- <p>学习任务</p>
|
|
|
+ <p>学习考试任务</p>
|
|
|
<p>待完成的学习任务</p>
|
|
|
</div>
|
|
|
<div class="bottom-content-box scrollbar-box">
|
|
|
@@ -52,37 +51,23 @@
|
|
|
<p>补考</p>
|
|
|
<p>未完成</p>
|
|
|
</div>
|
|
|
- <p class="time-p">{{parseTime(item.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(item.startTime,"{y}-{m}-{d} {h}:{i}")}}</p>
|
|
|
+ <p class="time-p">{{parseTime(item.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(item.endTime,"{y}-{m}-{d} {h}:{i}")}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--学习任务卡-->
|
|
|
- <!--<div class="study-card-box for-max-big-box">-->
|
|
|
- <!--<div class="year-card-top-title-box">-->
|
|
|
- <!--<p>学习任务</p>-->
|
|
|
- <!--<p>待完成的学习任务</p>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="bottom-content-box scrollbar-box">-->
|
|
|
- <!--<p class="null-p" v-if="!studyMinList[0]">暂无数据</p>-->
|
|
|
- <!--<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>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</div>-->
|
|
|
<!--模拟练习卡-->
|
|
|
<div class="examination-card-box for-max-big-box">
|
|
|
<div class="year-card-top-title-box">
|
|
|
<p>模拟练习</p>
|
|
|
<p>刷题进度和正确率</p>
|
|
|
</div>
|
|
|
- <div class="bottom-content-box scrollbar-box" style="cursor: pointer;" @click="goPracticeQuestions()">
|
|
|
+ <div class="bottom-content-box scrollbar-box">
|
|
|
<div class="bottom-big-box-6">
|
|
|
- <p>156 / 200</p>
|
|
|
+ <p>{{summaryData.completedCount}} / {{summaryData.totalCount}}</p>
|
|
|
<p >已完成题目数 / 题库总数</p>
|
|
|
</div>
|
|
|
<div class="bottom-big-box-6">
|
|
|
- <p>89%</p>
|
|
|
+ <p>{{summaryData.correctRate}}%</p>
|
|
|
<p >当前模拟练习正确率</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -90,11 +75,14 @@
|
|
|
<!--在线任务卡-->
|
|
|
<div class="for-max-big-box" v-for="(item,index) in dataList" :key="index">
|
|
|
<div class="year-card-top-title-box">
|
|
|
- <p>{{item.examTypeName}}</p>
|
|
|
+ <p>{{item.examName}}</p>
|
|
|
<p v-if="item.examKind==1&&item.conditionType != 4">满足前置条件后可参加考试</p>
|
|
|
<p v-if="item.examKind==1&&item.conditionType == 4">
|
|
|
- <span :class="!item.isPassed&&item.maxScore==0?'color-A':(!item.isPassed&&item.maxScore>0?'color-B':(item.isPassed?'color-C':''))">{{!item.isPassed&&item.maxScore==0?'未开始':(!item.isPassed&&item.maxScore>0?'未通过':(item.isPassed?'已通过':''))}}</span>
|
|
|
- <span style="margin-left:20px;">{{item.maxScore>0?'成绩:'+item.maxScore+'分':''}}</span>
|
|
|
+ <span>{{parseTime(item.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(item.endTime,"{y}-{m}-{d} {h}:{i}")}}</span>
|
|
|
+ </p>
|
|
|
+ <p v-if="item.examKind==1&&item.conditionType == 4">
|
|
|
+ <span :class="!item.isPassed&&item.maxScore==0?'color-A':(!item.isPassed&&item.maxScore>0?'color-B':(item.isPassed?'color-C':''))">{{!item.isPassed&&item.maxScore==0?'未考试':(!item.isPassed&&item.maxScore>0?'未通过':(item.isPassed?'已通过':''))}}</span>
|
|
|
+ <span v-if="item.maxScore>0" style="margin-left:15px;">{{item.maxScore>0?'成绩:'+item.maxScore+'分':''}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="bottom-content-box scrollbar-box">
|
|
|
@@ -115,7 +103,7 @@
|
|
|
<p class="colorC" v-if="item.examStudy">待完成学习任务后解锁</p>
|
|
|
</div>
|
|
|
<div class="bottom-big-box-4">
|
|
|
- <p>考试状态</p>
|
|
|
+ <p>在线考试</p>
|
|
|
<p class="colorA" v-if="item.examKind==1&&item.conditionType == 4" @click="tableButton(4,item)">开始考试</p>
|
|
|
<p class="colorC" v-if="item.examKind==1&&item.conditionType != 4">待通过模拟考试后解锁</p>
|
|
|
<p class="colorB" v-if="item.examKind==2">考试未通过</p>
|
|
|
@@ -127,6 +115,24 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog class="preExam-dialog"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ :close-on-click-modal="false" :close-on-press-escape="false"
|
|
|
+ title="考试承诺书"
|
|
|
+ :visible.sync="preExamDialogType"
|
|
|
+ v-if="preExamDialogType"
|
|
|
+ width="840px"
|
|
|
+ append-to-body>
|
|
|
+ <div style="height:600px;" class="scrollbar-box">
|
|
|
+ <richTextPdf ref="richTextPdf" :content="richTextHtml" />
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer dialog-footer-box">
|
|
|
+ <p class="dialog-footer-button-null"></p>
|
|
|
+ <p class="dialog-footer-button-border" v-if="preButtonType" @click="preExamDialogCancel">下载</p>
|
|
|
+ <p class="dialog-footer-button-primary" @click="examUserExamStart">确认</p>
|
|
|
+ <p class="dialog-footer-button-null"></p>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -134,10 +140,12 @@
|
|
|
import { Encrypt,Decrypt} from '@/utils/secret'
|
|
|
import {
|
|
|
examUserCoursewareLearningRestart,examElLabEduRelationAcademicYearProgress,
|
|
|
- examUserExamStudyTaskList,examUserExamStart,
|
|
|
+ examUserExamStudyTaskList,examUserExamStart,examUserPracticeSummary,
|
|
|
} from "@/api/safetyEducationExaminationNew/index";
|
|
|
+ import richTextPdf from '@/views/safetyEducationExaminationNew/components/richTextPdf.vue';
|
|
|
export default {
|
|
|
name: 'TaskCard',
|
|
|
+ components: { richTextPdf },
|
|
|
data() {
|
|
|
return {
|
|
|
//学年数据
|
|
|
@@ -147,6 +155,16 @@ export default {
|
|
|
examinationMinList:[],
|
|
|
dataList:[],
|
|
|
dataList2:[],
|
|
|
+ summaryData:{
|
|
|
+ totalCount:0,
|
|
|
+ completedCount:0,
|
|
|
+ correctRate:0,
|
|
|
+ },
|
|
|
+ //考前承诺相关
|
|
|
+ preExamDialogType:false,
|
|
|
+ preButtonType:false,
|
|
|
+ richTextHtml: '',
|
|
|
+ preData:null,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -157,10 +175,81 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initialization(){
|
|
|
+ this.examUserPracticeSummary();
|
|
|
this.examElLabEduRelationAcademicYearProgress();
|
|
|
this.examUserExamStudyTaskList();
|
|
|
this.examUserExamStudyTaskList2();
|
|
|
},
|
|
|
+ //下载承诺书
|
|
|
+ preExamDialogCancel(){
|
|
|
+ this.msgSuccess('正在下载,请耐心等候')
|
|
|
+ this.$refs['richTextPdf'].downloadPDF();
|
|
|
+ },
|
|
|
+ //确认承诺-并考试
|
|
|
+ examUserExamStart(){
|
|
|
+ if(this.preData.attemptId){
|
|
|
+ this.$router.push({
|
|
|
+ path: '/startTheExam',
|
|
|
+ query: {
|
|
|
+ attemptId: this.preData.attemptId,
|
|
|
+ type: '1',
|
|
|
+ examKind:this.preData.examKind,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }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,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.msgError(response.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //开始考试判断是否有承诺书
|
|
|
+ setRichExamData(item){
|
|
|
+ if(item.commitmentEnabled == 1){
|
|
|
+ this.$set(this,'preButtonType',item.commitmentPrintEnabled == 1?true:false);
|
|
|
+ this.$set(this,'richTextHtml',item.commitmentContent);
|
|
|
+ this.$set(this,'preData',item);
|
|
|
+ this.$set(this,'preExamDialogType',true);
|
|
|
+ }else{
|
|
|
+ if(item.attemptId){
|
|
|
+ this.$router.push({
|
|
|
+ path: '/startTheExam',
|
|
|
+ query: {
|
|
|
+ attemptId: item.attemptId,
|
|
|
+ type: '1',
|
|
|
+ examKind:item.examKind,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//跳转刷题练习
|
|
|
goPracticeQuestions(){
|
|
|
this.$router.push({
|
|
|
@@ -222,32 +311,7 @@ export default {
|
|
|
}
|
|
|
}else if(type == 4){
|
|
|
//在线考试//补考
|
|
|
- if(item.attemptId){
|
|
|
- this.$router.push({
|
|
|
- path: '/startTheExam',
|
|
|
- query: {
|
|
|
- attemptId: item.attemptId,
|
|
|
- type: '1',
|
|
|
- examKind:item.examKind,
|
|
|
- }
|
|
|
- })
|
|
|
- }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.setRichExamData(item);
|
|
|
}
|
|
|
},
|
|
|
//查询学年进度列表
|
|
|
@@ -280,6 +344,12 @@ export default {
|
|
|
this.$set(this, 'dataList2', response.data.records)
|
|
|
})
|
|
|
},
|
|
|
+ //在线考试
|
|
|
+ examUserPracticeSummary(){
|
|
|
+ examUserPracticeSummary({}).then(response => {
|
|
|
+ this.$set(this, 'summaryData', response.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
@@ -357,13 +427,11 @@ export default {
|
|
|
cursor: pointer;
|
|
|
font-size:14px;
|
|
|
line-height:30px;
|
|
|
- background-color: #0183fa;
|
|
|
- color:#fff;
|
|
|
- border-radius:6px;
|
|
|
+ color:#60708a;
|
|
|
+ text-align: right;
|
|
|
position: absolute;
|
|
|
top:10px;
|
|
|
- right:10px;
|
|
|
- padding:0 10px;
|
|
|
+ right:20px;
|
|
|
}
|
|
|
.color-A{
|
|
|
color:#999;
|