mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
提交临时调整
This commit is contained in:
@@ -101,6 +101,9 @@
|
|||||||
<div v-show="content.contentRefId=='' && content.contentType>0 && content.contentType<41">
|
<div v-show="content.contentRefId=='' && content.contentType>0 && content.contentType<41">
|
||||||
<choose-course-file ref="coursewarePanel" :resType="content.contentType" @choose="chooseFile"></choose-course-file>
|
<choose-course-file ref="coursewarePanel" :resType="content.contentType" @choose="chooseFile"></choose-course-file>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-show="content.contentRefId=='' && content.contentType==50">
|
||||||
|
<choose-course-scorm ref="coursewarePanel" :resType="content.contentType" @choose="chooseFile"></choose-course-scorm>
|
||||||
|
</div>
|
||||||
<!--图文-->
|
<!--图文-->
|
||||||
<div v-show="content.contentType==41">
|
<div v-show="content.contentType==41">
|
||||||
<div style="display: flex;justify-content:space-between">
|
<div style="display: flex;justify-content:space-between">
|
||||||
@@ -323,6 +326,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import chooseCourseFile from '@/components/Course/chooseCourseFile.vue'
|
import chooseCourseFile from '@/components/Course/chooseCourseFile.vue'
|
||||||
|
import chooseCourseScorm from '@/components/Course/chooseCourseScorm.vue'
|
||||||
import courseHomework from '@/components/Course/courseHomework.vue'
|
import courseHomework from '@/components/Course/courseHomework.vue'
|
||||||
import courseExam from '@/components/Course/courseExam.vue'
|
import courseExam from '@/components/Course/courseExam.vue'
|
||||||
import simplePaper from "@/components/Course/simpleTestPaper.vue";
|
import simplePaper from "@/components/Course/simpleTestPaper.vue";
|
||||||
@@ -361,7 +365,7 @@
|
|||||||
default:1
|
default:1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer},
|
components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer,chooseCourseScorm},
|
||||||
// inject: [ "informationDetails" ],
|
// inject: [ "informationDetails" ],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
@@ -379,7 +383,8 @@
|
|||||||
{id:'5',type:'link',name:'外部连接',img:'el-icon-link',resType:52},
|
{id:'5',type:'link',name:'外部连接',img:'el-icon-link',resType:52},
|
||||||
{id:'6',type:'exam',name:'考试',img:'el-icon-document-checked',resType:61},
|
{id:'6',type:'exam',name:'考试',img:'el-icon-document-checked',resType:61},
|
||||||
{id:'7',type:'homework',name:'作业',img:'el-icon-reading',resType:60},
|
{id:'7',type:'homework',name:'作业',img:'el-icon-reading',resType:60},
|
||||||
{id:'8',type:'assess',name:'评估',img:'el-icon-user',resType:62}
|
{id:'8',type:'assess',name:'评估',img:'el-icon-user',resType:62},
|
||||||
|
{id:'10',type:'scorm',name:'SCORM',img:'el-icon-suitcase',resType: 50},
|
||||||
],
|
],
|
||||||
htmlContent:'',
|
htmlContent:'',
|
||||||
linkInfo:{
|
linkInfo:{
|
||||||
|
|||||||
224
src/components/Course/chooseCourseScorm.vue
Normal file
224
src/components/Course/chooseCourseScorm.vue
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
<template>
|
||||||
|
<!--选择SCORM课件-->
|
||||||
|
<div style="min-height: 500px;">
|
||||||
|
<div style="padding: 5px 5px 10px 5px;display: flex;justify-content: space-between;">
|
||||||
|
<!-- <div>
|
||||||
|
<el-button @click="save" type="primary" size="small">确定</el-button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<el-tabs type="border-card" style="min-height: 400px;">
|
||||||
|
<el-tab-pane :label="'选择已有'+curComType.name" >
|
||||||
|
<div style="display: flex;justify-content: flex-start;">
|
||||||
|
<div>
|
||||||
|
<el-input maxlength="50" v-model="keyword" placeholder="名称" size="small"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- <div><el-input maxlength="50" v-model="params.author" placeholder="上传人" size="small"></el-input></div> -->
|
||||||
|
<div style="padding-left: 10px;">
|
||||||
|
<el-button @click="findCourseFile()" type="primary" >搜索</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="findState==2" style="padding-top: 10px;">
|
||||||
|
<el-table style="100%" :data="fileList" border stripe>
|
||||||
|
<el-table-column label="类型" width="60" prop="author"><template slot-scope="scope">{{curComType.name}}</template></el-table-column>
|
||||||
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
|
<el-table-column label="创建" prop="sysCreateBy" width="100"></el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="sysCreateTime" width="160"></el-table-column>
|
||||||
|
<el-table-column label="选择" width="70" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" @click="chooseCourseFile(scope.row)" type="primary">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[5, 10,20,50,100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="count">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="'上传新'+curComType.name">
|
||||||
|
<div v-if="!courseFile.id">
|
||||||
|
<el-upload class="upload-demo" :headers="headers" :data="data" drag :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip" slot="tip">文件大小限制:{{curComType.maxSizeName}},支持的文件类型:{{curComType.fileTypes.join(',')}}</div>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<div v-else style="text-align: center;">
|
||||||
|
<div style="padding: 20px;">{{courseFile.fileName}} <span style="color: green;">上传成功</span></div>
|
||||||
|
<div><el-button @click="chooseCourseFile(courseFile)" type="primary" size="mini">确定</el-button></div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getToken } from "@/utils/token";
|
||||||
|
import apiCourseFile from '../../api/modules/courseFile';
|
||||||
|
export default{
|
||||||
|
props: {
|
||||||
|
minHeight:{
|
||||||
|
type: String,
|
||||||
|
default:'500'
|
||||||
|
},
|
||||||
|
resType:{
|
||||||
|
type: Number,
|
||||||
|
default:0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/xboe/sys/xuploader/file/upload", // 上传的图片服务器地址
|
||||||
|
data:{
|
||||||
|
dir:'course'
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
'XBOE-Access-Token': getToken(),
|
||||||
|
},
|
||||||
|
pageSize:10,
|
||||||
|
pageIndex:1,
|
||||||
|
count:0,
|
||||||
|
keyword: '',
|
||||||
|
comTypes:[
|
||||||
|
{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"]}
|
||||||
|
],
|
||||||
|
curComType:{id:'',type:'',name:'',maxSizeName:'',fileTypes:[]},
|
||||||
|
findState:1,
|
||||||
|
courseFile:{},
|
||||||
|
fileList:[],
|
||||||
|
radioId:'',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.courseFile={};
|
||||||
|
let $this=this;
|
||||||
|
this.comTypes.some(ct=>{
|
||||||
|
if(ct.resType==$this.resType){
|
||||||
|
$this.curComType=ct;
|
||||||
|
//this.findCourseFile();
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
handleBeforeUpload(file) {
|
||||||
|
if(file.name.lastIndexOf(".") ==-1) {
|
||||||
|
this.$message({message:`文件格式不正确!`,type:'error',offset:100})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
|
||||||
|
fileExtension=fileExtension.toLowerCase();
|
||||||
|
// 校检文件类型
|
||||||
|
if(this.curComType.fileTypes.indexOf(fileExtension) == -1){
|
||||||
|
this.$message({message:`文件格式不正确, 请上传正确格式的${this.curComType.name}文件!`,type:'error',offset:100})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 校检文件大小
|
||||||
|
if(this.curComType.maxSize) {
|
||||||
|
const isLt = file.size / 1024 / 1024 < this.curComType.maxSize;
|
||||||
|
if (!isLt) {
|
||||||
|
this.$message({message:`上传文件大小不能超过 ${this.curComType.maxSizeName} !`,type:'error',offset:100})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
// 上传失败
|
||||||
|
handleUploadError(err) {
|
||||||
|
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
|
||||||
|
},
|
||||||
|
// 上传成功回调
|
||||||
|
handleUploadSuccess(res, file) {
|
||||||
|
//console.log(res);
|
||||||
|
if(res.status == 200) {
|
||||||
|
//上传到课件库
|
||||||
|
//console.log(res.result);
|
||||||
|
let courseWare={
|
||||||
|
fileName:res.result.displayName,
|
||||||
|
fileType:res.result.fileType,
|
||||||
|
filePath:res.result.filePath,
|
||||||
|
resType:this.resType,
|
||||||
|
remark:'课程中直接上传'
|
||||||
|
}
|
||||||
|
apiCourseFile.saveUpload(courseWare).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
this.courseFile=rs.result;
|
||||||
|
this.$message({message:"上传成功",type:'success',offset:100});
|
||||||
|
// this.cware.content.contentRefId=rs.result.id;
|
||||||
|
// this.cware.content.contentName=result.displayName;
|
||||||
|
// this.cware.content.content=result.filePath;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$message({message:"上传失败:"+res.message,type:'error',offset:100});
|
||||||
|
}
|
||||||
|
|
||||||
|
//this.$emit("success", res);
|
||||||
|
},
|
||||||
|
// 删除文件
|
||||||
|
handleDelete(index) {
|
||||||
|
this.fileList.splice(index, 1);
|
||||||
|
//注意删除处理
|
||||||
|
//this.$emit("remove", '');
|
||||||
|
},
|
||||||
|
// 获取文件名称
|
||||||
|
getFileName(name) {
|
||||||
|
if (name.lastIndexOf("/") > -1) {
|
||||||
|
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.findCourseFile();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageIndex = val;
|
||||||
|
this.findCourseFile();
|
||||||
|
},
|
||||||
|
findCourseFile(){
|
||||||
|
this.findState=2;
|
||||||
|
let data = {
|
||||||
|
name: this.keyword,
|
||||||
|
resOwner1: '',//this.params.resOwner1, //资源归属一级的id
|
||||||
|
resOwner2: '',//this.params.resOwner2, // 资源归属二级的id
|
||||||
|
resOwner3: '',//this.params.resOwner3, // 资源归属三级的id
|
||||||
|
resType: this.resType, //this.params.type,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageIndex: this.pageIndex,
|
||||||
|
self:true,//只是查询自己的
|
||||||
|
}
|
||||||
|
apiCourseFile.pageList(data).then(rs=>{
|
||||||
|
if(rs.status === 200) {
|
||||||
|
this.fileList = rs.result.list;
|
||||||
|
this.count = rs.result.count;
|
||||||
|
}else{
|
||||||
|
this.$message.error(rs.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
chooseCourseFile(ccfile){
|
||||||
|
this.$emit('choose', ccfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -497,7 +497,6 @@
|
|||||||
<el-button type="primary" v-if="!assess.content.id || assess.content.id==''" @click="saveContent(4)">保 存</el-button>
|
<el-button type="primary" v-if="!assess.content.id || assess.content.id==''" @click="saveContent(4)">保 存</el-button>
|
||||||
<el-button type="danger" @click="deleteContent(4)">删 除</el-button>
|
<el-button type="danger" @click="deleteContent(4)">删 除</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -575,7 +574,7 @@
|
|||||||
{id:'2',type:'sound',name:'音频',img:'el-icon-service',resType: 20},
|
{id:'2',type:'sound',name:'音频',img:'el-icon-service',resType: 20},
|
||||||
{id:'3',type:'html',name:'图文',img:'el-icon-document-copy',resType: 41},
|
{id:'3',type:'html',name:'图文',img:'el-icon-document-copy',resType: 41},
|
||||||
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType: 40},
|
{id:'4',type:'doc',name:'文档',img:'el-icon-document',resType: 40},
|
||||||
// {id:'5',type:'scorm',name:'SCORM(Q2)',img:'el-icon-suitcase',resType: 50},
|
{id:'5',type:'scorm',name:'SCORM',img:'el-icon-suitcase',resType: 50},
|
||||||
{id:'6',type:'link',name:'外部连接',img:'el-icon-link', resType: 52}
|
{id:'6',type:'link',name:'外部连接',img:'el-icon-link', resType: 52}
|
||||||
],
|
],
|
||||||
cwareChange:{
|
cwareChange:{
|
||||||
|
|||||||
9
src/components/Scorm/preview.vue
Normal file
9
src/components/Scorm/preview.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<!--scorm的预览-->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -190,33 +190,36 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="预览课件" :close-on-click-modal="false" :visible.sync="coursewareShow" custom-class="g-dialog">
|
<el-dialog title="预览课件" :close-on-click-modal="false" :visible.sync="coursewareShow" custom-class="g-dialog">
|
||||||
<div>
|
<div>
|
||||||
<div class="courseware-title">{{ fileUrl.fileName }}</div>
|
<div class="courseware-title">{{ fileInfo.fileName }}</div>
|
||||||
<div class="courseware-icon">
|
<div class="courseware-icon">
|
||||||
<div v-if="fileUrl.resType == 10" style="position: relative;">
|
<div v-if="fileInfo.resType == 10" style="position: relative;">
|
||||||
<videoPlayer
|
<videoPlayer
|
||||||
:src="fileBaseUrl + fileUrl.filePath"
|
:src="fileBaseUrl + fileInfo.filePath"
|
||||||
@onPlayerPlaying="onPlayerPlaying"
|
@onPlayerPlaying="onPlayerPlaying"
|
||||||
@onPlayerPlay="onPlayerPlay"
|
@onPlayerPlay="onPlayerPlay"
|
||||||
@onPlayerPause="onPlayerPause"
|
@onPlayerPause="onPlayerPause"
|
||||||
@onPlayerEnded="onPlayerEnded"
|
@onPlayerEnded="onPlayerEnded"
|
||||||
></videoPlayer>
|
></videoPlayer>
|
||||||
<!-- <video :src="fileBaseUrl + fileUrl.filePath" controls controlslist="nodownload" style="width: 100%; height: 100%; object-fit: fill"></video> -->
|
<!-- <video :src="fileBaseUrl + fileInfo.filePath" controls controlslist="nodownload" style="width: 100%; height: 100%; object-fit: fill"></video> -->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="fileUrl.resType == 20">
|
<div v-if="fileInfo.resType == 20">
|
||||||
<audioPlayer
|
<audioPlayer
|
||||||
:url="fileBaseUrl + fileUrl.filePath"
|
:url="fileBaseUrl + fileInfo.filePath"
|
||||||
:name="fileUrl.fileName"
|
:name="fileInfo.fileName"
|
||||||
@onPlaying="audioPlaying"
|
@onPlaying="audioPlaying"
|
||||||
@onPlay="audioPlay"
|
@onPlay="audioPlay"
|
||||||
@onPause="audioPause"
|
@onPause="audioPause"
|
||||||
@onPlayEnd="audioEnd"
|
@onPlayEnd="audioEnd">
|
||||||
></audioPlayer>
|
</audioPlayer>
|
||||||
<!-- <audio width="100%" controls :src="fileBaseUrl+fileUrl.filePath">
|
<!-- <audio width="100%" controls :src="fileBaseUrl+fileInfo.filePath">
|
||||||
您的浏览器不支持 audio 标签。
|
您的浏览器不支持 audio 标签。
|
||||||
</audio> -->
|
</audio> -->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="fileUrl.resType == 30"><img style="width:100%;height:100%" :src="fileBaseUrl + fileUrl.filePath" alt="图片" /></div>
|
<div v-if="fileInfo.resType == 30"><img style="width:100%;height:100%" :src="fileBaseUrl + fileInfo.filePath" alt="图片" /></div>
|
||||||
<div v-if="fileUrl.resType == 40"><pdfPreview :filePath="fileBaseUrl + fileUrl.previewFilePath"></pdfPreview></div>
|
<div v-if="fileInfo.resType == 40"><pdfPreview :filePath="fileBaseUrl + fileInfo.previewFilePath"></pdfPreview></div>
|
||||||
|
<div v-if="fileInfo.resType == 50"> <!--scorm课件预览-->
|
||||||
|
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:600px;border:0px"></iframe>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer"><el-button type="primary" @click="coursewareShow = false">关闭</el-button></span>
|
<span slot="footer"><el-button type="primary" @click="coursewareShow = false">关闭</el-button></span>
|
||||||
@@ -231,22 +234,18 @@
|
|||||||
<el-form-item label="文件名称">{{ form.fileName }}</el-form-item>
|
<el-form-item label="文件名称">{{ form.fileName }}</el-form-item>
|
||||||
<el-form-item label="课件名称"><el-input v-model="form.name" maxlength="50" show-word-limit></el-input></el-form-item>
|
<el-form-item label="课件名称"><el-input v-model="form.name" maxlength="50" show-word-limit></el-input></el-form-item>
|
||||||
<el-form-item label="课件类型">{{ getType(form.resType) }}</el-form-item>
|
<el-form-item label="课件类型">{{ getType(form.resType) }}</el-form-item>
|
||||||
<el-form-item label="时长">
|
<el-form-item label="时长(分)">
|
||||||
<!-- <el-input v-model="form.duration"></el-input> -->
|
<!-- <el-input v-model="form.duration"></el-input> -->
|
||||||
<el-input
|
<el-input type="number" placeholder="请输入数字" :maxlength="32" show-word-limit v-model="form.duration"></el-input>
|
||||||
type="number"
|
|
||||||
placeholder="请输入数字"
|
|
||||||
:maxlength="32"
|
|
||||||
show-word-limit
|
|
||||||
v-model="form.duration"
|
|
||||||
>
|
|
||||||
</el-input>
|
|
||||||
<!-- <el-input-number max="" v-model="form.duration" controls-position="right"></el-input-number> -->
|
<!-- <el-input-number max="" v-model="form.duration" controls-position="right"></el-input-number> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="可见性">
|
<el-form-item label="可见性">
|
||||||
<el-checkbox label="移动端" v-model="form.device1"></el-checkbox>
|
<el-checkbox label="移动端" v-model="form.device1"></el-checkbox>
|
||||||
<el-checkbox label="pc端" v-model="form.device2"></el-checkbox>
|
<el-checkbox label="pc端" v-model="form.device2"></el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="允许下载">
|
||||||
|
<el-checkbox label="移动端" v-model="form.down"></el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer"><el-button :loading="loading" type="primary" @click="saveUpdate()">保存</el-button></span>
|
<span slot="footer"><el-button :loading="loading" type="primary" @click="saveUpdate()">保存</el-button></span>
|
||||||
@@ -282,7 +281,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// resOwnerName: resOwnerIndexName,
|
// resOwnerName: resOwnerIndexName,
|
||||||
isUpload: true,
|
isUpload: true,
|
||||||
fileUrl: {},
|
fileInfo: {},
|
||||||
device1: 1,
|
device1: 1,
|
||||||
device2: 2,
|
device2: 2,
|
||||||
projectOwnership1: '',
|
projectOwnership1: '',
|
||||||
@@ -312,8 +311,15 @@ export default {
|
|||||||
// { value: 90, label: "其他" }
|
// { value: 90, label: "其他" }
|
||||||
],
|
],
|
||||||
form: {
|
form: {
|
||||||
|
id:'',
|
||||||
device1:false,
|
device1:false,
|
||||||
device2:false,
|
device2:false,
|
||||||
|
fileName:'',
|
||||||
|
name:'',
|
||||||
|
resType:'',
|
||||||
|
duration:0,
|
||||||
|
minute:0,
|
||||||
|
down:false
|
||||||
},
|
},
|
||||||
editCoursewareShow: false,
|
editCoursewareShow: false,
|
||||||
currentPage4: 4,
|
currentPage4: 4,
|
||||||
@@ -332,6 +338,7 @@ export default {
|
|||||||
needOrg:'请先选择资源归属',
|
needOrg:'请先选择资源归属',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
courseShow: false,
|
courseShow: false,
|
||||||
|
scormUrl:'',//scorm的播放地址
|
||||||
multipleSelection: []
|
multipleSelection: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -462,6 +469,8 @@ export default {
|
|||||||
} else if (this.form.device2 === true) {
|
} else if (this.form.device2 === true) {
|
||||||
this.form.device = 2;
|
this.form.device = 2;
|
||||||
}
|
}
|
||||||
|
//时长,秒与分钟的转化
|
||||||
|
if(this.form.)
|
||||||
try {
|
try {
|
||||||
const { status,message} = await coueseFile.batchUpdate([this.form]);
|
const { status,message} = await coueseFile.batchUpdate([this.form]);
|
||||||
if (status === 200) {
|
if (status === 200) {
|
||||||
@@ -667,8 +676,17 @@ export default {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
},
|
},
|
||||||
viewTopic(row) {
|
viewTopic(row) {
|
||||||
this.fileUrl = row;
|
this.fileInfo = row;//这里的fileInfo 相当于内容对象
|
||||||
console.log(row, 'row');
|
if(row.resType==50){
|
||||||
|
if(!row.content){
|
||||||
|
this.$message({type: 'error',message: '无SCORM内容,SCORM包解析失败'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//scorm课件的内容,取第一个sco
|
||||||
|
var scorm=JSON.parse(row.content);
|
||||||
|
this.scormUrl='http://localhost:9083/scorm-player?page='+scorm.index;//播放的首页
|
||||||
|
}
|
||||||
|
//console.log(row, 'row');
|
||||||
this.coursewareShow = true;
|
this.coursewareShow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user