mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
提交临时调整
This commit is contained in:
@@ -190,33 +190,36 @@
|
||||
</el-dialog>
|
||||
<el-dialog title="预览课件" :close-on-click-modal="false" :visible.sync="coursewareShow" custom-class="g-dialog">
|
||||
<div>
|
||||
<div class="courseware-title">{{ fileUrl.fileName }}</div>
|
||||
<div class="courseware-title">{{ fileInfo.fileName }}</div>
|
||||
<div class="courseware-icon">
|
||||
<div v-if="fileUrl.resType == 10" style="position: relative;">
|
||||
<div v-if="fileInfo.resType == 10" style="position: relative;">
|
||||
<videoPlayer
|
||||
:src="fileBaseUrl + fileUrl.filePath"
|
||||
:src="fileBaseUrl + fileInfo.filePath"
|
||||
@onPlayerPlaying="onPlayerPlaying"
|
||||
@onPlayerPlay="onPlayerPlay"
|
||||
@onPlayerPause="onPlayerPause"
|
||||
@onPlayerEnded="onPlayerEnded"
|
||||
></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 v-if="fileUrl.resType == 20">
|
||||
<div v-if="fileInfo.resType == 20">
|
||||
<audioPlayer
|
||||
:url="fileBaseUrl + fileUrl.filePath"
|
||||
:name="fileUrl.fileName"
|
||||
:url="fileBaseUrl + fileInfo.filePath"
|
||||
:name="fileInfo.fileName"
|
||||
@onPlaying="audioPlaying"
|
||||
@onPlay="audioPlay"
|
||||
@onPause="audioPause"
|
||||
@onPlayEnd="audioEnd"
|
||||
></audioPlayer>
|
||||
<!-- <audio width="100%" controls :src="fileBaseUrl+fileUrl.filePath">
|
||||
@onPlayEnd="audioEnd">
|
||||
</audioPlayer>
|
||||
<!-- <audio width="100%" controls :src="fileBaseUrl+fileInfo.filePath">
|
||||
您的浏览器不支持 audio 标签。
|
||||
</audio> -->
|
||||
</div>
|
||||
<div v-if="fileUrl.resType == 30"><img style="width:100%;height:100%" :src="fileBaseUrl + fileUrl.filePath" alt="图片" /></div>
|
||||
<div v-if="fileUrl.resType == 40"><pdfPreview :filePath="fileBaseUrl + fileUrl.previewFilePath"></pdfPreview></div>
|
||||
<div v-if="fileInfo.resType == 30"><img style="width:100%;height:100%" :src="fileBaseUrl + fileInfo.filePath" alt="图片" /></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>
|
||||
<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="课件名称"><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="时长">
|
||||
<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.duration"></el-input>
|
||||
<!-- <el-input-number max="" v-model="form.duration" controls-position="right"></el-input-number> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="可见性">
|
||||
<el-checkbox label="移动端" v-model="form.device1"></el-checkbox>
|
||||
<el-checkbox label="pc端" v-model="form.device2"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="允许下载">
|
||||
<el-checkbox label="移动端" v-model="form.down"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer"><el-button :loading="loading" type="primary" @click="saveUpdate()">保存</el-button></span>
|
||||
@@ -282,7 +281,7 @@ export default {
|
||||
},
|
||||
// resOwnerName: resOwnerIndexName,
|
||||
isUpload: true,
|
||||
fileUrl: {},
|
||||
fileInfo: {},
|
||||
device1: 1,
|
||||
device2: 2,
|
||||
projectOwnership1: '',
|
||||
@@ -312,8 +311,15 @@ export default {
|
||||
// { value: 90, label: "其他" }
|
||||
],
|
||||
form: {
|
||||
id:'',
|
||||
device1:false,
|
||||
device2:false,
|
||||
fileName:'',
|
||||
name:'',
|
||||
resType:'',
|
||||
duration:0,
|
||||
minute:0,
|
||||
down:false
|
||||
},
|
||||
editCoursewareShow: false,
|
||||
currentPage4: 4,
|
||||
@@ -332,6 +338,7 @@ export default {
|
||||
needOrg:'请先选择资源归属',
|
||||
fileList: [],
|
||||
courseShow: false,
|
||||
scormUrl:'',//scorm的播放地址
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
@@ -462,6 +469,8 @@ export default {
|
||||
} else if (this.form.device2 === true) {
|
||||
this.form.device = 2;
|
||||
}
|
||||
//时长,秒与分钟的转化
|
||||
if(this.form.)
|
||||
try {
|
||||
const { status,message} = await coueseFile.batchUpdate([this.form]);
|
||||
if (status === 200) {
|
||||
@@ -667,8 +676,17 @@ export default {
|
||||
console.log(data);
|
||||
},
|
||||
viewTopic(row) {
|
||||
this.fileUrl = row;
|
||||
console.log(row, 'row');
|
||||
this.fileInfo = row;//这里的fileInfo 相当于内容对象
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user