mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -14,7 +14,10 @@ VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://192.168.0.10:8082/mobile'
|
||||
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL = 'http://192.168.0.10:9090/cdn/upload'
|
||||
VUE_APP_FILE_BASE_URL = 'http://localhost:9090/cdn/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = 'http://localhost:9090/cdn/upload'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='/pc/login'
|
||||
|
||||
26
.env.preview
Normal file
26
.env.preview
Normal file
@@ -0,0 +1,26 @@
|
||||
# 生产环境配置
|
||||
ENV = 'preview'
|
||||
|
||||
# 管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/systemapi'
|
||||
|
||||
# BOE管理系统/开发环境
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/preview'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
|
||||
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = '/upload'
|
||||
|
||||
# 虚拟目录的变量,结尾的/在vue.config.js中添加
|
||||
VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'
|
||||
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/systemapi'
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/production'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
|
||||
@@ -16,6 +16,9 @@ VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = '/upload'
|
||||
|
||||
# 虚拟目录的变量,结尾的/在vue.config.js中添加
|
||||
VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
|
||||
26
.env.testing
Normal file
26
.env.testing
Normal file
@@ -0,0 +1,26 @@
|
||||
# 生产环境配置
|
||||
ENV = 'testing'
|
||||
|
||||
# 管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/systemapi'
|
||||
|
||||
# BOE管理系统/开发环境
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com/testing'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u-pre.boe.com'
|
||||
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = '/upload'
|
||||
|
||||
# 虚拟目录的变量,结尾的/在vue.config.js中添加
|
||||
VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:testing": "vue-cli-service serve --mode testing",
|
||||
"serve:preview": "vue-cli-service serve --mode preview",
|
||||
"build": "vue-cli-service build",
|
||||
"build:development": "vue-cli-service build --mode development",
|
||||
"build:preview": "vue-cli-service build --mode preview",
|
||||
"build:testing": "vue-cli-service build --mode testing",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -280,6 +280,32 @@ const auditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定审核人,转审核人
|
||||
* @param {Object} data
|
||||
* {courseId:课程id,teacherId:课程的名称,teacherName:教师名称,remark:备注}
|
||||
*/
|
||||
const auditAppoint = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/appoint', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核信息
|
||||
* @param {courseId:'',teacherId:'可以不填写,系统会查询当前人'} data
|
||||
*/
|
||||
const getAuditInfo = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/infos', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核日志
|
||||
* @param {courseId:'',teacherId:'可以不填写,系统会查询当前人'} data
|
||||
*/
|
||||
const getAuditLogs = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/logs', data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 管理员的课程审核处理
|
||||
* @param {Object} query {id:课程id,title:课程的名称, Boolean pass 是否通过,remark 备注}
|
||||
@@ -337,19 +363,19 @@ const detailFew=function(id){
|
||||
const sumbits=function(id){
|
||||
return ajax.get('/xboe/m/course/manage/sumbits?id='+id);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
教师授课记录
|
||||
*/
|
||||
const teacherCourse=function(teacherId){
|
||||
return ajax.get('/xboe/m/course/manage/teacher-course?teacherId='+teacherId);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
教师授课记录导出
|
||||
@param teacherId 教师id
|
||||
*/
|
||||
const exportTeacherCourse=function(teacherId){
|
||||
return ajax.post('/xboe/m/course/manage/export-teacher-course?teacherId='+teacherId)
|
||||
}
|
||||
}
|
||||
/*
|
||||
*待审核课程记录导出
|
||||
* resOwner1:资源归属一级的id
|
||||
@@ -401,6 +427,9 @@ export default {
|
||||
getHomework,
|
||||
countWaitAudit,
|
||||
auditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
getAuditLogs,
|
||||
audit,
|
||||
auditAndPublish,
|
||||
getAssess,
|
||||
@@ -420,5 +449,5 @@ export default {
|
||||
exportCourseAudit,
|
||||
exportCourse,
|
||||
queryCrowd
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -285,7 +285,7 @@ export default {
|
||||
homeworkInfo: {},
|
||||
examInfo: {},
|
||||
assessInfo: {},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
btnLoading: false,
|
||||
curCFile:{},//课件内容
|
||||
coursewareInfo: {
|
||||
@@ -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课件文件失败');
|
||||
|
||||
@@ -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>
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
},
|
||||
contentDataShow:true,//预览页面和课程内容的切换
|
||||
isEdit: true,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
contentData: {},
|
||||
curCFile:{},//课件内容
|
||||
getType: getType,
|
||||
@@ -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 {
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
data(){
|
||||
return {
|
||||
converStatus:4,
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl:this.$Constants.fileBaseUrl,
|
||||
curPdfPath:'',
|
||||
curCFile:{},//当前课件的内容
|
||||
comTypes:[
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
courseFileShow:false,
|
||||
curContent:{id:'',contentType:0,contenRefId:''},
|
||||
curCFile:{},//当前课件的内容
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl:this.$Constants.fileBaseUrl,
|
||||
imageShowUrl: '',
|
||||
activeName: 'courseware',
|
||||
getType: getType,
|
||||
|
||||
197
src/components/PdfPreview/view.vue
Normal file
197
src/components/PdfPreview/view.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template><!--pdf连接分页处理-->
|
||||
<div class="pdf-perView" id="pdf-perView">
|
||||
<div class="pdf-box">
|
||||
<transition name="progress">
|
||||
<el-progress v-if="showProgress" :percentage="Math.floor(loadedRatio * 100)" :text-inside="true" :show-text="false"></el-progress>
|
||||
</transition>
|
||||
<pdf
|
||||
v-for="i in showPages"
|
||||
:key="i"
|
||||
:src="src"
|
||||
:page="i"
|
||||
@progress="loadedRatio = $event"
|
||||
@page-loaded="loadedPageHandle"
|
||||
@loaded="loadPdfHandle"
|
||||
style="display: inline-block; width:100%">
|
||||
<div>每行的间隔内容</div>
|
||||
</pdf>
|
||||
<!-- <pdf
|
||||
ref="pdf"
|
||||
:src="pdfUrl"
|
||||
:page="currentPage"
|
||||
@progress="loadedRatio = $event"
|
||||
@num-pages="pageCount = $event"
|
||||
@page-loaded="currentPage = $event"
|
||||
@loaded="loadPdfHandler"
|
||||
@link-clicked="currentPage = $event">
|
||||
</pdf> -->
|
||||
</div>
|
||||
<div class="pdf-footer">
|
||||
<!-- <el-button icon="el-icon-arrow-left" @click="prePage('footer')" :disabled="loadedRatio !== 1"></el-button>
|
||||
<span v-if="loadedRatio !== 1" style="margin:0 10px;">0 / 0</span>
|
||||
<span v-else style="margin:0 10px;">{{ currentPage }} / {{ pageCount }}</span>
|
||||
<el-button @click="nextPage('footer')" :disabled="loadedRatio !== 1" icon="el-icon-arrow-right"></el-button> -->
|
||||
<el-button type="primary" @click="clickMore()">加载更多</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script >
|
||||
import pdf from "vue-pdf";
|
||||
export default {
|
||||
components: { pdf },
|
||||
props: {
|
||||
filePath: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
scrollToID: {
|
||||
type: String,
|
||||
default: "pdf-perView",
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
src: "",
|
||||
showPages: undefined,
|
||||
totalPages:0,
|
||||
scale: 100, //放大系数
|
||||
loadedRatio:0,// 加载进度
|
||||
showProgress:true,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// /case/demo.pdf
|
||||
let pdfPath=this.$Constants.fileBaseUrl+'/case/demo.pdf';
|
||||
this.loadInitPdf(pdfPath);
|
||||
//this.initSrc(this.filePath);
|
||||
},
|
||||
watch:{
|
||||
filePath(newVal){
|
||||
//this.getNumPages(newVal);
|
||||
this.initSrc(newVal);
|
||||
},
|
||||
loadedRatio(newVal){
|
||||
// 直接使用loadedRatio控制进度条没有加载效果
|
||||
if(newVal == 1){
|
||||
let that = this;
|
||||
setTimeout(function(){
|
||||
that.showProgress = false;
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadProgress(e){
|
||||
console.log(e,'loadProgress');
|
||||
},
|
||||
loadedPageHandle(e){
|
||||
console.log(e,'loadedPageHandle');
|
||||
},
|
||||
loadPdfHandle(e){
|
||||
console.log(e,'loadPdfHandle');
|
||||
},
|
||||
clickMore(){
|
||||
if(this.totalPages>this.showPages){
|
||||
this.showPages++;
|
||||
}
|
||||
},
|
||||
//加载页面
|
||||
loadInitPdf(url) {
|
||||
if(url && url.indexOf('.pdf')>-1){
|
||||
let loadingTask = pdf.createLoadingTask(url);
|
||||
this.src=loadingTask;
|
||||
loadingTask.promise.then((pdf) =>{
|
||||
this.totalPages=pdf.numPages;
|
||||
if(pdf.numPages>3){
|
||||
this.showPages = 3;
|
||||
}else{
|
||||
this.showPages =pdf.numPages;
|
||||
}
|
||||
}).catch((err) =>{
|
||||
this.$message.error("加载内容失败,请联系管理员");
|
||||
});
|
||||
}
|
||||
},
|
||||
initSrc(url){
|
||||
if(url && url.indexOf('.pdf')>-1){
|
||||
//this.src = url;
|
||||
}
|
||||
},
|
||||
prePage(type) {
|
||||
if (this.currentPage > 1) {
|
||||
this.currentPage--;
|
||||
if(type === 'footer'){
|
||||
this.scrollTo();
|
||||
}
|
||||
}
|
||||
},
|
||||
nextPage(type) {
|
||||
if (this.currentPage < this.pageCount) {
|
||||
this.currentPage++;
|
||||
if(type === 'footer'){
|
||||
this.scrollTo();
|
||||
}
|
||||
}
|
||||
},
|
||||
scrollTo(){
|
||||
if(!this.autoScroll){
|
||||
return;
|
||||
}
|
||||
document.getElementById(this.scrollToID).scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
},
|
||||
//放大
|
||||
scaleD() {
|
||||
if (this.scale == 200) {
|
||||
return;
|
||||
}
|
||||
this.scale += 5;
|
||||
this.$refs.pdf.$el.style.width = parseInt(this.scale) + "%";
|
||||
},
|
||||
//缩小
|
||||
scaleX() {
|
||||
if (this.scale == 50) {
|
||||
return;
|
||||
}
|
||||
this.scale += -5;
|
||||
this.$refs.pdf.$el.style.width = parseInt(this.scale) + "%";
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pdf-perView {
|
||||
.pdf-box {
|
||||
min-height: 300px;
|
||||
width: 100%;
|
||||
//border: 1px solid #dfdfdf;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
>span{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.pdf-header,.pdf-footer {
|
||||
//border: 1px solid #dfdfdf;
|
||||
//background: #dfdfdf;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
}
|
||||
/* ------------------- 进度条 ------------------- */
|
||||
//类名:隐藏到显示过程所需要的时间
|
||||
.progress-leave-active{
|
||||
transition: opacity 2s;
|
||||
}
|
||||
.progress-leave-to{
|
||||
opacity: 0;
|
||||
}
|
||||
.el-progress .el-progress-bar .el-progress-bar__outer{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="portal-footer">
|
||||
<div class="portal-footer" :style="`background-image:url(${this.webBaseUrl}/images/bg_foot.png)`">
|
||||
<div class="center">
|
||||
<div class="center-img1" style="margin-left: 100px;"><img :src="`${this.webBaseUrl}/images/foot_center.png`"/> </div>
|
||||
<div class="center-img2"><img :src="`${this.webBaseUrl}/images/foot_code.png`"/> </div>
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
margin-top: 30px;
|
||||
box-sizing: border-box;
|
||||
height: 300px;
|
||||
background-image: url(/pc/images/bg_foot.png);
|
||||
//background-image: url(/pc/images/bg_foot.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size:cover;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div style="display: flex;justify-content: space-around;margin-left: 20px;">
|
||||
<div class="top-nav" :class="current == 'index' ? 'current-nav' : ''"><router-link to="/index">首页</router-link></div>
|
||||
<div class="top-nav" :class="current == 'course' ? 'current-nav' : ''"><router-link to="/course">课程</router-link></div>
|
||||
<!-- <div class="top-nav" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div> -->
|
||||
<div class="top-nav" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
|
||||
<div class="top-nav" :class="current == 'article' ? 'current-nav' : ''"><router-link to="/article">文章</router-link></div>
|
||||
<div class="top-nav" :class="current == 'qa' ? 'current-nav' : ''"><router-link to="/qa">问答</router-link></div>
|
||||
<div class="top-nav">
|
||||
|
||||
@@ -28,6 +28,7 @@ Vue.config.productionTip = false
|
||||
|
||||
Vue.prototype.$Constants = constants;
|
||||
|
||||
|
||||
Vue.prototype.msgSuccess = function(msg) {
|
||||
this.$message({ showClose: true, message: msg, type: "success", offset: 50 });
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/token'
|
||||
import { routers } from "@/data/pages"
|
||||
import watermark from './utils/warterMark.js'
|
||||
import constants from '@/utils/constants'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
@@ -13,14 +14,24 @@ const whiteList = ['/login','/logout','/loading','/pc/loading','/500','/auth-red
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
watermark.set("");
|
||||
//动态计算文件的路径
|
||||
let configPath=process.env.VUE_APP_FILE_RELATIVE_PATH;
|
||||
if(configPath.startsWith('http')){
|
||||
constants.fileBaseUrl=configPath;
|
||||
}else{
|
||||
constants.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath;
|
||||
}
|
||||
|
||||
|
||||
NProgress.start();
|
||||
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next()
|
||||
}else{
|
||||
if(getToken()){
|
||||
if(to.path === '/login'){
|
||||
next({ path: '/pc/index' })
|
||||
next({ path: process.env.VUE_APP_PUBLIC_PATH+'/index' })
|
||||
NProgress.done();
|
||||
} else {
|
||||
//后续这里需要增加一定的控制
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
/**页面设置的一些常量*/
|
||||
const constants={
|
||||
Cookies:{
|
||||
name:'login_name',
|
||||
password:'login_password',
|
||||
rememberMe:'login_rememberMe',
|
||||
}
|
||||
fileBaseUrl:'http://127.0.0.1/pc/cdn/upload'
|
||||
}
|
||||
|
||||
export default constants
|
||||
|
||||
@@ -207,8 +207,8 @@ export function testType(type) { //此方法移到tools中
|
||||
|
||||
/**
|
||||
* 头像文字
|
||||
* @param {*} text
|
||||
* @returns
|
||||
* @param {*} text
|
||||
* @returns
|
||||
*/
|
||||
export function userAvatarText(text){
|
||||
if(text){
|
||||
|
||||
@@ -293,7 +293,7 @@ import ad from '@/components/Portal/adFloat.vue';
|
||||
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import { toScore } from '@/utils/tools.js';
|
||||
import { toScore} from '@/utils/tools.js';
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
|
||||
@@ -331,6 +331,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
||||
this.getCourseData(1);
|
||||
this.getCaseData();
|
||||
this.getArticleData();
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//console.log(process.env,'process.env');
|
||||
this.refreshCode();
|
||||
if(this.portalLoginRememberMe && this.portalLoginRememberMe.rememberMe){
|
||||
this.rememberMe = true;
|
||||
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.problem{
|
||||
margin: 10px;
|
||||
border: 1px solid #e4e4e4;
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.problem{
|
||||
margin: 10px;
|
||||
border: 1px solid #f0f0f0;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-breadcrumb-item :to="{ path: '/case' }">案例列表</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>案例详情</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="xrow" style="display: flex;justify-content: space-between;">
|
||||
<div class="xrow" style="display: flex;justify-content: space-between;">
|
||||
<div style="flex: 1;">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
@@ -326,7 +325,7 @@ export default {
|
||||
tags: [],
|
||||
numberToLetter: numberToLetter,
|
||||
// resOwnerListMap: resOwnerIndexName,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
blobUrl:'',//播放的文件地址,新添加,采用blob方式
|
||||
getType: getType,
|
||||
courseType,
|
||||
@@ -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{
|
||||
@@ -501,13 +502,14 @@ export default {
|
||||
let ctime=parseInt(nowDate.getTime()/1000);
|
||||
let beforeUrl=parseInt(nowDate.getTime()/1000)+u;
|
||||
//console.log(beforeUrl,'beforeUrl');
|
||||
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||
//let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||
//console.log(urlSign,'urlSign');
|
||||
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
||||
//this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/play/resource?sign='+urlSign;
|
||||
//this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/course/resource?fid='+fid;
|
||||
//this.blobUrl='http://localhost:9090/xboe/course/resource?fid='+fid;
|
||||
this.blobUrl=this.fileBaseUrl+u;
|
||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/course/resource?fid='+fid;
|
||||
//this.blobUrl='http://127.0.0.1:9090/xboe/course/resource?fid='+fid;
|
||||
//this.blobUrl=this.fileBaseUrl+u;
|
||||
//console.log(this.blobUrl,'this.blobUrl');
|
||||
},
|
||||
createVideoBlob(url){
|
||||
let $this=this;
|
||||
|
||||
@@ -290,30 +290,15 @@ computed: {
|
||||
},
|
||||
jumpRouter(item) {
|
||||
if(item.isOld){
|
||||
|
||||
// this.$router.push({path:'/course/boeframe',query:{id:item.id,type:item.courseType}})
|
||||
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`
|
||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`,'_self' )
|
||||
} else {
|
||||
if(item.courseType==10){
|
||||
// let routeData = this.$router.resolve({ path: '/course/micro?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
// window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/micro?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/micro',query:{id:item.courseId}})
|
||||
}
|
||||
if(item.courseType==20){
|
||||
if(item.progress>0 && item.progress<100) {
|
||||
//let routeData = this.$router.resolve({ path: '/course/studyindex?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
//window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/studyindex?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
|
||||
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
|
||||
} else {
|
||||
//let routeData = this.$router.resolve({ path: '/course/detail?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
// window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/detail?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/detail',query:{id:item.courseId}})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;">
|
||||
@@ -286,7 +286,7 @@ export default {
|
||||
totalContent: 0, //课程内容数量
|
||||
pageCount: 0,
|
||||
currentPage: 0,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
contentList: [],
|
||||
sectionList: [],
|
||||
teachers: [],
|
||||
@@ -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;
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
<div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<!-- <a :href="item.type == 1 ? '/pc/course/recorded' : '/pc/course/micro'" target="_blank"> -->
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:150px; text-align: center; margin-top:57px;" >
|
||||
|
||||
@@ -114,7 +114,7 @@ module.exports = {
|
||||
proxy: {
|
||||
'/systemapi': {
|
||||
// 目标代理服务器地址
|
||||
target: 'http://192.168.0.10:9090',
|
||||
target: 'http://localhost:9090',
|
||||
changeOrigin: true,
|
||||
logLevel:'debug',
|
||||
secure: false,
|
||||
|
||||
Reference in New Issue
Block a user