pdf提示

This commit is contained in:
LAPTOP-S9RBPPM6\bjxask-2201
2022-06-01 16:28:39 +08:00
parent eee0946aca
commit 08d2a1aa22
2 changed files with 11 additions and 9 deletions

View File

@@ -106,10 +106,10 @@
<el-button @click="loadPdfFile();" type="primary">保存</el-button>
</div>
<div v-else>
<div style="padding: 10px;color: #767676; ">如果pdf无法显示请稍后再试文档转化是异步处理有可能是文档未转化完成 </div>
<pdfPreview v-if="cware.content.contentType == 40" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2">文档未转化完成 </div>
<div style="padding: 10px;color: #767676; " v-if="converStatus == 3">您上传的文档转化失败请联系管理员</div>
<pdfPreview v-if="cware.content.contentType == 40 && cware.content.pdfPath!=''" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
</div>
</div>
</div>
@@ -553,6 +553,7 @@
},
data(){
return {
converStatus:4,
courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
@@ -724,8 +725,10 @@
}else{
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
if(rs.status==200){
this.converStatus = rs.result.converStatus;
this.courseFileShow = false;
this.cware.content.pdfPath=rs.result.previewFilePath;
this.$forceUpdate();
}
});
}
@@ -1032,7 +1035,7 @@
}else if(ctype==30){
return ["jpg","png","gif"]
}else if(ctype==40){
return ["doc", "xls", "ppt","docx", "xlsx", "pptx"]
return ["doc", "xls", "ppt","docx", "xlsx", "pptx","pdf"]
}else{
return ["doc", "xls", "ppt","docx", "xlsx", "pptx","jpg","png","gif","mp3","mp4"]
}