mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-18 07:16:44 +08:00
Merge remote-tracking branch 'origin/bjy' into case
# Conflicts: # src/components/Course/collectItem.vue # src/components/Course/weikeContent.vue
This commit is contained in:
@@ -95,6 +95,13 @@ const findAll=function(query){
|
|||||||
const queryAll=function(query){
|
const queryAll=function(query){
|
||||||
return ajax.post('/xboe/m/favorite/queryAll',query);
|
return ajax.post('/xboe/m/favorite/queryAll',query);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查看是否已收藏 批量
|
||||||
|
* @param {问答或者文章或者课程的id数组} data
|
||||||
|
* */
|
||||||
|
const isNoFavorite=function(date){
|
||||||
|
return ajax.postJson('/xboe/m/favorite/isNoFavorite',data);
|
||||||
|
}
|
||||||
|
|
||||||
export default{
|
export default{
|
||||||
has,
|
has,
|
||||||
@@ -107,5 +114,6 @@ export default{
|
|||||||
articlePageList,
|
articlePageList,
|
||||||
coursePageList,
|
coursePageList,
|
||||||
findAll,
|
findAll,
|
||||||
queryAll
|
queryAll,
|
||||||
|
isNoFavorite
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,49 @@ const updateIsRead=function(id){
|
|||||||
const deleteshares=function(id){
|
const deleteshares=function(id){
|
||||||
return ajax.get(`/xboe/m/share/delete-shares?id=${id}`);
|
return ajax.get(`/xboe/m/share/delete-shares?id=${id}`);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 我分享的全部
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* */
|
||||||
|
const findMeShare=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/findMeShare',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分享给我的全部
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* */
|
||||||
|
const findShareMe=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/findShareMe',query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我分享的案例
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* */
|
||||||
|
const myCaseList=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/myCaseList',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分享给我的案例
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* */
|
||||||
|
const myMeCaseList=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/myMeCaseList',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* */
|
||||||
export default{
|
export default{
|
||||||
save,
|
save,
|
||||||
has,
|
has,
|
||||||
@@ -134,5 +177,9 @@ const deleteshares=function(id){
|
|||||||
mymecourselist,
|
mymecourselist,
|
||||||
mymearticlelist,
|
mymearticlelist,
|
||||||
updateIsRead,
|
updateIsRead,
|
||||||
deleteshares
|
deleteshares,
|
||||||
|
findMeShare,
|
||||||
|
findShareMe,
|
||||||
|
myCaseList,
|
||||||
|
myMeCaseList
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,14 +134,15 @@ export default {
|
|||||||
.readed{
|
.readed{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #3e7fff;
|
color: #3e7fff;
|
||||||
margin-bottom: 6px;
|
// margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
.noRead{
|
.noRead{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color:#FF3E3E;
|
color:#FF3E3E;
|
||||||
margin-bottom: 6px;
|
// margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
|
line-height: 25px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
flex-shrink: 10000;
|
flex-shrink: 10000;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
.one-line-ellipsis{
|
.one-line-ellipsis{
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
white-space:pre-wrap;
|
white-space:pre-wrap;
|
||||||
word-wrap: break-word;
|
// word-wrap: break-word;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
|
|||||||
@@ -36,11 +36,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<!-- <div style="text-align: center;padding-top: 20px;"> -->
|
|
||||||
<!-- <el-button v-if="cware.content.id==''" @click="saveContent(1)" type="primary">保存</el-button> -->
|
|
||||||
<!-- <el-button @click="deleteContent(1)" type="danger">删除</el-button> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!--展示内容区域-->
|
<!--展示内容区域-->
|
||||||
<!--视频-->
|
<!--视频-->
|
||||||
<div v-if="cware.content.contentType==10">
|
<div v-if="cware.content.contentType==10">
|
||||||
@@ -103,9 +101,16 @@
|
|||||||
<el-image :src="fileBaseUrl+cware.content.content" fit="fill"></el-image>
|
<el-image :src="fileBaseUrl+cware.content.content" fit="fill"></el-image>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="cware.content.contentType==40">
|
<div v-if="cware.content.contentType==40">
|
||||||
<div style="padding: 10px;color: #767676; ">如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成,您可以先提交课程内容 </div>
|
<div style="text-align: center;padding-top: 20px;" v-if="courseFileShow">
|
||||||
|
<div style="padding: 20px;">{{cware.content.contentName}}</div>
|
||||||
|
<el-button @click="loadPdfFile();" type="primary">保存</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div style="padding: 10px;color: #767676; ">如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成 </div>
|
||||||
<pdfPreview v-if="cware.content.contentType == 40" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
|
<pdfPreview v-if="cware.content.contentType == 40" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -548,6 +553,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
courseFileShow:false,
|
||||||
curContent:{id:'',contentType:0,contenRefId:''},
|
curContent:{id:'',contentType:0,contenRefId:''},
|
||||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
imageShowUrl: '',
|
imageShowUrl: '',
|
||||||
@@ -580,7 +586,6 @@
|
|||||||
setupTage:0,
|
setupTage:0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfTip:'',//pdf文件的提示
|
|
||||||
hasCWare:{ keyword:'', count: 0, pageSize: 10, pageIndex: 1, list:[]},
|
hasCWare:{ keyword:'', count: 0, pageSize: 10, pageIndex: 1, list:[]},
|
||||||
homework:{
|
homework:{
|
||||||
show:1,
|
show:1,
|
||||||
@@ -693,7 +698,6 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
init(){
|
init(){
|
||||||
//console.log('初始化处理');
|
|
||||||
this.activeName='courseware';
|
this.activeName='courseware';
|
||||||
this.cware.content={id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''};
|
this.cware.content={id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''};
|
||||||
this.cware.show=1;
|
this.cware.show=1;
|
||||||
@@ -716,9 +720,11 @@
|
|||||||
let fname=this.cware.content.content;
|
let fname=this.cware.content.content;
|
||||||
if(fname && fname.indexOf('.pdf')>-1){
|
if(fname && fname.indexOf('.pdf')>-1){
|
||||||
this.cware.content.pdfPath=this.cware.content.content;
|
this.cware.content.pdfPath=this.cware.content.content;
|
||||||
|
this.courseFileShow = false;
|
||||||
}else{
|
}else{
|
||||||
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
|
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
|
this.courseFileShow = false;
|
||||||
this.cware.content.pdfPath=rs.result.previewFilePath;
|
this.cware.content.pdfPath=rs.result.previewFilePath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -756,7 +762,6 @@
|
|||||||
},
|
},
|
||||||
loadAssessInfo(){
|
loadAssessInfo(){
|
||||||
if(this.assess.content && this.assess.content.content!='' && this.assess.content.content.length>10){
|
if(this.assess.content && this.assess.content.content!='' && this.assess.content.content.length>10){
|
||||||
//console.log(this.assess.content.content,'this.assess.content.content');
|
|
||||||
this.assess.json=JSON.parse(this.assess.content.content);
|
this.assess.json=JSON.parse(this.assess.content.content);
|
||||||
this.assess.show=2;
|
this.assess.show=2;
|
||||||
}
|
}
|
||||||
@@ -802,7 +807,6 @@
|
|||||||
if(this.cware.content.contentType==40){
|
if(this.cware.content.contentType==40){
|
||||||
this.loadPdfFile();
|
this.loadPdfFile();
|
||||||
}
|
}
|
||||||
//console.log(this.cware.content,'this.cware.content');
|
|
||||||
this.saveContent(1);
|
this.saveContent(1);
|
||||||
},
|
},
|
||||||
toCWareReChoose(){
|
toCWareReChoose(){
|
||||||
@@ -940,6 +944,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 调用pdf详情接口
|
||||||
|
getPPtDetail(){
|
||||||
|
this.loadPdfFile();
|
||||||
|
},
|
||||||
deleteContent(index){
|
deleteContent(index){
|
||||||
let $this=this;
|
let $this=this;
|
||||||
let postData={
|
let postData={
|
||||||
@@ -1032,7 +1040,6 @@
|
|||||||
handleUploadSuccess({error,result,status}){
|
handleUploadSuccess({error,result,status}){
|
||||||
if(status === 200) {
|
if(status === 200) {
|
||||||
//上传到课件库
|
//上传到课件库
|
||||||
//console.log(result);
|
|
||||||
let courseWare={
|
let courseWare={
|
||||||
fileName:result.displayName,
|
fileName:result.displayName,
|
||||||
fileType:result.fileType,
|
fileType:result.fileType,
|
||||||
@@ -1042,13 +1049,17 @@
|
|||||||
}
|
}
|
||||||
apiCourseFile.saveUpload(courseWare).then(rs=>{
|
apiCourseFile.saveUpload(courseWare).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
|
this.courseFileShow = true;
|
||||||
this.cware.content.contentRefId=rs.result.id;
|
this.cware.content.contentRefId=rs.result.id;
|
||||||
this.cware.content.contentName=result.displayName;
|
this.cware.content.contentName=result.displayName;
|
||||||
|
|
||||||
//this.cware.content.content=result.filePath;
|
//this.cware.content.content=result.filePath;
|
||||||
|
if(rs.result.resType === 40 && rs.result.resType != 'ppt') {
|
||||||
|
this.cware.curriculumData.url = rs.result.previewFilePath;
|
||||||
|
}
|
||||||
this.cware.curriculumData.url = rs.result.filePath;
|
this.cware.curriculumData.url = rs.result.filePath;
|
||||||
this.cware.content.duration=rs.result.duration;//时长
|
this.cware.content.duration=rs.result.duration;//时长
|
||||||
|
this.courseFileShow=true;
|
||||||
this.saveContent(1);
|
this.saveContent(1);
|
||||||
}else{
|
}else{
|
||||||
this.$message.error('上传课件失败');
|
this.$message.error('上传课件失败');
|
||||||
|
|||||||
@@ -238,21 +238,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkHas(){
|
checkHas(){
|
||||||
if(this.type>0){
|
if(this.type>0 && !this.readonly && this.data.id){
|
||||||
apiPraises.has(this.type,this.data.id).then(rs=>{
|
if(this.favorites){
|
||||||
if(rs.status==200 && rs.result){
|
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isPraise=true;
|
if(rs.status==200 && rs.result){
|
||||||
}else{
|
this.isFavorite=true;
|
||||||
this.isPraise=false;
|
}else{
|
||||||
}
|
this.isFavorite=false;
|
||||||
});
|
}
|
||||||
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
})
|
||||||
if(rs.status==200 && rs.result){
|
}
|
||||||
this.isFavorite=true;
|
if(this.praises){
|
||||||
}else{
|
apiPraises.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isFavorite=false;
|
if(rs.status==200 && rs.result){
|
||||||
}
|
this.isPraise=true;
|
||||||
})
|
}else{
|
||||||
|
this.isPraise=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addShare(){
|
addShare(){
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ export default {
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
span:first-of-type{
|
span:first-of-type{
|
||||||
margin-top: -2px;
|
// margin-top: -2px;
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 0px 5px;"><el-input clearable placeholder="搜索名称" v-model="pageData.keyword"></el-input></div>
|
<div style="padding: 0px 5px;"><el-input clearable placeholder="搜索名称" v-model="pageData.keyword"></el-input></div>
|
||||||
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" type="primary" @click="getArticleList">搜索</el-button></div>
|
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" type="primary" @click="search">搜索</el-button></div>
|
||||||
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div>
|
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px 19px 0px 22px;">
|
<div style="padding: 10px 19px 0px 22px;">
|
||||||
<article-items @update="getArticleList" :items="pageData.list" v-if="pageData.list.length!=0"></article-items>
|
<article-items @update="getArticleList" :items="pageData.list" v-if="pageData.list.length!=0"></article-items>
|
||||||
<div v-if="pageData.list.length > 0 " style="text-align: center; margin-top:57px"><el-pagination
|
<div v-if="pageData.list.length > 0 " style="text-align: center; margin-top:57px"><el-pagination
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
background
|
background
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@@ -45,6 +45,13 @@
|
|||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="total"
|
:total="total"
|
||||||
></el-pagination></div>
|
></el-pagination></div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="pageData.list.length == 0">
|
||||||
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
|
<div v-else class="zan-wu">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="创建文章" :visible.sync="diagSync" :close-on-click-modal="false" width="900px" custom-class="g-dialog">
|
<el-dialog title="创建文章" :visible.sync="diagSync" :close-on-click-modal="false" width="900px" custom-class="g-dialog">
|
||||||
<editItems v-if="diagSync" :jumpLimit="false" :editForm="{}" @success="saveSuccess"></editItems>
|
<editItems v-if="diagSync" :jumpLimit="false" :editForm="{}" @success="saveSuccess"></editItems>
|
||||||
@@ -67,6 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isSearh:false,
|
||||||
pageData: {
|
pageData: {
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -81,7 +89,10 @@ export default {
|
|||||||
this.getArticleList();
|
this.getArticleList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
search(){
|
||||||
|
this.isSearh = true;
|
||||||
|
this.getArticleList()
|
||||||
|
},
|
||||||
saveSuccess(data){
|
saveSuccess(data){
|
||||||
this.diagSync=false;
|
this.diagSync=false;
|
||||||
this.articleList.pageIndex = 1;
|
this.articleList.pageIndex = 1;
|
||||||
@@ -116,9 +127,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
reset(){
|
reset(){
|
||||||
|
|
||||||
this.pageData.keyword = '',
|
this.pageData.keyword = '',
|
||||||
this.pageData.status = ''
|
this.pageData.status = ''
|
||||||
this.getArticleList()
|
this.getArticleList();
|
||||||
|
this.isSearh = false;
|
||||||
},
|
},
|
||||||
getQaUserData(list){
|
getQaUserData(list){
|
||||||
let ids=list.map((item,index)=>{
|
let ids=list.map((item,index)=>{
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.problem{
|
.problem{
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
border: 1px solid #e4e4e4;
|
border: 1px solid #e4e4e4;
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.problem{
|
.problem{
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
border: 1px solid #f0f0f0;
|
border: 1px solid #f0f0f0;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<div style="min-height: 500px;">
|
<div style="min-height: 500px;">
|
||||||
<course-items :keyword="keyword" type="toMy" @confirm="confirm" :items="courseList.list"></course-items>
|
<course-items :keyword="keyword" type="toMy" @confirm="confirm" :items="courseList.list"></course-items>
|
||||||
<!-- v-if="courseList.count>courseList.pageSize" -->
|
<!-- v-if="courseList.count>courseList.pageSize" -->
|
||||||
<div v-if="caseList.list.length > 0" style="text-align: center; margin-top:57px">
|
<div v-if="courseList.list.length > 0" style="text-align: center; margin-top:57px">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="caseList.list.length == 0">
|
<div v-if="courseList.list.length == 0">
|
||||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
<div v-else class="zan-wu">暂无数据</div>
|
<div v-else class="zan-wu">暂无数据</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user