mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
Merge branch 'dev'
# Conflicts: # src/components/Course/auditCourse2.vue
This commit is contained in:
@@ -26,14 +26,10 @@
|
||||
<span>{{item.name}}{{(item.orgInfo)}}</span> -->
|
||||
<!-- <el-tag v-if="status === 0" type="success">已发布</el-tag>
|
||||
<el-tag type="warning" v-else>未发布</el-tag> -->
|
||||
<span class="problem">
|
||||
|
||||
<span class="article-time">
|
||||
<span> 时间:{{item.sysCreateTime|sysCreateTimeFilter}}</span>
|
||||
</span>
|
||||
<span v-if="!item.enabled">
|
||||
已下架
|
||||
</span>
|
||||
|
||||
<span v-if="!item.enabled">已下架</span>
|
||||
</div>
|
||||
<div class="article-info-tools-btns" v-if="item.status == 9">
|
||||
<!-- <interactBar :data="item" :type="2" :shares="false" :views="false"></interactBar> -->
|
||||
@@ -312,8 +308,9 @@ width: 100%;
|
||||
color: #7b7b7b;
|
||||
margin-left:5px;
|
||||
}
|
||||
.problem{
|
||||
.article-time{
|
||||
margin-left: -5px;
|
||||
border:0px;
|
||||
span{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -162,11 +162,11 @@
|
||||
</audio> -->
|
||||
</div>
|
||||
<div v-if="coursewareInfo.content.contentType == 40">
|
||||
<div style="padding: 10px;color: #767676;text-align: center;line-height: 40px; " v-if="converStatus < 2">
|
||||
<div style="padding: 10px;color: #767676;text-align: center;line-height: 40px; " v-if="converStatus < 2 && !coursewareInfo.content.content">
|
||||
<div>文档文件转化中,还未转化完成,</div>
|
||||
<div >上传时间:{{curCFile.sysCreateTime}}</div>
|
||||
</div>
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;text-align: center;" v-if="converStatus == 3">
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;text-align: center;" v-if="converStatus == 3 && !coursewareInfo.content.content">
|
||||
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
|
||||
</div>
|
||||
<pdfPreview :filePath="fileBaseUrl+coursewareInfo.content.content"></pdfPreview>
|
||||
@@ -593,24 +593,25 @@ export default {
|
||||
}
|
||||
}
|
||||
if($this.coursewareInfo.content.contentType == 40) {
|
||||
//console.log(con.content,'con.content');
|
||||
// if(con.content != '' && con.content.indexOf('.pdf') > -1) {
|
||||
// $this.coursewareInfo.content.content = con.content;
|
||||
// }else {
|
||||
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课件文件失败');
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
} else if (con.sortIndex == 2) {
|
||||
$this.homeworkInfo = con;
|
||||
|
||||
@@ -175,11 +175,11 @@
|
||||
</audio> -->
|
||||
</div>
|
||||
<div v-if="contentData.contentType == 40">
|
||||
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2">
|
||||
<div style="padding: 10px;color: #767676; " v-if="converStatus < 2 && !contentData.content">
|
||||
<div>文档文件转化中,还未转化完成,</div>
|
||||
<div>上传时间:{{curCFile.sysCreateTime}}</div>
|
||||
</div>
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;" v-if="converStatus == 3">
|
||||
<div style="padding: 10px;color: #767676;color: #ff0000;" v-if="converStatus == 3 && !contentData.content">
|
||||
文件转化失败,请重新上传(不要上传加密的文件)或联系管理员
|
||||
</div>
|
||||
<pdfPreview v-if="contentData.content" :filePath="fileBaseUrl+contentData.content"></pdfPreview>
|
||||
@@ -654,11 +654,16 @@ export default {
|
||||
if (cfrs.status == 200) {
|
||||
this.curCFile=cfrs.result;
|
||||
this.contentData.content = cfrs.result.previewFilePath;
|
||||
this.converStatus = cfrs.result.converStatus;
|
||||
//下面是为了兼容老数据
|
||||
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
|
||||
this.contentData.content = cfrs.result.filePath;
|
||||
} else {
|
||||
this.converStatus = cfrs.result.converStatus;
|
||||
}
|
||||
//设置状态
|
||||
if(this.contentData.content && this.contentData.content.indexOf('pdf') > -1){
|
||||
if(!this.converStatus || this.converStatus<2){
|
||||
this.converStatus=2;
|
||||
}
|
||||
}
|
||||
//console.log(r.content);
|
||||
}else {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="course-author-left" >
|
||||
{{ course.authorInfo.name }}
|
||||
</div>
|
||||
<div style="flex:1; text-align: center; ">
|
||||
<div style="flex:1; text-align: center; ">
|
||||
<span class="study-num">{{ course.studys }}人学习</span>
|
||||
</div>
|
||||
<div style="padding-left:15px">
|
||||
@@ -108,9 +108,9 @@
|
||||
</div>
|
||||
<!-- 推荐案例 -->
|
||||
<!-- <div class="modules">
|
||||
|
||||
|
||||
<div class="modules-title">
|
||||
|
||||
|
||||
<span class="modules-text">推荐案例</span>
|
||||
<span class="quyer-tag">
|
||||
<a :class="caseList.orderType==1?'current':''" @click="changeCaseOrder(1)">最新</a>
|
||||
@@ -119,7 +119,7 @@
|
||||
<span class="more"><router-link to="/case">更多 ></router-link></span>
|
||||
</div>
|
||||
<el-row :gutter="15" class="modules-list">
|
||||
|
||||
|
||||
<el-col :span="12" v-for="ca in caseList.list" :key="ca.id">
|
||||
<el-card class="case-card" :body-style="{ padding: '16px' }">
|
||||
<div class="case-info-image-box" v-if="ca.coverUrl && ca.coverUrl.length > 0">
|
||||
@@ -368,37 +368,21 @@ export default {
|
||||
device:1,
|
||||
orderField: orderType == 1 ? '' : 'studys',
|
||||
orderAsc: false,
|
||||
// topOrder:true,
|
||||
topOrder:true,
|
||||
pageIndex: pageIndex
|
||||
};
|
||||
let isTopList = [];
|
||||
let data = [];
|
||||
this.courseList.list = [];
|
||||
|
||||
apiCoursePortal.pageList(course).then(res => {
|
||||
|
||||
if (res.status == 200 && res.result.list.length > 0) {
|
||||
|
||||
let courseIds = [];
|
||||
res.result.list.forEach(item => {
|
||||
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '' ,sex:null};
|
||||
courseIds.push(item.id);
|
||||
console.log(item.isTop)
|
||||
if(item.isTop) {
|
||||
isTopList.push(item);
|
||||
console.log(isTopList)
|
||||
|
||||
}else{
|
||||
data.push(item);
|
||||
// console.log(data)
|
||||
}
|
||||
});
|
||||
this.loadCouserTeacher(res.result.list, courseIds);
|
||||
this.courseList.list.push(...isTopList,...data);
|
||||
this.courseList.list=res.result.list;
|
||||
this.couname = res.result.list.name;
|
||||
|
||||
|
||||
|
||||
if (res.result.count - pageIndex * num < 8) {
|
||||
if(res.result.count - pageIndex * num < 8) {
|
||||
this.pageIndex = 0;
|
||||
}
|
||||
this.isNext = true;
|
||||
@@ -406,9 +390,9 @@ export default {
|
||||
} else {
|
||||
console.log('加载课程信息失败:' + res.error);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
// apiCourse.list({orderType,num,device:1}).then(res => {
|
||||
// if(res.status==200){
|
||||
@@ -552,7 +536,7 @@ export default {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.authorInfo.aid) {
|
||||
item.authorInfo = author;
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -952,7 +936,7 @@ export default {
|
||||
color: #343434;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
|
||||
|
||||
.article-info-time {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
<template>
|
||||
<div>
|
||||
<portal-header current="course" :goSearch="1"></portal-header>
|
||||
@@ -78,10 +77,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 +449,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{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user