mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
先提交一下
This commit is contained in:
@@ -162,7 +162,14 @@
|
||||
</audio> -->
|
||||
</div>
|
||||
<div v-if="coursewareInfo.content.contentType == 40">
|
||||
<pdfPreview :filePath="fileBaseUrl+contentData.content"></pdfPreview>
|
||||
<div style="padding: 10px;color: #767676;text-align: center;line-height: 40px; " v-if="converStatus < 2">
|
||||
<div>文档文件转化中,还未转化完成,</div>
|
||||
<div >上传时间:{{curCFile.sysCreateTime}}</div>
|
||||
</div>
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;text-align: center;" v-if="converStatus == 3">
|
||||
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
|
||||
</div>
|
||||
<pdfPreview :filePath="fileBaseUrl+coursewareInfo.content.content"></pdfPreview>
|
||||
</div>
|
||||
<div v-if="coursewareInfo.content.contentType == 41">
|
||||
<div class="picture-text" v-html="coursewareInfo.content.content"></div>
|
||||
@@ -229,6 +236,7 @@ import WxEditor from "@/components/Editor/index.vue";
|
||||
import apiTag from "../../api/modules/tag.js";
|
||||
import videoPlayer from "@/components/VideoPlayer/index.vue";
|
||||
import audioPlayer from "@/components/AudioPlayer/index.vue";
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
import { mapGetters, mapActions } from "vuex";
|
||||
// import hyperLink from '@/components/Course/hyperLink.vue';
|
||||
export default {
|
||||
@@ -271,6 +279,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
converStatus:4,
|
||||
courseType: courseType,
|
||||
isEdit: true,
|
||||
homeworkInfo: {},
|
||||
@@ -278,6 +287,7 @@ export default {
|
||||
assessInfo: {},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
btnLoading: false,
|
||||
curCFile:{},//课件内容
|
||||
coursewareInfo: {
|
||||
content: {},
|
||||
finish: false,
|
||||
@@ -577,13 +587,26 @@ export default {
|
||||
$this.coursewareInfo.content.contentType == 20
|
||||
) {
|
||||
if (con.content.startsWith("{")) {
|
||||
this.curriculumData = JSON.parse(con.content);
|
||||
$this.curriculumData = JSON.parse(con.content);
|
||||
} else {
|
||||
this.curriculumData.url = con.content;
|
||||
$this.curriculumData.url = con.content;
|
||||
}
|
||||
}
|
||||
if ($this.coursewareInfo.content.contentType == 40) {
|
||||
let url = this.fileBaseUrl + r.content;
|
||||
if($this.coursewareInfo.content.contentType == 40) {
|
||||
//console.log(con.content,'con.content');
|
||||
if(con.content != '' && con.content.indexOf('.pdf') > -1) {
|
||||
$this.coursewareInfo.content.content = con.content;
|
||||
}else {
|
||||
apiCourseFile.detail(con.contentRefId).then(cfrs => {
|
||||
if (cfrs.status == 200) {
|
||||
$this.curCFile=cfrs.result;
|
||||
$this.converStatus = cfrs.result.converStatus;
|
||||
$this.coursewareInfo.content.content = cfrs.result.previewFilePath;
|
||||
} else {
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (con.sortIndex == 2) {
|
||||
$this.homeworkInfo = con;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<el-form-item label="课程简介" style="word-break:break-all;">
|
||||
{{courseInfo.summary}}
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="完成规则" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="params.forScene" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
||||
<!-- <el-form-item label="开放权限">{{courseInfo.openObject}}</el-form-item> -->
|
||||
<!-- <el-form-item label="课程描述">
|
||||
@@ -163,7 +163,7 @@
|
||||
<!-- <video :src="fileBaseUrl+contentData.content" width="100%" controls controlslist="nodownload" style="width: 100%; height: 100%; object-fit: fill"></video> -->
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 20">
|
||||
<audioPlayer :url="fileBaseUrl+curriculumData.url"
|
||||
<audioPlayer :url="fileBaseUrl+curriculumData.url"
|
||||
:name="contentData.contentName"
|
||||
@onPlaying="audioPlaying"
|
||||
@onPlay="audioPlay"
|
||||
@@ -175,7 +175,14 @@
|
||||
</audio> -->
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 40">
|
||||
<pdfPreview :filePath="fileBaseUrl+contentData.content"></pdfPreview>
|
||||
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2">
|
||||
<div>文档文件转化中,还未转化完成,</div>
|
||||
<div>上传时间:{{curCFile.sysCreateTime}}</div>
|
||||
</div>
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;" v-if="converStatus == 3">
|
||||
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
|
||||
</div>
|
||||
<pdfPreview v-if="contentData.content" :filePath="fileBaseUrl+contentData.content"></pdfPreview>
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 41">
|
||||
<div class="picture-text" v-html="contentData.content"></div>
|
||||
@@ -220,7 +227,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div><el-button size="small" @click="type =0;contentData= {}" type="info">课程基本信息</el-button>
|
||||
<div><el-button size="small" @click="type =0;contentData= {}" type="info">课程基本信息</el-button>
|
||||
<el-button size="small" v-if="isShow" @click="type =1" type="info">修改记录</el-button>
|
||||
</div>
|
||||
<div style="padding: 5px;">课程内容目录</div>
|
||||
@@ -269,6 +276,7 @@ import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
import hyperLink from '@/components/Course/hyperLink.vue';
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
export default {
|
||||
name:"auditCourse2",
|
||||
components: {
|
||||
@@ -307,6 +315,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
converStatus:4,
|
||||
curriculumData:{
|
||||
url:'',
|
||||
isDrag:false,
|
||||
@@ -316,6 +325,7 @@ export default {
|
||||
isEdit: true,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
contentData: {},
|
||||
curCFile:{},//课件内容
|
||||
getType: getType,
|
||||
btnLoading: false,
|
||||
teacherName: [],
|
||||
@@ -486,7 +496,7 @@ export default {
|
||||
.saveOnlyCourse(this.courseInfo)
|
||||
.then(res => {
|
||||
if (res.status === 200) {
|
||||
|
||||
|
||||
this.$message.success("操作成功!");
|
||||
// let result = res.result;
|
||||
this.isEdit = true;
|
||||
@@ -498,7 +508,7 @@ export default {
|
||||
// list.push(item.teacherName);
|
||||
// });
|
||||
this.btnLoading = false;
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.btnLoading = false;
|
||||
@@ -638,6 +648,23 @@ export default {
|
||||
}else{
|
||||
this.curriculumData.url = r.content
|
||||
}
|
||||
} else if(r.contentType == 40) {
|
||||
this.contentData.content="";
|
||||
if (r.content != '' && r.content.indexOf('.pdf') > -1) {
|
||||
this.contentData.content = cfrs.result.previewFilePath;
|
||||
}else{
|
||||
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
||||
if (cfrs.status == 200) {
|
||||
this.curCFile=cfrs.result;
|
||||
this.converStatus = cfrs.result.converStatus;
|
||||
this.contentData.content = cfrs.result.previewFilePath;
|
||||
//console.log(r.content);
|
||||
}else {
|
||||
this.contentData.content="";
|
||||
this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.type = 0;
|
||||
},
|
||||
|
||||
@@ -85,7 +85,14 @@
|
||||
<div v-if="content.contentType==30">
|
||||
<el-image :src="fileBaseUrl+content.content" fit="fill"></el-image>
|
||||
</div>
|
||||
<div v-if="content.contentType==40">
|
||||
<div v-if="content.contentType==40" style="text-align: center;">
|
||||
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2">
|
||||
<div>文档文件转化中,还未转化完成,</div>
|
||||
<div>上传时间:{{curCFile.sysCreateTime}}</div>
|
||||
</div>
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;" v-if="converStatus == 3">
|
||||
<div>文件转化失败,请重新上传(不要上传加密的文件),请联系管理员</div>
|
||||
</div>
|
||||
<pdfPreview v-if="content.contentType==40 && curPdfPath!=''" :filePath="fileBaseUrl+curPdfPath"></pdfPreview>
|
||||
</div>
|
||||
</div>
|
||||
@@ -353,8 +360,10 @@
|
||||
// inject: [ "informationDetails" ],
|
||||
data(){
|
||||
return {
|
||||
converStatus:4,
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
curPdfPath:'',
|
||||
curCFile:{},//当前课件的内容
|
||||
comTypes:[
|
||||
//文件类型,10视频,20音频,30图片, 40 文档,41表图文,50表scrom包,90表其它
|
||||
//图文41,连接52,作业60,考试61,评估62
|
||||
@@ -469,6 +478,7 @@
|
||||
this.linkInfo.url='';
|
||||
this.htmlContent='';
|
||||
this.curPdfPath='';
|
||||
this.curCFile={};
|
||||
this.exam.contentId='';
|
||||
this.exam.paperContent='';
|
||||
this.exam.info='';
|
||||
@@ -488,20 +498,15 @@
|
||||
},
|
||||
loadPdfFile(){
|
||||
//检查当前是否是pdf,如果是pdf那么就不需要再查询一次了
|
||||
|
||||
let fname=this.content.content;
|
||||
|
||||
if(fname && fname.indexOf('.pdf')>-1){
|
||||
this.curPdfPath=this.content.content;
|
||||
}else{
|
||||
apiCourseFile.detail(this.content.contentRefId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(rs.result.previewFilePath){
|
||||
this.curCFile=rs.result;
|
||||
this.converStatus = rs.result.converStatus;
|
||||
this.curPdfPath=rs.result.previewFilePath;
|
||||
}else{
|
||||
this.curPdfPath=rs.result.filePath;
|
||||
}
|
||||
//console.log(this.curPdfPath,'this.curPdfPath');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-else style="text-align: center;">
|
||||
<div style="padding: 20px;">{{courseFile.fileName}}</div>
|
||||
<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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user