diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index 846e735c..edf1a8c0 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -162,8 +162,13 @@ -->
-
文档未转化完成
-
您上传的文档转化失败,请联系管理员
+
+
文档文件转化中,还未转化完成,
+
上传时间:{{curCFile.sysCreateTime}}
+
+
+ 文件转化失败,请重新上传(不要上传加密的文件)或联系管理员 +
@@ -231,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 { @@ -281,6 +287,7 @@ export default { assessInfo: {}, fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, btnLoading: false, + curCFile:{},//课件内容 coursewareInfo: { content: {}, finish: false, @@ -580,26 +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) { - if (con.content != '' && con.content.indexOf('.pdf') == -1) { - apiCourseFile.detail(r.contentRefId).then(cfrs => { - if (cfrs.status == 200) { - $this.converStatus = cfrs.result.converStatus; - $this.coursewareInfo.content.content = cfrs.result.previewFilePath; - //console.log(r.content); - } else { - $this.$message.error('加载pdf课件文件失败'); - } - }); - } - // else { - // this.coursewareInfo.content.content = con.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; diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue index 46152878..9c79582d 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -60,7 +60,7 @@ {{courseInfo.summary}} - +
- -->
-
文档未转化完成
-
您上传的文档转化失败,请联系管理员
- +
+
文档文件转化中,还未转化完成,
+
上传时间:{{curCFile.sysCreateTime}}
+
+
+ 文件转化失败,请重新上传(不要上传加密的文件)或联系管理员 +
+
@@ -222,7 +227,7 @@
-
课程基本信息 +
课程基本信息 修改记录
课程内容目录
@@ -320,6 +325,7 @@ export default { isEdit: true, fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, contentData: {}, + curCFile:{},//课件内容 getType: getType, btnLoading: false, teacherName: [], @@ -490,7 +496,7 @@ export default { .saveOnlyCourse(this.courseInfo) .then(res => { if (res.status === 200) { - + this.$message.success("操作成功!"); // let result = res.result; this.isEdit = true; @@ -502,7 +508,7 @@ export default { // list.push(item.teacherName); // }); this.btnLoading = false; - + } else { this.$message.error(res.message); this.btnLoading = false; @@ -643,14 +649,19 @@ export default { this.curriculumData.url = r.content } } else if(r.contentType == 40) { - if (r.content != '' && r.content.indexOf('.pdf') == -1) { + 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.$message.error('加载pdf课件文件失败'); + }else { + this.contentData.content=""; + this.$message.error('加载pdf课件文件失败'); } }); } diff --git a/src/components/Course/catalogCourseware.vue b/src/components/Course/catalogCourseware.vue index 4c50a127..19646e5a 100644 --- a/src/components/Course/catalogCourseware.vue +++ b/src/components/Course/catalogCourseware.vue @@ -86,8 +86,13 @@
-
文档未转化完成
-
您上传的文档转化失败,请联系管理员
+
+
文档文件转化中,还未转化完成,
+
上传时间:{{curCFile.sysCreateTime}}
+
+
+
文件转化失败,请重新上传(不要上传加密的文件),请联系管理员
+
@@ -358,6 +363,7 @@ 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 @@ -472,6 +478,7 @@ this.linkInfo.url=''; this.htmlContent=''; this.curPdfPath=''; + this.curCFile={}; this.exam.contentId=''; this.exam.paperContent=''; this.exam.info=''; @@ -497,12 +504,9 @@ }else{ apiCourseFile.detail(this.content.contentRefId).then(rs=>{ if(rs.status==200){ + this.curCFile=rs.result; this.converStatus = rs.result.converStatus; - if(rs.result.previewFilePath){ this.curPdfPath=rs.result.previewFilePath; - }else{ - this.curPdfPath=rs.result.filePath; - } } }); } diff --git a/src/components/Course/chooseCourseFile.vue b/src/components/Course/chooseCourseFile.vue index e225fb17..6437c430 100644 --- a/src/components/Course/chooseCourseFile.vue +++ b/src/components/Course/chooseCourseFile.vue @@ -51,7 +51,7 @@
-
{{courseFile.fileName}}
+
{{courseFile.fileName}} 上传成功
确定
diff --git a/src/components/Course/weikeContent.vue b/src/components/Course/weikeContent.vue index 0ff160b3..4ea62005 100644 --- a/src/components/Course/weikeContent.vue +++ b/src/components/Course/weikeContent.vue @@ -36,9 +36,8 @@
- +
-
@@ -101,15 +100,21 @@
-
-
{{cware.content.contentName}}
- 保存 -
-
-
文档未转化完成
-
您上传的文档转化失败,请联系管理员
- -
+
+
+ {{cware.content.contentName}} 上传成功 +
系统正对文件进行转化,您可以继续操作
+ 确定 +
+
+
+
文档文件转化中,还未转化完成,
上传时间:{{curCFile.sysCreateTime}}
+
+
+
文件转化失败,请重新上传(不要上传加密的文件),请联系管理员
+
+ +
@@ -556,6 +561,7 @@ converStatus:4, courseFileShow:false, curContent:{id:'',contentType:0,contenRefId:''}, + curCFile:{},//当前课件的内容 fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL, imageShowUrl: '', activeName: 'courseware', @@ -656,50 +662,13 @@ }, course(newVal,oldVal){ // - if(this.contents.length>0){ - let $this=this; - this.contents.forEach(con=>{ - if(con.sortIndex==1){ - $this.cware.content=con; - $this.cware.show=2; - //对于pdf文件的问题处理 - if(con.contentType==40 && con.content.indexOf('.pdf')==-1){ - $this.loadPdfFile(); - } - if(con.contentType==52){ - if(con.content.startsWith('\{')){ - $this.cware.linkInfo=JSON.parse(con.content); - }else{ - $this.cware.linkInfo.url=con.content; - } - } - if(con.contentType==10 || con.contentType==20){ - if(con.content.startsWith('\{')){ - $this.cware.curriculumData=JSON.parse(con.content); - }else{ - $this.cware.curriculumData.url=con.content; - } - } - }else if(con.sortIndex==2){ - $this.homework.content=con; - //查询作业信息,并显示 - $this.loadHomeworkInfo(); - }else if(con.sortIndex==3){ - $this.exam.content=con; - //查询考试信息并显示 - $this.loadExamInfo(); - }else if(con.sortIndex==4){ - $this.assess.content=con; - //转化文本为json内容 - $this.loadAssessInfo(); - } - }) - } + this.changeContents(); } }, methods:{ init(){ this.activeName='courseware'; + this.curCFile={},//当前课件的内容 this.cware.content={id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''}; this.cware.show=1; this.homework.content={id:'',contentType:60,sortIndex:2}; @@ -715,6 +684,49 @@ this.assess.show=1; this.hasCWare.keyword=''; this.hasCWare.list=[]; + this.changeContents(); + }, + changeContents(){ + if(this.contents.length>0){ + let $this=this; + this.contents.forEach(con=>{ + if(con.sortIndex==1){ + $this.cware.content=con; + $this.cware.show=2; + //对于pdf文件的问题处理 + if(con.contentType==40){ + //console.log('加载pdf文件内容'); + $this.loadPdfFile(); + } + if(con.contentType==52){ + if(con.content.startsWith('\{')){ + $this.cware.linkInfo=JSON.parse(con.content); + }else{ + $this.cware.linkInfo.url=con.content; + } + } + if(con.contentType==10 || con.contentType==20){ + if(con.content.startsWith('\{')){ + $this.cware.curriculumData=JSON.parse(con.content); + }else{ + $this.cware.curriculumData.url=con.content; + } + } + }else if(con.sortIndex==2){ + $this.homework.content=con; + //查询作业信息,并显示 + $this.loadHomeworkInfo(); + }else if(con.sortIndex==3){ + $this.exam.content=con; + //查询考试信息并显示 + $this.loadExamInfo(); + }else if(con.sortIndex==4){ + $this.assess.content=con; + //转化文本为json内容 + $this.loadAssessInfo(); + } + }) + } }, loadPdfFile(){ //检查当前是否是pdf,如果是pdf那么就不需要再查询一次了 @@ -725,6 +737,7 @@ }else{ apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{ if(rs.status==200){ + this.curCFile=rs.result; this.converStatus = rs.result.converStatus; this.courseFileShow = false; this.cware.content.pdfPath=rs.result.previewFilePath; @@ -947,10 +960,6 @@ } }) }, - // 调用pdf详情接口 - getPPtDetail(){ - this.loadPdfFile(); - }, deleteContent(index){ let $this=this; let postData={