mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 06:16:44 +08:00
修改bug2.0
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
<script>
|
||||
import {
|
||||
import lecturer, {
|
||||
addTeacher,
|
||||
getCertificationProcess,
|
||||
getProgress,
|
||||
getReviewResult,
|
||||
getTeacherInfo, secondExamine
|
||||
} from "@/api/modules/lecturer";
|
||||
import processStatus from "@/components/processStatus.vue";
|
||||
|
||||
export default {
|
||||
name: "TwoAthentication",
|
||||
components: {processStatus},
|
||||
data(){
|
||||
return{
|
||||
teacherId:'',
|
||||
@@ -24,10 +26,11 @@ export default {
|
||||
result:'',
|
||||
newTeacherId:'',
|
||||
pid:'',
|
||||
statusInfo1:''
|
||||
statusInfo1:'',
|
||||
teacherInfo:''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
//读取路由参数
|
||||
this.teacherId=this.$route.query.teacherId
|
||||
//获取教师基本信息
|
||||
@@ -35,12 +38,6 @@ export default {
|
||||
// this.getReviewResult()
|
||||
},
|
||||
methods:{
|
||||
//前往二次认证
|
||||
getoFactor(){
|
||||
secondExamine({teacherId:this.teacherId}).then(res=>{
|
||||
this.newTeacherId=res.data.replace(/[^0-9]/ig,'')
|
||||
})
|
||||
},
|
||||
//获取认证结果
|
||||
getReviewResult(){
|
||||
getReviewResult({teacherId:this.pid}).then(res=>{
|
||||
@@ -58,24 +55,27 @@ export default {
|
||||
},
|
||||
baseInfo(){
|
||||
getTeacherInfo({teacherId:this.teacherId}).then(res=>{
|
||||
this.pid=res.data[0].pid
|
||||
getTeacherInfo({teacherId:res.data[0].pid}).then(resquest=>{
|
||||
this.teacherInfo = resquest.data[0]
|
||||
this.form.teacherName=resquest.data[0].teacherName
|
||||
this.form.teacherNo=resquest.data[0].teacherNo
|
||||
this.form.orgName=resquest.data[0].orgName
|
||||
this.form.positionName=resquest.data[0].positionName
|
||||
this.form.bandCode=resquest.data[0].bandCode
|
||||
this.form.courseName=resquest.data[0].courseName
|
||||
this.form.courseContent=resquest.data[0].courseContent
|
||||
this.form.courseIntroduction=resquest.data[0].courseIntroduction
|
||||
this.form.coursewareName=resquest.data[0].examineCourseware.coursewareName
|
||||
//获取学习进度
|
||||
this.getReviewResult()
|
||||
this.addTeacher()
|
||||
this.getStatus()
|
||||
})
|
||||
/*
|
||||
* teacherName:教师姓名 teacherNo:教师工号 orgName:组织 positionName:岗位 bandCode:职级 courseName:认证课程名称 courseContent课程内容分类
|
||||
* courseIntroduction:课程简介
|
||||
* */
|
||||
this.form.teacherName=res.data[0].teacherName
|
||||
this.form.teacherNo=res.data[0].teacherNo
|
||||
this.form.orgName=res.data[0].orgName
|
||||
this.form.positionName=res.data[0].positionName
|
||||
this.form.bandCode=res.data[0].bandCode
|
||||
this.form.courseName=res.data[0].courseName
|
||||
this.form.courseContent=res.data[0].courseContent
|
||||
this.form.courseIntroduction=res.data[0].courseIntroduction
|
||||
this.form.coursewareName=res.data[0].examineCourseware.coursewareName
|
||||
this.pid=res.data[0].pid
|
||||
//获取学习进度
|
||||
this.getReviewResult()
|
||||
this.addTeacher()
|
||||
this.getStatus()
|
||||
})
|
||||
},
|
||||
addTeacher(){
|
||||
@@ -105,77 +105,98 @@ export default {
|
||||
},
|
||||
toCaseData(courseId){
|
||||
this.$router.push("/course/studyindex?id=" + courseId);
|
||||
},
|
||||
downloadFile() {
|
||||
lecturer.exportPdf({coursewareId: this.teacherInfo.examineCourseware.id}).then(res => {
|
||||
if (res.status) {
|
||||
this.$message.error('导出失败');
|
||||
} else {
|
||||
const link = document.createElement('a');// 创建a标签
|
||||
let blob = new Blob([res], {type: 'application/vnd.;charset=UTF-8'}); // 设置文件类型
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob); // 创建URL
|
||||
link.setAttribute("download", this.teacherInfo.examineCourseware.coursewareName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<process-status :teacherId="teacherId"></process-status>
|
||||
<div class="title">基本信息</div>
|
||||
<el-container>
|
||||
<div class="form-table">
|
||||
<el-form label-width="140px">
|
||||
<el-form>
|
||||
<div>
|
||||
<el-col :span="10">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="姓名:">
|
||||
{{form.teacherName}}
|
||||
{{ form.teacherName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="工号:">
|
||||
{{form.teacherNo}}
|
||||
{{ form.teacherNo }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
<el-form-item label="组织:">
|
||||
{{form.orgName}}
|
||||
</el-form-item>
|
||||
<div>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="岗位:">
|
||||
{{form.positionName}}
|
||||
<el-col :span="11">
|
||||
<el-form-item label="组织:">
|
||||
{{ form.orgName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-form-item label="职级:">
|
||||
{{form.bandCode}}
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="岗位:">
|
||||
{{ form.positionName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
<div>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="认证课程名称:" prop="courseName">
|
||||
{{ form.courseName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="课程内容分类:" prop="courseContent">
|
||||
{{ form.courseContent }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
<el-form-item label="认证课程名称:" prop="courseName">
|
||||
{{form.courseName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="课程内容分类:" prop="courseContent">
|
||||
{{form.courseContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="课程简介:" prop="courseIntroduction">
|
||||
{{form.courseIntroduction}}
|
||||
{{ form.courseIntroduction }}
|
||||
</el-form-item>
|
||||
<el-form-item label="初稿课件:" prop="courseIntroduction">
|
||||
{{form.coursewareName}} <span style="color: #1378f6;display: inline-block;margin-left: 16px">查看</span>
|
||||
<el-form-item label="终稿课件:" prop="courseIntroduction">
|
||||
{{ form.coursewareName }} <span
|
||||
style="color: #1378f6;display: inline-block;margin-left: 16px;cursor: pointer;"
|
||||
@click="downloadFile">查看</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-container>
|
||||
<div class="title" style="margin-top: 20px">线上课程</div>
|
||||
<div class="progress">
|
||||
<div v-for="(item,index) in progressData" :key="item">
|
||||
<div class="progress-item" @click="toCaseData(item.courseId)">
|
||||
<div class="uc-course-img" style="width: 212px;height:119px">
|
||||
<img style="width: 100%;" v-if="item.courseImage!=''" :src="item.courseImage">
|
||||
<img style="width: 100%;" v-else :src="fileBaseUrl+'/pc/images/bgimg/course.png'">
|
||||
</div>
|
||||
<div class="courseName">{{item.courseName}}</div>
|
||||
<div class="smallTitle">当前进度</div>
|
||||
<el-progress :percentage="item.progress" :format="format"></el-progress>
|
||||
<div v-for="(item,index) in progressData" :key="index" @click="toCaseData(item.courseId)">
|
||||
<div class="uc-course-img" style="width: 212px;height:119px">
|
||||
<img style="width: 100%;" v-if="item.courseImage!=''" :src="item.courseImage">
|
||||
<img style="width: 100%;" v-else :src="fileBaseUrl+'/pc/images/bgimg/course.png'">
|
||||
</div>
|
||||
<div class="courseName">{{ item.courseName }}</div>
|
||||
<div class="smallTitle">当前进度</div>
|
||||
<el-progress :percentage="parseInt(item.progress)"
|
||||
:color="parseInt(item.progress)=='100'?'#31AF0D':'#FFA050'"></el-progress>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title" style="margin-top: 20px">认证结果</div>
|
||||
<div v-if="statusInfo1.reviewResult==2" class="score" style="color: #797979">请您耐心等待线下认证安排!</div>
|
||||
<div v-if="statusInfo1.reviewResult==2" class="score">请您耐心等待线下认证安排!</div>
|
||||
<div v-if="statusInfo1.reviewResult==0" class="score" style="color: #4b7900;">恭喜您,您的认证分数为{{ result.avgScore }}分,已经通过认证!</div>
|
||||
<div v-if="statusInfo1.reviewResult==1" class="score" style="color: #ff0000">很遗憾,您的认证分数为{{ result.avgScore }}分,没有通过认证!</div>
|
||||
</div>
|
||||
@@ -191,26 +212,21 @@ export default {
|
||||
.title{
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
width: 850px;
|
||||
border-bottom: 1px solid rgba(215, 215, 215, 0.66);
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
|
||||
padding: 2px 2px 20px 2px;
|
||||
}
|
||||
.form-table{
|
||||
width: 850px;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.progress{
|
||||
.progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.progress-item{
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
margin-top: 20px;
|
||||
}
|
||||
.progress>div{
|
||||
max-width: 250px;
|
||||
margin-right: 20px;
|
||||
.progress > div {
|
||||
width: 300px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
.courseName{
|
||||
font-weight: 650;
|
||||
@@ -230,14 +246,15 @@ export default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.tip{
|
||||
color: #7d7c7c;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.score{
|
||||
.score {
|
||||
margin-top: 28px;
|
||||
font-size: 20px;
|
||||
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
}
|
||||
.twoFactorAuthentication{
|
||||
width: 344px;
|
||||
@@ -257,4 +274,21 @@ export default {
|
||||
box-sizing: border-box;
|
||||
color: #797979;
|
||||
}
|
||||
::v-deep .el-progress-bar__outer {
|
||||
background-color: rgba(255, 160, 80, 0.2);
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user