Merge branch 'dev'

# Conflicts:
#	src/components/Course/auditCourse2.vue
This commit is contained in:
daihh
2022-06-03 11:23:58 +08:00
6 changed files with 57 additions and 66 deletions

View File

@@ -162,11 +162,11 @@
</audio> -->
</div>
<div v-if="coursewareInfo.content.contentType == 40">
<div style="padding: 10px;color: #767676;text-align: center;line-height: 40px; " v-if="converStatus < 2">
<div style="padding: 10px;color: #767676;text-align: center;line-height: 40px; " v-if="converStatus < 2 && !coursewareInfo.content.content">
<div>文档文件转化中还未转化完成</div>
<div >上传时间{{curCFile.sysCreateTime}}</div>
</div>
<div style="padding: 10px;color: #767676;color: #ff0000;text-align: center;" v-if="converStatus == 3">
<div style="padding: 10px;color: #767676;color: #ff0000;text-align: center;" v-if="converStatus == 3 && !coursewareInfo.content.content">
文件转化失败请重新上传不要上传加密的文件或联系管理员
</div>
<pdfPreview :filePath="fileBaseUrl+coursewareInfo.content.content"></pdfPreview>
@@ -593,24 +593,25 @@ 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 {
apiCourseFile.detail(con.contentRefId).then(cfrs => {
if (cfrs.status == 200) {
$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;
$this.curCFile=cfrs.result;
$this.converStatus = cfrs.result.converStatus;
//以下是为了兼容老数据
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('.pdf') > -1) {
$this.coursewareInfo.content.content = cfrs.result.filePath;
}
//设置状态值
if($this.coursewareInfo.content.content && $this.coursewareInfo.content.content.indexOf('.pdf') > -1){
if(!cfrs.result.converStatus || cfrs.result.converStatus<2){
$this.converStatus=2;//转化完成
}
}
} else {
$this.$message.error('加载pdf课件文件失败');
}
});
// }
}
} else if (con.sortIndex == 2) {
$this.homeworkInfo = con;