mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
提交调整
This commit is contained in:
@@ -35,3 +35,6 @@ VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
# scorm课件的播放url地址
|
||||
VUE_APP_SCORM_URL = 'http://localhost:9083/scorm-player'
|
||||
|
||||
@@ -32,3 +32,6 @@ VUE_APP_PUBLIC_PATH='/pc-release'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u.boe.com/web-release/'
|
||||
|
||||
# scorm课件的播放url地址
|
||||
VUE_APP_SCORM_URL = 'http://localhost:9083/scorm-player'
|
||||
|
||||
@@ -32,3 +32,6 @@ VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u.boe.com/web/'
|
||||
|
||||
# scorm课件的播放url地址
|
||||
VUE_APP_SCORM_URL = 'http://localhost:9083/scorm-player'
|
||||
|
||||
@@ -32,3 +32,6 @@ VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'
|
||||
|
||||
# scorm课件的播放url地址
|
||||
VUE_APP_SCORM_URL = 'http://localhost:9083/scorm-player'
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!--显示内容-->
|
||||
<div v-else style="margin: 0px 10px;">
|
||||
<!--视频-->
|
||||
<div v-show="content.contentType>0 && content.contentType<41">
|
||||
<div v-show="content.contentType>0 && content.contentType<51">
|
||||
<div style="display: flex;justify-content:space-between">
|
||||
<div>
|
||||
<el-input maxlength="50" @change="updateName" v-model="content.contentName" placeholder="内容的名称(限50字以内)"></el-input>
|
||||
@@ -95,6 +95,9 @@
|
||||
</div>
|
||||
<pdfPreview v-if="content.contentType==40 && curPdfPath!=''" :filePath="fileBaseUrl+curPdfPath"></pdfPreview>
|
||||
</div>
|
||||
<div v-if="content.contentType==50" style="text-align: center;">
|
||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:400px;border:0px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--课件选择或上传的公用组件-->
|
||||
@@ -102,7 +105,7 @@
|
||||
<choose-course-file ref="coursewarePanel" :resType="content.contentType" @choose="chooseFile"></choose-course-file>
|
||||
</div>
|
||||
<div v-show="content.contentRefId=='' && content.contentType==50">
|
||||
<choose-course-scorm ref="coursewarePanel" :resType="content.contentType" @choose="chooseFile"></choose-course-scorm>
|
||||
<choose-course-file ref="coursewareScormPanel" :resType="content.contentType" @choose="chooseFile"></choose-course-file>
|
||||
</div>
|
||||
<!--图文-->
|
||||
<div v-show="content.contentType==41">
|
||||
@@ -326,7 +329,6 @@
|
||||
</template>
|
||||
<script>
|
||||
import chooseCourseFile from '@/components/Course/chooseCourseFile.vue'
|
||||
import chooseCourseScorm from '@/components/Course/chooseCourseScorm.vue'
|
||||
import courseHomework from '@/components/Course/courseHomework.vue'
|
||||
import courseExam from '@/components/Course/courseExam.vue'
|
||||
import simplePaper from "@/components/Course/simpleTestPaper.vue";
|
||||
@@ -365,7 +367,7 @@
|
||||
default:1
|
||||
}
|
||||
},
|
||||
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer,chooseCourseScorm},
|
||||
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer},
|
||||
// inject: [ "informationDetails" ],
|
||||
data(){
|
||||
return {
|
||||
@@ -373,6 +375,7 @@
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
curPdfPath:'',
|
||||
curCFile:{},//当前课件的内容
|
||||
scormUrl:'',//scormUrl地址
|
||||
comTypes:[
|
||||
//文件类型,10视频,20音频,30图片, 40 文档,41表图文,50表scrom包,90表其它
|
||||
//图文41,连接52,作业60,考试61,评估62
|
||||
@@ -452,6 +455,8 @@
|
||||
this.loadPdfFile();
|
||||
}else if(newVal.contentType==41){
|
||||
this.htmlContent=newVal.content;
|
||||
}else if(newVal.contentType==50){
|
||||
this.loadScormFile();
|
||||
}else if(newVal.contentType==52){
|
||||
//外部连接
|
||||
if(newVal.content!=''){
|
||||
@@ -491,6 +496,7 @@
|
||||
this.linkInfo.url='';
|
||||
this.htmlContent='';
|
||||
this.curPdfPath='';
|
||||
this.scormUrl='';
|
||||
this.curCFile={};
|
||||
this.exam.contentId='';
|
||||
this.exam.paperContent='';
|
||||
@@ -524,6 +530,25 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
loadScormFile(){
|
||||
//对于scorm课件内容,需要再查一下
|
||||
this.scormUrl='';
|
||||
apiCourseFile.detail(this.content.contentRefId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.curCFile=rs.result;
|
||||
//this.curPdfPath=rs.result.previewFilePath;
|
||||
this.content.content='scorm';
|
||||
this.scormUrl=process.env.VUE_APP_SCORM_URL+'?r=1&mode=preview&scormId='+this.curCFile.id;//播放的首页
|
||||
console.log(this.scormUrl,'this.scormUrl')
|
||||
}
|
||||
});
|
||||
// let fname=this.content.content;
|
||||
// if(fname && fname.indexOf('.pdf')>-1){
|
||||
// this.curPdfPath=this.content.content;
|
||||
// }else{
|
||||
|
||||
// }
|
||||
},
|
||||
loadHomeworkInfo(){
|
||||
apiCourse.getHomework(this.content.id).then(res=>{
|
||||
if(res.status==200){
|
||||
@@ -686,6 +711,7 @@
|
||||
//未初始化会调用失败,所以这里要等vue变化后再调用
|
||||
this.$nextTick(function(){
|
||||
this.$refs.coursewarePanel.findCourseFile();
|
||||
this.$refs.coursewareScormPanel.findCourseFile();
|
||||
})
|
||||
|
||||
}
|
||||
@@ -697,7 +723,9 @@
|
||||
// this.content.content.url=cfile.filePath;
|
||||
if(this.content.contentType==10 || this.content.contentType==20){
|
||||
this.curriculumData.url = cfile.filePath;
|
||||
}else{
|
||||
}else if(this.content.contentType==50){ //scorm课件内容
|
||||
//this.chooseCourseScorm
|
||||
} else{
|
||||
if(cfile.previewFilePath){
|
||||
this.content.content=cfile.previewFilePath;
|
||||
}else{
|
||||
@@ -713,7 +741,10 @@
|
||||
setTimeout(function(){
|
||||
$this.loadPdfFile();
|
||||
},2000);
|
||||
|
||||
}else if(this.content.contentType==50){
|
||||
setTimeout(function(){
|
||||
$this.loadScormFile();
|
||||
},2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
{id:'1',type:'video',name:'视频',img:'el-icon-video-camera',resType:10,maxSize:1024,maxSizeName:"1G",fileTypes:['mp4']},
|
||||
{id:'2',type:'sound',name:'音频',img:'el-icon-service',resType:20,maxSize:1024,maxSizeName:"1G",fileTypes:['mp3']},
|
||||
{id:'3',type:'image',name:'图片',img:'el-icon-picture-outline',resType:30,maxSize:10,maxSizeName:"10M",fileTypes:["png","jpg","gif","bmp"]},
|
||||
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:1024,maxSizeName:"1G",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]}
|
||||
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:1024,maxSizeName:"1G",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]},
|
||||
{id:'5',type:'scorm',name:'SCORM课件',img:'el-icon-suitcase',resType:50,maxSize:1024,maxSizeName:"1G",fileTypes:["zip"]}
|
||||
],
|
||||
curComType:{id:'',type:'',name:'',maxSizeName:'',fileTypes:[]},
|
||||
findState:1,
|
||||
@@ -133,6 +134,11 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(this.resType==50){
|
||||
this.data.dir='scorm';
|
||||
}else{
|
||||
this.data.dir='course';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
// 上传失败
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="duration" label="时长(分)" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input type="number" size="small" v-model="scope.row.duration"></el-input>
|
||||
<el-input type="number" size="small" v-model="scope.row.minute"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可见性" width="100">
|
||||
@@ -190,7 +190,7 @@
|
||||
</el-dialog>
|
||||
<el-dialog title="预览课件" :close-on-click-modal="false" width="800px" :visible.sync="coursewareShow" custom-class="g-dialog">
|
||||
<div>
|
||||
<div class="courseware-title">{{ fileInfo.fileName }}</div>
|
||||
<div class="courseware-title">{{ fileInfo.name }}</div>
|
||||
<div class="courseware-icon">
|
||||
<div v-if="fileInfo.resType == 10" style="position: relative;">
|
||||
<videoPlayer
|
||||
@@ -236,7 +236,7 @@
|
||||
<el-form-item label="课件类型">{{ getType(form.resType) }}</el-form-item>
|
||||
<el-form-item label="时长(分)">
|
||||
<!-- <el-input v-model="form.duration"></el-input> -->
|
||||
<el-input type="number" placeholder="请输入数字" :maxlength="32" show-word-limit v-model="form.duration"></el-input>
|
||||
<el-input type="number" placeholder="请输入数字" :maxlength="32" show-word-limit v-model="form.minute"></el-input>
|
||||
<!-- <el-input-number max="" v-model="form.duration" controls-position="right"></el-input-number> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="可见性">
|
||||
@@ -532,6 +532,7 @@ export default {
|
||||
if (status === 200) {
|
||||
result.device1 = true;
|
||||
result.device2 = true;
|
||||
|
||||
this.fileList.push(result);
|
||||
} else {
|
||||
this.$message.error(error);
|
||||
@@ -554,6 +555,7 @@ export default {
|
||||
} else if (item.device2 === true) {
|
||||
item.device = 2;
|
||||
}
|
||||
|
||||
});
|
||||
this.loading = true;
|
||||
coueseFile.batchUpdate(this.fileList).then(rs => {
|
||||
@@ -575,6 +577,9 @@ export default {
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
const { result, error, status } = await coueseFile.pageList(this.params, this.page);
|
||||
if (status === 200) {
|
||||
result.list.forEach(item=>{
|
||||
item.minute=item.duration/60;
|
||||
})
|
||||
this.tableData = result.list;
|
||||
this.page.count = result.count;
|
||||
this.page.pageSize = result.pageSize;
|
||||
@@ -685,12 +690,11 @@ export default {
|
||||
//scorm课件的内容,取第一个sco
|
||||
var scorm=JSON.parse(row.content);
|
||||
//console.log(scorm,'scorm')
|
||||
if(scorm.index){
|
||||
if(scorm){
|
||||
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
|
||||
this.scormUrl='http://localhost:9083/scorm-player?mode=preview&courseId='+row.courseId+'scormId='+row.id+'&sco='+scorm.index;//播放的首页
|
||||
this.scormUrl=process.env.VUE_APP_SCORM_URL+'?mode=preview&scormId='+row.id;//播放的首页
|
||||
}else{
|
||||
//这种情况代表无播放页
|
||||
//this.scormUrl='http://localhost:9083/scorm-player?scormId='+row.id;//播放的首页
|
||||
this.$message({type: 'error',message: 'SCORM包解析失败'});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user