mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
提交修改
This commit is contained in:
@@ -778,6 +778,12 @@
|
||||
if(con.contentType==40){
|
||||
//console.log('加载pdf文件内容');
|
||||
$this.loadPdfFile();
|
||||
}else if(con.contentType==50){
|
||||
//console.log('加载pdf文件内容');
|
||||
if(!this.scormUrl){
|
||||
$this.loadScormFile();
|
||||
}
|
||||
|
||||
}
|
||||
if(con.contentType==52){
|
||||
if(con.content.startsWith('\{')){
|
||||
@@ -836,7 +842,10 @@
|
||||
},
|
||||
loadScormFile(){
|
||||
//对于scorm课件内容,需要再查一下
|
||||
this.scormUrl='';
|
||||
//this.scormUrl='';
|
||||
if(this.scormUrl){
|
||||
return;
|
||||
}
|
||||
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.curCFile=rs.result;
|
||||
@@ -952,6 +961,7 @@
|
||||
resetContent(index){
|
||||
if(index==1){
|
||||
this.cware.content.id='';
|
||||
this.scormUrl='';
|
||||
this.cware.content.contentRefId='';
|
||||
this.cware.content.contentName='';
|
||||
this.cware.content.content='';
|
||||
@@ -1030,6 +1040,7 @@
|
||||
});
|
||||
if(!pass){
|
||||
this.$message.error("试卷试题请填写完整,每个试题必须要有答案");
|
||||
this.loading=false;
|
||||
return;
|
||||
}
|
||||
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
||||
@@ -1139,11 +1150,11 @@
|
||||
if(this.cware.content.contentType==40){
|
||||
setTimeout(function(){
|
||||
$this.loadPdfFile();
|
||||
},2000);
|
||||
},1000);
|
||||
}else if(this.cware.content.contentType==50){
|
||||
setTimeout(function(){
|
||||
$this.loadScormFile();
|
||||
},2000);
|
||||
},500);
|
||||
}
|
||||
},
|
||||
getCoursewareList() {
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
<div v-if="resType == 41">
|
||||
<div style="padding: 20px;" v-html="contentData.content"></div>
|
||||
</div>
|
||||
<div v-if="resType == 50">
|
||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:400px;border:0px"></iframe>
|
||||
</div>
|
||||
<div v-if="resType == 52">
|
||||
<div v-if="contentData.content != ''">
|
||||
<div class="hyper-link" v-if="conLink.openType == 2">
|
||||
@@ -317,6 +320,7 @@
|
||||
data() {
|
||||
return {
|
||||
cutOrgNamePath,
|
||||
scormUrl:'',//当前播放的scormUrl
|
||||
loading:false,
|
||||
controlHeight:400,//左边控制区域的内容高度
|
||||
timer: '',
|
||||
@@ -436,9 +440,8 @@
|
||||
this.$router.push({path:this.$xpage.getHomePath(tea.teacherId)})
|
||||
},
|
||||
noteChange(){
|
||||
//视频点定位,直接到播放的视频位置
|
||||
//视频点定位,直接到播放的视频位置
|
||||
this.timer = new Date().getTime()
|
||||
|
||||
},
|
||||
//非音视频课学习时长的增加,每一分钟保存一次
|
||||
appendStudyOtherTime() {
|
||||
@@ -592,7 +595,25 @@
|
||||
}
|
||||
});
|
||||
// }
|
||||
} else if (r.contentType == 52) {
|
||||
}else if(r.contentType==50){ //scorm
|
||||
this.scormUrl='';
|
||||
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
||||
if(cfrs.status==200){
|
||||
this.curCFile = cfrs.result;
|
||||
//this.scormUrl=cfrs
|
||||
let pars='?mode=normal';
|
||||
pars+='&scormId='+this.curCFile.id;
|
||||
pars+='&courseId='+this.courseId;
|
||||
pars+='&contentId='+r.id;
|
||||
pars+='&studentId='+this.userInfo.aid;
|
||||
pars+='&studentName='+encodeURIComponent(this.userInfo.name);
|
||||
pars+='&lmsId='+this.studyId;
|
||||
pars+='&scoId=';//不指定,scorm模块自动根据学习记录定位
|
||||
this.scormUrl=process.env.VUE_APP_SCORM_URL+pars;//播放的首页
|
||||
}
|
||||
});
|
||||
|
||||
}else if (r.contentType == 52) {
|
||||
this.isAppendTime = false;
|
||||
if (r.content.startsWith('\{')) {
|
||||
this.conLink = JSON.parse(r.content);
|
||||
@@ -617,6 +638,7 @@
|
||||
if (this.contentData.status < 2) {
|
||||
this.contentData.status = 2; //进行中
|
||||
}
|
||||
//以下是学习记录
|
||||
if (this.contentData.contentType > 20) { //非视频类的
|
||||
//用户的学习时长,非音视频课程学习,单独的处理
|
||||
this.isAppendTime = false;
|
||||
@@ -625,9 +647,13 @@
|
||||
$this.appendStudyOtherTime();
|
||||
}, 1000*60*2); //非音视频课程学习,2分钟后记录,因为一次记录是60秒
|
||||
//this.appendStudyTime();
|
||||
this.handleTimeout = setTimeout(function() {
|
||||
$this.saveStudyInfo();
|
||||
}, 5000); //5秒后记录学习完成
|
||||
if (this.contentData.contentType != 50) {
|
||||
this.handleTimeout = setTimeout(function(){
|
||||
$this.saveStudyInfo();
|
||||
}, 5000); //5秒后记录学习完成
|
||||
}else{
|
||||
//scorm课件不记录完成情况,由播放回调记录完成情况
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user