flx:修改课程类型
This commit is contained in:
parent
a0deb4d0f4
commit
a883fb9af4
@ -1,102 +1,114 @@
|
||||
<template>
|
||||
<view class="fullHeight">
|
||||
<headers :showBack="true">
|
||||
<view class="headerName">
|
||||
课程学习
|
||||
</view>
|
||||
</headers>
|
||||
|
||||
<video :src="url_config+'image/'+courseDetail.eduVideo" controls class="videoBox"></video>
|
||||
<view class="courseTitle">
|
||||
{{courseDetail.eduCourseName}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
课程类型:{{educateTypeList[courseDetail.eduType-1]}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
试卷总分:{{courseDetail.totalScore}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
及格分数:{{courseDetail.passScore}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
创建时间:{{courseDetail.addTime}}
|
||||
</view>
|
||||
<button type="primary" class="btn submitBtn big" @click="gotoTest" v-if="courseDetail.questionList.length>0">开始考试</button>
|
||||
</view>
|
||||
<view class="fullHeight">
|
||||
<headers :showBack="true">
|
||||
<view class="headerName"> 课程学习 </view>
|
||||
</headers>
|
||||
|
||||
<video
|
||||
:src="url_config + 'image/' + courseDetail.eduVideo"
|
||||
controls
|
||||
class="videoBox"
|
||||
></video>
|
||||
<view class="courseTitle">
|
||||
{{ courseDetail.eduCourseName }}
|
||||
</view>
|
||||
<view class="desc"> 课程类型:{{ educateTypeList[courseDetail.eduType - 1] }} </view>
|
||||
<view class="desc"> 试卷总分:{{ courseDetail.totalScore }} </view>
|
||||
<view class="desc"> 及格分数:{{ courseDetail.passScore }} </view>
|
||||
<view class="desc"> 创建时间:{{ courseDetail.addTime }} </view>
|
||||
<button
|
||||
type="primary"
|
||||
class="btn submitBtn big"
|
||||
@click="gotoTest"
|
||||
v-if="courseDetail.questionList.length > 0"
|
||||
>
|
||||
开始考试
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
courseDetail:{
|
||||
eduAddr: "",
|
||||
eduClasshour: "",
|
||||
eduContent: "",
|
||||
eduCourseName: "",
|
||||
eduPhoto: "",
|
||||
eduTeacher: "",
|
||||
eduTime: "",
|
||||
eduType: 1,
|
||||
eduVideo: "",
|
||||
passScore: "",
|
||||
projectSn: "",
|
||||
questionList: [],
|
||||
totalScore: "",
|
||||
addTime: ""
|
||||
},
|
||||
educateTypeList: ['入场三级教育','定期安全教育','安全技术交底','VR安全教育'],
|
||||
eduId:'',
|
||||
workerId:''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.eduId=options.eduId
|
||||
this.workerId=options.workerId
|
||||
this.getDetailData()
|
||||
},
|
||||
methods: {
|
||||
gotoTest(){
|
||||
uni.navigateTo({
|
||||
url:'./test?eduId='+this.eduId+'&workerId='+this.workerId
|
||||
})
|
||||
},
|
||||
//获取课程详细数据
|
||||
getDetailData(){
|
||||
var that = this
|
||||
this.sendRequest({
|
||||
url: "xmgl/safeEducationQuestion/selectSafeEducationQuestionInfo",
|
||||
data: {eduId:this.eduId},
|
||||
method: "post",
|
||||
success(res) {
|
||||
that.courseDetail=res.result.safeEducation
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
courseDetail: {
|
||||
eduAddr: "",
|
||||
eduClasshour: "",
|
||||
eduContent: "",
|
||||
eduCourseName: "",
|
||||
eduPhoto: "",
|
||||
eduTeacher: "",
|
||||
eduTime: "",
|
||||
eduType: 1,
|
||||
eduVideo: "",
|
||||
passScore: "",
|
||||
projectSn: "",
|
||||
questionList: [],
|
||||
totalScore: "",
|
||||
addTime: "",
|
||||
},
|
||||
educateTypeList: [
|
||||
"入场安全教育",
|
||||
"日常安全教育",
|
||||
"每日安全交底",
|
||||
"VR安全教育",
|
||||
"班前教育",
|
||||
"日常教育(日常违规教育)",
|
||||
"每日交底(专项方案交底)",
|
||||
"每日交底(安全技术交底)",
|
||||
"每日交底(大工程交底)",
|
||||
"专项安全教育",
|
||||
],
|
||||
eduId: "",
|
||||
workerId: "",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.eduId = options.eduId;
|
||||
this.workerId = options.workerId;
|
||||
this.getDetailData();
|
||||
},
|
||||
methods: {
|
||||
gotoTest() {
|
||||
uni.navigateTo({
|
||||
url: "./test?eduId=" + this.eduId + "&workerId=" + this.workerId,
|
||||
});
|
||||
},
|
||||
//获取课程详细数据
|
||||
getDetailData() {
|
||||
var that = this;
|
||||
this.sendRequest({
|
||||
url: "xmgl/safeEducationQuestion/selectSafeEducationQuestionInfo",
|
||||
data: { eduId: this.eduId },
|
||||
method: "post",
|
||||
success(res) {
|
||||
that.courseDetail = res.result.safeEducation;
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.videoBox{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
margin: 10px 0;
|
||||
.videoBox {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.courseTitle{
|
||||
padding: 0 15px;
|
||||
.courseTitle {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.desc{
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
padding: 5px 0 0 15px;
|
||||
.desc {
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
padding: 5px 0 0 15px;
|
||||
}
|
||||
.submitBtn{
|
||||
/* margin: 15px 20px; */
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
width: calc(100% - 40px);
|
||||
.submitBtn {
|
||||
/* margin: 15px 20px; */
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
width: calc(100% - 40px);
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user