|
@@ -1,19 +1,21 @@
|
|
<template>
|
|
<template>
|
|
<div class="m-right-block fr mh576">
|
|
<div class="m-right-block fr mh576">
|
|
- <ICourseInfoTest v-if="tpl.type=='检测试验人员'" :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfoTest>
|
|
|
|
- <ICourseInfoXsExtra v-else-if="tpl.testXs>0"
|
|
|
|
- :extraXs="extraXs" :info="info"
|
|
|
|
- @updateInfo="updateInfo"
|
|
|
|
- :tpl="tpl" @startExamTest="startExamTest" @startExam="startExam"></ICourseInfoXsExtra>
|
|
|
|
-
|
|
|
|
- <ICourseInfo v-else :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfo>
|
|
|
|
|
|
+ <div v-if="show!=4">
|
|
|
|
+ <ICourseInfoTest v-if="tpl.type=='检测试验人员'" :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfoTest>
|
|
|
|
+ <ICourseInfoXsExtra v-else-if="tpl.testXs>0"
|
|
|
|
+ :extraXs="extraXs" :info="info"
|
|
|
|
+ @updateInfo="updateInfo"
|
|
|
|
+ :tpl="tpl" @startExamTest="startExamTest" @startExam="startExam"></ICourseInfoXsExtra>
|
|
|
|
|
|
|
|
+ <ICourseInfo v-else :info="info" :tpl="tpl" @printCert="printCert" @startExam="startExam"></ICourseInfo>
|
|
|
|
+ </div>
|
|
<div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
|
|
<div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
|
|
<div class="m-account">
|
|
<div class="m-account">
|
|
<div class="account-tit" style="height:30px">
|
|
<div class="account-tit" style="height:30px">
|
|
<a :class="{'current':show===1}" @click="show=1" class="">正在学习</a>
|
|
<a :class="{'current':show===1}" @click="show=1" class="">正在学习</a>
|
|
<a :class="{'current':show===2}" @click="show=2" 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||tpl.type=='检测试验人员'">考试记录</a>
|
|
<a :class="{'current':show===3}" @click="show=3" class="" v-if="tpl.examGroupId>0||tpl.type=='检测试验人员'">考试记录</a>
|
|
|
|
+ <a :class="{'current':show===4}" v-if="show==4" >{{media.name}}</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div v-if="show <3" class="lwh-ul-form mt20">
|
|
<div v-if="show <3" class="lwh-ul-form mt20">
|
|
@@ -77,6 +79,23 @@
|
|
<exam-list :courseId="courseId"> </exam-list>
|
|
<exam-list :courseId="courseId"> </exam-list>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <div v-if="show ==4" class="lwh-ul-form mt20">
|
|
|
|
+ <div style="width: 640px;margin: 0 auto;">
|
|
|
|
+ <i-media
|
|
|
|
+ :media-id="mediaId"
|
|
|
|
+ :options="options"
|
|
|
|
+ :dialog="mediaDialog"
|
|
|
|
+ :media="media"
|
|
|
|
+ :duration="info.duration"
|
|
|
|
+ @close="closeMedia"
|
|
|
|
+ :mediaType="mediaType"
|
|
|
|
+ @changeMedia="changeMedia"
|
|
|
|
+ @updateOption = "updateOption"
|
|
|
|
+ @update="update">
|
|
|
|
+ </i-media>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<el-dialog class="previewDialog" :visible.sync="testExamDalog"
|
|
<el-dialog class="previewDialog" :visible.sync="testExamDalog"
|
|
top="50px" width="1024px"
|
|
top="50px" width="1024px"
|
|
@close="testExamDalog=false">
|
|
@close="testExamDalog=false">
|
|
@@ -84,26 +103,7 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-dialog
|
|
|
|
- class="media-dialog"
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
- :visible.sync="mediaDialog"
|
|
|
|
- top="50px"
|
|
|
|
- :title="media.name"
|
|
|
|
- :width="mediaType=='hls'?'720px':'540px'"
|
|
|
|
- >
|
|
|
|
- <Media
|
|
|
|
- :options="options"
|
|
|
|
- :dialog="mediaDialog"
|
|
|
|
- :media="media"
|
|
|
|
- :duration="info.duration"
|
|
|
|
- @close="closeMedia"
|
|
|
|
- :mediaType="mediaType"
|
|
|
|
- @changeMedia="changeMedia"
|
|
|
|
- @updateOption = "updateOption"
|
|
|
|
- @update="update">
|
|
|
|
- </Media>
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
+
|
|
|
|
|
|
<el-dialog title="输入认证" center :visible.sync="editRzcode" >
|
|
<el-dialog title="输入认证" center :visible.sync="editRzcode" >
|
|
<el-form label-width="120px" ref="elAdd">
|
|
<el-form label-width="120px" ref="elAdd">
|
|
@@ -122,7 +122,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {httpServer } from "@/components/httpServer/httpServer.js";
|
|
import {httpServer } from "@/components/httpServer/httpServer.js";
|
|
- import Media from "./components/media.vue";
|
|
|
|
|
|
+ import IMedia from "./components/iMedia.vue";
|
|
import ExamList from "./components/ExamList.vue";
|
|
import ExamList from "./components/ExamList.vue";
|
|
import ICourseInfo from "./components/iCourseInfo.vue";
|
|
import ICourseInfo from "./components/iCourseInfo.vue";
|
|
import ICourseInfoTest from "./components/iCourseInfoTest.vue";
|
|
import ICourseInfoTest from "./components/iCourseInfoTest.vue";
|
|
@@ -149,10 +149,11 @@
|
|
extraXs:{},
|
|
extraXs:{},
|
|
page:1,
|
|
page:1,
|
|
size:5,
|
|
size:5,
|
|
|
|
+ mediaId:0,
|
|
options:{
|
|
options:{
|
|
controls:true,
|
|
controls:true,
|
|
autoplay: true, // 如果true,浏览器准备好时开始回放。
|
|
autoplay: true, // 如果true,浏览器准备好时开始回放。
|
|
- muted: true, // 默认情况下将会消除任何音频。
|
|
|
|
|
|
+ muted: false, // 默认情况下将会消除任何音频。
|
|
loop: false, // 导致视频一结束就重新开始。
|
|
loop: false, // 导致视频一结束就重新开始。
|
|
preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
|
|
preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
|
|
language: 'zh-CN',
|
|
language: 'zh-CN',
|
|
@@ -161,19 +162,19 @@
|
|
sources: [],
|
|
sources: [],
|
|
poster: '', // 你的封面地址
|
|
poster: '', // 你的封面地址
|
|
notSupportedMessage: '无法播放媒体源', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
|
|
notSupportedMessage: '无法播放媒体源', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
|
|
- playtimes: '',
|
|
|
|
controlBar: {
|
|
controlBar: {
|
|
timeDivider: true,
|
|
timeDivider: true,
|
|
durationDisplay: true,
|
|
durationDisplay: true,
|
|
remainingTimeDisplay: false,
|
|
remainingTimeDisplay: false,
|
|
fullscreenToggle: true
|
|
fullscreenToggle: true
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ playtimes:""
|
|
},
|
|
},
|
|
list: [],
|
|
list: [],
|
|
showList:[],
|
|
showList:[],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- components:{Media,ExamList,ICourseInfo,ICourseInfoTest,ICourseAnswerTest,ICourseInfoXsExtra},
|
|
|
|
|
|
+ components:{IMedia,ExamList,ICourseInfo,ICourseInfoTest,ICourseAnswerTest,ICourseInfoXsExtra},
|
|
beforeMount() {
|
|
beforeMount() {
|
|
this.courseId = +this.$route.params.courseId
|
|
this.courseId = +this.$route.params.courseId
|
|
this.getData()
|
|
this.getData()
|
|
@@ -346,6 +347,7 @@
|
|
},
|
|
},
|
|
closeMedia(){
|
|
closeMedia(){
|
|
this.mediaType = '';
|
|
this.mediaType = '';
|
|
|
|
+ this.show = 1;
|
|
this.mediaDialog=false;
|
|
this.mediaDialog=false;
|
|
},
|
|
},
|
|
// 加载媒体
|
|
// 加载媒体
|
|
@@ -354,20 +356,16 @@
|
|
this.media.index = index
|
|
this.media.index = index
|
|
httpServer('course.GetMedia', {id:item.id}).then( res => {
|
|
httpServer('course.GetMedia', {id:item.id}).then( res => {
|
|
if( res.code != 200) return;
|
|
if( res.code != 200) return;
|
|
- let {mediaUrl, id, position, marks} = res.data||{};
|
|
|
|
|
|
+ let {mediaUrl, id, position, duration, marks} = res.data||{};
|
|
|
|
+ if( position >= duration) position = duration||0;
|
|
this.mediaUrl = res.data.mediaUrl;
|
|
this.mediaUrl = res.data.mediaUrl;
|
|
- if( this.mediaUrl.indexOf('/hls/') == -1){
|
|
|
|
- this.mediaType = 'ld'
|
|
|
|
- }else{
|
|
|
|
- this.mediaType = 'hls'
|
|
|
|
- }
|
|
|
|
this.options.marks = !!marks;
|
|
this.options.marks = !!marks;
|
|
this.media.position = position;
|
|
this.media.position = position;
|
|
|
|
+ this.options.playtimes = position
|
|
this.media.id = id;
|
|
this.media.id = id;
|
|
|
|
+ this.mediaId = id;
|
|
this.options.sources = [{src:this.mediaUrl,type: "application/x-mpegURL"}];
|
|
this.options.sources = [{src:this.mediaUrl,type: "application/x-mpegURL"}];
|
|
- this.options.playtimes = position||1;
|
|
|
|
- this.options.autoplay = position>0;
|
|
|
|
- this.mediaDialog = true;
|
|
|
|
|
|
+ this.show = 4
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|