修改提示问题

This commit is contained in:
daihh
2022-06-02 21:26:41 +08:00
parent cae843fab1
commit 079631d13f
4 changed files with 40 additions and 26 deletions

View File

@@ -78,10 +78,10 @@
<img :src="fileBaseUrl+coursewareInfo.content.content" alt="图片">
</div>
<div v-if="coursewareInfo.content.contentType == 40">
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2">
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2 && !coursewareInfo.content.content">
<div>此课程内容无法预览请联系管理员</div>
</div>
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus == 3">
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus == 3 && !coursewareInfo.content.content">
此课程内容无法预览请联系管理员
</div>
<pdfPreview :autoScroll="true" v-if="coursewareInfo.content.contentType == 40" :filePath="fileBaseUrl+coursewareInfo.content.content"></pdfPreview>
@@ -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{

View File

@@ -83,10 +83,10 @@
</div>
</div>
<div v-if="resType == 40">
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2">
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2 && !contentData.content">
<div>此课程内容无法预览请联系管理员</div>
</div>
<div style="padding: 10px;color: #ed0000;" v-if="curCFile.converStatus == 3">
<div style="padding: 10px;color: #ed0000;" v-if="curCFile.converStatus == 3 && !contentData.content">
此课程内容无法预览请联系管理员
</div>
<pdfPreview :autoScroll="true" v-if="resType == 40" :filePath="fileBaseUrl + contentData.content"></pdfPreview>
@@ -160,7 +160,7 @@
<el-collapse-item v-for="(item, index) in catalogTree" :key="index" :name="index">
<!-- <template class="collapse-title" slot="title" > -->
<div style="display:flex;margin-bottom:18px;">
<!-- 标题 -->
<div style="flex:1;line-height:20px" class="mltit">
@@ -168,16 +168,16 @@
<span style="font-size:16px;font-weight: 700;color: #343434;margin-left: 15px;">
{{ item.section.name }}</span>
</el-tooltip>
</div>
<!-- 状态 -->
<div style="text-align: right;">
<span :class="statusToContent(item.section.status).class">{{ statusToContent(item.section.status).text }}</span>
</div>
</div>
<!-- </template> -->
<ul>
<li @click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i" class="catalog-cell" style="display: flex;justify-content: space-between;">
@@ -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 {
<style scoped lang="scss">
.mltit{
// width: 70%;
// width: ;
word-break:break-all;