diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index 7f9135b9..685784ab 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -594,19 +594,23 @@ export default { } 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 { + // 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; + if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { + $this.coursewareInfo.content.content = cfrs.result.filePath; + } else { + $this.curCFile=cfrs.result; + $this.converStatus = cfrs.result.converStatus; + } } 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 9c79582d..7eb77481 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -650,21 +650,25 @@ export default { } } else if(r.contentType == 40) { this.contentData.content=""; - if (r.content != '' && r.content.indexOf('.pdf') > -1) { - this.contentData.content = cfrs.result.previewFilePath; - }else{ + // 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; + if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { + this.contentData.content = cfrs.result.filePath; + } else { + this.converStatus = cfrs.result.converStatus; + this.curCFile=cfrs.result; + } //console.log(r.content); }else { this.contentData.content=""; this.$message.error('加载pdf课件文件失败'); } }); - } + // } } this.type = 0; }, diff --git a/src/components/Course/weikeContent.vue b/src/components/Course/weikeContent.vue index 530175cf..bde41fe9 100644 --- a/src/components/Course/weikeContent.vue +++ b/src/components/Course/weikeContent.vue @@ -738,12 +738,17 @@ }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; this.cware.content.content=rs.result.previewFilePath; + if(rs.result.previewFilePath == '' && rs.result.filePath.indexOf('pdf') > -1) { this.$forceUpdate(); + this.cware.content.pdfPath = rs.result.filePath; + } else { + this.curCFile=rs.result; + this.converStatus = rs.result.converStatus; + } + this.$forceUpdate(); } }); } @@ -823,6 +828,9 @@ this.cware.content.duration=row.duration;//时长 this.cware.findShow=false; if(this.cware.content.contentType==40){ + if(row.filePath.indexOf('.pdf')==-1){ + this.cware.content.content=row.previewFilePath; + } this.loadPdfFile(); } this.saveContent(1); diff --git a/src/views/portal/course/Micro.vue b/src/views/portal/course/Micro.vue index 56e94cf6..5d367940 100644 --- a/src/views/portal/course/Micro.vue +++ b/src/views/portal/course/Micro.vue @@ -1,3 +1,4 @@ +<<<<<<< HEAD