diff --git a/src/components/Course/catalogCourseware.vue b/src/components/Course/catalogCourseware.vue
index 306a0902..aa12eb02 100644
--- a/src/components/Course/catalogCourseware.vue
+++ b/src/components/Course/catalogCourseware.vue
@@ -86,6 +86,8 @@
+
文档未转化完成
+
您上传的文档转化失败,请联系管理员
@@ -353,7 +355,7 @@
// inject: [ "informationDetails" ],
data(){
return {
- converStatus:0,
+ converStatus:4,
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
curPdfPath:'',
comTypes:[
@@ -489,21 +491,18 @@
},
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){
- this.converStatus = rs.result.converStatus;
+ this.converStatus = rs.result.converStatus;
if(rs.result.previewFilePath){
this.curPdfPath=rs.result.previewFilePath;
}else{
this.curPdfPath=rs.result.filePath;
}
- //console.log(this.curPdfPath,'this.curPdfPath');
}
});
}
diff --git a/src/components/Course/weikeContent.vue b/src/components/Course/weikeContent.vue
index 6608706a..44549ef6 100644
--- a/src/components/Course/weikeContent.vue
+++ b/src/components/Course/weikeContent.vue
@@ -106,10 +106,10 @@
保存
-
如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成
-
+
文档未转化完成
+
您上传的文档转化失败,请联系管理员
+
-
@@ -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"]
}