From 945e7de0b3c4a0e3f7f286731d95afeb44d20aa6 Mon Sep 17 00:00:00 2001
From: "LAPTOP-S9RBPPM6\\bjxask-2201" <752743406@qq.com>
Date: Tue, 31 May 2022 18:41:22 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Course/weikeContent.vue | 30 ++++++++++++++++++--------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/components/Course/weikeContent.vue b/src/components/Course/weikeContent.vue
index 387c19ae..6608706a 100644
--- a/src/components/Course/weikeContent.vue
+++ b/src/components/Course/weikeContent.vue
@@ -36,11 +36,9 @@
+
-
-
-
-
+
@@ -103,9 +101,16 @@
+
+
{{cware.content.contentName}}
+
保存
+
+
如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成
+
+
@@ -548,6 +553,7 @@
},
data(){
return {
+ courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
imageShowUrl: '',
@@ -692,7 +698,6 @@
},
methods:{
init(){
- //console.log('初始化处理');
this.activeName='courseware';
this.cware.content={id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''};
this.cware.show=1;
@@ -715,9 +720,11 @@
let fname=this.cware.content.content;
if(fname && fname.indexOf('.pdf')>-1){
this.cware.content.pdfPath=this.cware.content.content;
+ this.courseFileShow = false;
}else{
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
if(rs.status==200){
+ this.courseFileShow = false;
this.cware.content.pdfPath=rs.result.previewFilePath;
}
});
@@ -755,7 +762,6 @@
},
loadAssessInfo(){
if(this.assess.content && this.assess.content.content!='' && this.assess.content.content.length>10){
- //console.log(this.assess.content.content,'this.assess.content.content');
this.assess.json=JSON.parse(this.assess.content.content);
this.assess.show=2;
}
@@ -801,7 +807,6 @@
if(this.cware.content.contentType==40){
this.loadPdfFile();
}
- //console.log(this.cware.content,'this.cware.content');
this.saveContent(1);
},
toCWareReChoose(){
@@ -939,6 +944,10 @@
}
})
},
+ // 调用pdf详情接口
+ getPPtDetail(){
+ this.loadPdfFile();
+ },
deleteContent(index){
let $this=this;
let postData={
@@ -1031,7 +1040,6 @@
handleUploadSuccess({error,result,status}){
if(status === 200) {
//上传到课件库
- //console.log(result);
let courseWare={
fileName:result.displayName,
fileType:result.fileType,
@@ -1041,13 +1049,17 @@
}
apiCourseFile.saveUpload(courseWare).then(rs=>{
if(rs.status==200){
+ this.courseFileShow = true;
this.cware.content.contentRefId=rs.result.id;
this.cware.content.contentName=result.displayName;
//this.cware.content.content=result.filePath;
-
+ if(rs.result.resType === 40 && rs.result.resType != 'ppt') {
+ this.cware.curriculumData.url = rs.result.previewFilePath;
+ }
this.cware.curriculumData.url = rs.result.filePath;
this.cware.content.duration=rs.result.duration;//时长
+ this.courseFileShow=true;
this.saveContent(1);
}else{
this.$message.error('上传课件失败');