课件管理 查看课程时,scorm课件播放问题

This commit is contained in:
daihh
2023-03-09 18:55:08 +08:00
parent d0701f29bb
commit 8aacb271b6
2 changed files with 45 additions and 12 deletions

View File

@@ -183,6 +183,9 @@
<div v-if="coursewareInfo.content.contentType == 41"> <div v-if="coursewareInfo.content.contentType == 41">
<div class="picture-text" v-html="coursewareInfo.content.content"></div> <div class="picture-text" v-html="coursewareInfo.content.content"></div>
</div> </div>
<div v-if="coursewareInfo.content.contentType == 50">
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:510px;border:0px;"></iframe>
</div>
<div v-if="coursewareInfo.content.contentType == 52"> <div v-if="coursewareInfo.content.contentType == 52">
<div v-if="coursewareInfo.content.content!=''"> <div v-if="coursewareInfo.content.content!=''">
<!-- <hyper-link :content="coursewareInfo.content"></hyper-link> --> <!-- <hyper-link :content="coursewareInfo.content"></hyper-link> -->
@@ -202,16 +205,16 @@
<el-tab-pane label="修改记录" name="record" v-if="isShow"> <el-tab-pane label="修改记录" name="record" v-if="isShow">
<div class="grid-info"> <div class="grid-info">
<el-table border style="margin-bottom: 20px" height="350" :data="dataList"> <el-table border style="margin-bottom: 20px" height="350" :data="dataList">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-table border style="margin-bottom: 10px" :data="props.row.logData"> <el-table border style="margin-bottom: 10px" :data="props.row.logData">
<el-table-column label="内容" prop="title"></el-table-column> <el-table-column label="内容" prop="title"></el-table-column>
<el-table-column label="修改前" prop="before" show-overflow-tooltip> <el-table-column label="修改前" prop="before" show-overflow-tooltip>
<template slot-scope="props"> <template slot-scope="props">
{{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}} {{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column> <el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column>
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
@@ -269,7 +272,7 @@ export default {
pdfPreview, pdfPreview,
videoPlayer, videoPlayer,
audioPlayer, audioPlayer,
chooseOrg chooseOrg,
// hyperLink // hyperLink
}, },
computed: { computed: {
@@ -303,6 +306,7 @@ export default {
converStatus:4, converStatus:4,
courseType: courseType, courseType: courseType,
isEdit: true, isEdit: true,
scormUrl:'',
homeworkInfo: {}, homeworkInfo: {},
examInfo: {}, examInfo: {},
assessInfo: {}, assessInfo: {},
@@ -703,6 +707,35 @@ export default {
$this.$message.error('加载pdf课件文件失败'); $this.$message.error('加载pdf课件文件失败');
} }
}); });
}
if($this.coursewareInfo.content.contentType == 50){
apiCourseFile.detail(con.contentRefId).then(scormFile => {
if (!scormFile.status == 200) {
$this.$message.error('加载SCORM课件失败');
}else{
var curContent=scormFile.result;
//console.log(curContent,'curContent')
if(!curContent.content){
this.$message({type: 'error',message: '无SCORM内容SCORM包解析失败'});
return;
}
//scorm课件的内容取第一个sco
var scorm=JSON.parse(curContent.content);
//console.log(scorm,'scorm')
if(scorm){
let urlPre=window.location.protocol;
let configUrl=process.env.VUE_APP_SCORM_URL;
configUrl=urlPre+configUrl.substring(configUrl.indexOf(':')+1);
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
this.scormUrl=configUrl+'?mode=preview&scormId='+curContent.id;//播放的首页
}else{
this.$message({type: 'error',message: 'SCORM包解析失败'});
}
}
});
} }
} else if (con.sortIndex == 2) { } else if (con.sortIndex == 2) {
$this.homeworkInfo = con; $this.homeworkInfo = con;

View File

@@ -262,7 +262,7 @@
<el-button type="primary" @click="examineData()">提交</el-button> <el-button type="primary" @click="examineData()">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog"> <el-dialog v-if="showDetails" title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
<div v-show="expandDetails"> <div v-show="expandDetails">
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div> <div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div> <div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>