|
@@ -1,74 +1,14 @@
|
|
|
<template>
|
|
|
<div class="m-right-block fr mh576">
|
|
|
-
|
|
|
- <el-row class="p20">
|
|
|
- <el-col :lg="6" :md="6" :span="6">
|
|
|
- <el-progress
|
|
|
- class="mprocess"
|
|
|
- type="circle"
|
|
|
- :width="150"
|
|
|
- :format="formatFinish"
|
|
|
- :stroke-width="18"
|
|
|
- :percentage="info.percent"
|
|
|
- >
|
|
|
- </el-progress>
|
|
|
-
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :lg="6" :md="6" :span="6">
|
|
|
- <el-progress v-if="tpl.examGroupId>0"
|
|
|
- class="mprocess"
|
|
|
- type="circle"
|
|
|
- :width="150"
|
|
|
- :format="formatExam"
|
|
|
- :stroke-width="18"
|
|
|
- :percentage="info.score"
|
|
|
- >
|
|
|
- </el-progress>
|
|
|
-
|
|
|
- <el-progress v-else
|
|
|
- class="mprocess"
|
|
|
- type="circle"
|
|
|
- :width="150"
|
|
|
- :format="formatString('--')"
|
|
|
- :stroke-width="18"
|
|
|
- :percentage="0"
|
|
|
- >
|
|
|
- </el-progress>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :lg="6" :md="6" :span="6">
|
|
|
- <img src="../../../assets/wxapp.jpg" width="150px" />
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :lg="6" :md="6" :span="6">
|
|
|
- <div>
|
|
|
- <p style="font-size: 24px;"> 说明 </p>
|
|
|
- <p class="mt10" >岗位名称:{{tpl.name}} </p>
|
|
|
- <p class="mt10" v-if="tpl.examGroupId>0" >考试不限次数,获得60分即合格</p>
|
|
|
-
|
|
|
- <p class="mt10" v-if="tpl.examGroupId==0" >学完所有课程,即可打印学时证明</p>
|
|
|
-
|
|
|
- <div>
|
|
|
- <el-button type="primary" class="mt10" style="font-size: 14px;" @click="startExam" v-if="tpl.examGroupId>0">
|
|
|
- 参加考试
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" class="mt10" style="font-size: 14px;" @click="printCert">
|
|
|
- 学时证明
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- </el-row>
|
|
|
+ <ICourseInfoTest v-if="tpl.type=='检测试验人员'" :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfoTest>
|
|
|
+ <ICourseInfo v-else :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfo>
|
|
|
|
|
|
<div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
|
|
|
-
|
|
|
<div class="m-account">
|
|
|
<div class="account-tit" style="height:30px">
|
|
|
<a :class="{'current':show===1}" @click="show=1" class="">正在学习</a>
|
|
|
<a :class="{'current':show===2}" @click="show=2" class="">已经完成</a>
|
|
|
- <a :class="{'current':show===3}" @click="show=3" class="" v-if="tpl.examGroupId>0">考试记录</a>
|
|
|
+ <a :class="{'current':show===3}" @click="show=3" class="" v-if="tpl.examGroupId>0||tpl.type=='检测试验人员'">考试记录</a>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="show <3" class="lwh-ul-form mt20">
|
|
@@ -163,6 +103,8 @@
|
|
|
import {httpServer } from "@/components/httpServer/httpServer.js";
|
|
|
import Media from "./components/media.vue";
|
|
|
import ExamList from "./components/ExamList.vue";
|
|
|
+ import ICourseInfo from "./components/iCourseInfo.vue";
|
|
|
+ import ICourseInfoTest from "./components/iCourseInfoTest.vue";
|
|
|
import {getPercent} from '@/utils/index.js'
|
|
|
import {delExam} from '../exam/components/util.js'
|
|
|
import md5 from 'js-md5';
|
|
@@ -207,7 +149,7 @@
|
|
|
showList:[],
|
|
|
};
|
|
|
},
|
|
|
- components:{Media,ExamList},
|
|
|
+ components:{Media,ExamList,ICourseInfo,ICourseInfoTest},
|
|
|
beforeMount() {
|
|
|
this.courseId = +this.$route.params.courseId
|
|
|
this.getData()
|
|
@@ -256,10 +198,10 @@
|
|
|
this.options.autoplay = this.options.playtimes>0;
|
|
|
this.mediaDialog = true;
|
|
|
},
|
|
|
- startExam( ){
|
|
|
+ startExam( groupId ){
|
|
|
let courseId = this.courseId
|
|
|
delExam()
|
|
|
- this.$router.push(`/center/exam/${courseId}`);
|
|
|
+ this.$router.push({path:`/center/exam/${courseId}`, query:{groupId}});
|
|
|
},
|
|
|
printCert( ){
|
|
|
if( this.info.getXs < this.info.totalXs ){
|
|
@@ -317,9 +259,9 @@
|
|
|
let param = { courseId: this.courseId }
|
|
|
httpServer("course.getCourse", param).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.info = res.data.info;
|
|
|
- let list = res.data.list;
|
|
|
- this.tpl = res.data.tpl||{};
|
|
|
+ let {info, extra, list, tpl} = res.data;
|
|
|
+ this.info = Object.assign( info, extra||{});
|
|
|
+ this.tpl = tpl||{};
|
|
|
this.list = list.map( (item)=>{
|
|
|
item.percent = getPercent(item)||0;
|
|
|
return item;
|