From 079631d13fbda427942fef3e85550c9f009e7840 Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 2 Jun 2022 21:26:41 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/auditCourse1.vue | 19 +++++++++++------- src/components/Course/auditCourse2.vue | 14 ++++++++----- src/views/portal/course/Micro.vue | 6 ++++-- src/views/study/PortalIndex.vue | 27 ++++++++++++++------------ 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index 685784ab..5e2070d4 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -162,11 +162,11 @@ -->
-
+
文档文件转化中,还未转化完成,
上传时间:{{curCFile.sysCreateTime}}
-
+
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
@@ -600,11 +600,16 @@ export default { 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课件文件失败'); diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue index 7eb77481..876227b8 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -175,11 +175,11 @@ -->
-
+
文档文件转化中,还未转化完成,
上传时间:{{curCFile.sysCreateTime}}
-
+
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
@@ -656,11 +656,15 @@ export default { apiCourseFile.detail(r.contentRefId).then(cfrs => { if (cfrs.status == 200) { this.contentData.content = cfrs.result.previewFilePath; + this.converStatus = cfrs.result.converStatus; + this.curCFile=cfrs.result; if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { this.contentData.content = cfrs.result.filePath; - } else { - this.converStatus = cfrs.result.converStatus; - this.curCFile=cfrs.result; + } + if(this.contentData.content && this.contentData.content.indexOf('pdf') > -1){ + if(this.converStatus || this.converStatus<2){ + this.converStatus=2; + } } //console.log(r.content); }else { diff --git a/src/views/portal/course/Micro.vue b/src/views/portal/course/Micro.vue index 52104b03..5a9e7b35 100644 --- a/src/views/portal/course/Micro.vue +++ b/src/views/portal/course/Micro.vue @@ -78,10 +78,10 @@ 图片
-
+
此课程内容无法预览,请联系管理员
-
+
此课程内容无法预览,请联系管理员
@@ -450,8 +450,10 @@ export default { $this.curCFile = cfrs.result; if(cfrs.result.previewFilePath){ $this.coursewareInfo.content.content=cfrs.result.previewFilePath; + $this.curCFile=2; }else if(cfrs.result.filePath.indexOf('.pdf')>-1){ $this.coursewareInfo.content.content=cfrs.result.filePath; + $this.curCFile=2; } }else{ diff --git a/src/views/study/PortalIndex.vue b/src/views/study/PortalIndex.vue index e5941d4d..b2cfe924 100644 --- a/src/views/study/PortalIndex.vue +++ b/src/views/study/PortalIndex.vue @@ -83,10 +83,10 @@
-
+
此课程内容无法预览,请联系管理员
-
+
此课程内容无法预览,请联系管理员
@@ -160,7 +160,7 @@
- +
@@ -168,16 +168,16 @@ {{ item.section.name }} - +
{{ statusToContent(item.section.status).text }} - +
- - + +
  • @@ -821,11 +821,14 @@ export default { // if (r.content != '' && r.content.indexOf('.pdf') == -1) { apiCourseFile.detail(r.contentRefId).then(cfrs => { if (cfrs.status == 200) { - r.content = cfrs.result.previewFilePath; + r.content = cfrs.result.previewFilePath; + this.curCFile = cfrs.result; if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { - r.content = cfrs.result.filePath; - } else { - this.curCFile = cfrs.result; + r.content = cfrs.result.filePath; + this.curCFile.converStatus=2; + } + if(r.content && r.content.indexOf('.pdf')>-1){ + this.curCFile.converStatus=2; } } else { $this.$message.error('加载pdf课件文件失败'); @@ -1039,7 +1042,7 @@ export default { diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 59fa073e..b455a326 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -7,7 +7,7 @@
    首页
    课程
    - +
    案例
    文章
    问答
    diff --git a/src/views/portal/case/Detail.vue b/src/views/portal/case/Detail.vue index 9842651a..92d09315 100644 --- a/src/views/portal/case/Detail.vue +++ b/src/views/portal/case/Detail.vue @@ -6,7 +6,7 @@ 案例列表 案例详情 -
    +
    @@ -70,7 +70,7 @@ import { mapGetters } from 'vuex'; import portalHeader from '@/components/PortalHeader.vue'; import portalFooter from '@/components/PortalFooter.vue'; -import pdfPreview from '@/components/PdfPreview/index.vue'; +import pdfPreview from '@/components/PdfPreview/view.vue'; import interactBar from '@/components/Portal/interactBar.vue'; import comments from '@/components/Portal/comments.vue'; @@ -195,7 +195,7 @@ export default { .jianjie { margin: 15px 0; background-color: #fff; - padding: 20px 100px 10px 100px; + padding: 0px 2px 10px 2px; .content { padding: 10px 0; line-height: 25px;