This commit is contained in:
LAPTOP-S9RBPPM6\bjxask-2201
2022-06-01 17:04:47 +08:00
parent 08d2a1aa22
commit 8d4a65d1b2
4 changed files with 37 additions and 5 deletions

View File

@@ -175,6 +175,8 @@
</audio> -->
</div>
<div v-if="contentData.contentType == 40">
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2">文档未转化完成 </div>
<div style="padding: 10px;color: #767676;color: #ff0000;" v-if="converStatus == 3">您上传的文档转化失败请联系管理员</div>
<pdfPreview :filePath="fileBaseUrl+contentData.content"></pdfPreview>
</div>
<div v-if="contentData.contentType == 41">
@@ -269,6 +271,7 @@ import videoPlayer from '@/components/VideoPlayer/index.vue';
import audioPlayer from '@/components/AudioPlayer/index.vue';
import { mapGetters,mapActions} from 'vuex';
import hyperLink from '@/components/Course/hyperLink.vue';
import apiCourseFile from '../../api/modules/courseFile.js';
export default {
name:"auditCourse2",
components: {
@@ -307,6 +310,7 @@ export default {
},
data() {
return {
converStatus:4,
curriculumData:{
url:'',
isDrag:false,
@@ -638,6 +642,18 @@ export default {
}else{
this.curriculumData.url = r.content
}
} else if(r.contentType == 40) {
if (r.content != '' && r.content.indexOf('.pdf') == -1) {
apiCourseFile.detail(r.contentRefId).then(cfrs => {
if (cfrs.status == 200) {
this.converStatus = cfrs.result.converStatus;
this.contentData.content = cfrs.result.previewFilePath;
//console.log(r.content);
} else {
$this.$message.error('加载pdf课件文件失败');
}
});
}
}
this.type = 0;
},