mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
课件管理 查看课程时,scorm课件播放问题
This commit is contained in:
@@ -183,6 +183,9 @@
|
||||
<div v-if="coursewareInfo.content.contentType == 41">
|
||||
<div class="picture-text" v-html="coursewareInfo.content.content"></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.content!=''">
|
||||
<!-- <hyper-link :content="coursewareInfo.content"></hyper-link> -->
|
||||
@@ -202,16 +205,16 @@
|
||||
<el-tab-pane label="修改记录" name="record" v-if="isShow">
|
||||
<div class="grid-info">
|
||||
<el-table border style="margin-bottom: 20px" height="350" :data="dataList">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<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="before" show-overflow-tooltip>
|
||||
<template slot-scope="props">
|
||||
{{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<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="before" show-overflow-tooltip>
|
||||
<template slot-scope="props">
|
||||
{{props.row.before == 'null' || props.row.before == ''? '--':props.row.before}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改后" prop="after" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -269,7 +272,7 @@ export default {
|
||||
pdfPreview,
|
||||
videoPlayer,
|
||||
audioPlayer,
|
||||
chooseOrg
|
||||
chooseOrg,
|
||||
// hyperLink
|
||||
},
|
||||
computed: {
|
||||
@@ -303,6 +306,7 @@ export default {
|
||||
converStatus:4,
|
||||
courseType: courseType,
|
||||
isEdit: true,
|
||||
scormUrl:'',
|
||||
homeworkInfo: {},
|
||||
examInfo: {},
|
||||
assessInfo: {},
|
||||
@@ -703,6 +707,35 @@ export default {
|
||||
$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) {
|
||||
$this.homeworkInfo = con;
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
<el-button type="primary" @click="examineData()">提交</el-button>
|
||||
</span>
|
||||
</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-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>
|
||||
|
||||
Reference in New Issue
Block a user