mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -17,32 +17,15 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uc-bpttom">
|
||||
<div class="uc-course-text"> <i class="el-icon-time"></i> 报名时间:{{ item.time || item.favoritesTime}}</div>
|
||||
<div class="uc-coures-button">
|
||||
<el-button type="primary">去上课</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pro-line"> <div>当前进度:</div> <div style="width:200px"><el-progress :percentage="item.progress"></el-progress></div></div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="uc-course-info">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<router-link target="_blank" :to="'/course/detail?id='+item.objId" class="uc-course-name">
|
||||
<span :class="contentTypeFilter(item.contentType).class">{{contentTypeFilter(item.contentType).text}}</span>
|
||||
<span>{{ item.title }}</span>
|
||||
</router-link>
|
||||
<div><el-button v-if="remove" @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button></div>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-between;align-items: flex-end;">
|
||||
<div>
|
||||
<div class="uc-course-text">讲师:{{item.authorName}}</div>
|
||||
<div class="uc-course-text">收藏日期:{{item.time}}</div>
|
||||
</div>
|
||||
<interactBar :type="0" :data="item" :views="false" :shares="false"></interactBar>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- </router-link> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -152,18 +135,28 @@ export default {
|
||||
color: #333333;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.pro-line{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
margin-top: 28px;
|
||||
}
|
||||
.uc-bpttom{
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.uc-coures-button{
|
||||
position: absolute;
|
||||
margin-left: auto;
|
||||
margin-top: 55px;
|
||||
right:0;
|
||||
bottom: -38px;
|
||||
}
|
||||
}
|
||||
.uc-course-text{
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
margin-top: 70px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
.course-type {
|
||||
position: absolute;
|
||||
|
||||
@@ -13,20 +13,18 @@
|
||||
<div style="width:254px">
|
||||
<course-image width="254px" height="144px" :course="item.info"></course-image>
|
||||
</div>
|
||||
|
||||
<!-- <img style="width:254px;height:144px" src="/images/list-img.png" alt=""> -->
|
||||
<div class="data-cen">
|
||||
<h6 class="course-tit portal-title-tow">{{item.info.name || item.contentInfo}} <span class="score-info">{{toScore(item.info.score)}}分</span> </h6>
|
||||
<h6 class="course-tit portal-title-tow">{{item.info.name || item.contentInfo}} <span class="score-info">{{toScore(item.info.lastScore)}}分</span> </h6>
|
||||
<p class="title-info">{{item.info.summary}}</p>
|
||||
<div class="pro-line"> <div>当前进度:</div> <div style="width:200px"><el-progress :percentage="50"></el-progress></div></div>
|
||||
<p class="portal-time">最新一次学习时间:{{item.eventTime}}</p>
|
||||
<div class="pro-line"> <div>当前进度:</div> <div style="width:200px"><el-progress :percentage="item.info.progress"></el-progress></div></div>
|
||||
<p class="portal-time">最新一次学习时间:{{item.info.lastTime}}</p>
|
||||
</div>
|
||||
<div style="width:150px">
|
||||
<div class="follow-hide pointer" style="text-align: right;" v-if="!isDynamic && personal && !item.hidden" @click="emitHide(item.id)">
|
||||
<svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏
|
||||
</div>
|
||||
<div class="btn-right">
|
||||
<el-button class="btn" type="primary" @click="jumpDetail(item.info)">{{pageId == userInfo.aid || isFollow? '继续学习' : '我也去学'}}</el-button>
|
||||
<div class="btn-right" v-if="!(personal && item.info.progress == 100)">
|
||||
<el-button class="btn" type="primary" @click="jumpDetail(item.info)">{{isFollow ? '我也去学':pageId == userInfo.aid? '继续学习' : '我也去学'}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
},
|
||||
watch:{
|
||||
'$route' (to, from) { //监听路由是否变化
|
||||
//console.log(from,'from')
|
||||
if(to.params.id != from.params.id){
|
||||
this.pageId = to.params.id;
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
@@ -189,8 +188,6 @@
|
||||
let ids = res.result.list.map(item=>item.contentId);
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
res.result.list.forEach(item=>{
|
||||
item.lastTime = '';
|
||||
item.progress = null;
|
||||
item.info = {};
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
@@ -207,7 +204,6 @@
|
||||
if(this.activeName == 1){
|
||||
this.cousrePageList = res.result.list
|
||||
this.getCourse(noReapetIds,res.result.list);
|
||||
this.getCourseProgress(noReapetIds,res.result.list);
|
||||
}
|
||||
if(this.activeName == 2) {
|
||||
this.articlePageList = res.result.list;
|
||||
@@ -305,21 +301,6 @@
|
||||
return val1 < val2 ? rev * -1 : rev * 1;
|
||||
};
|
||||
},
|
||||
getCourseProgress(ids,list) {
|
||||
apiCourseStudy.ids(ids).then((res)=>{
|
||||
console.log(res,'res');
|
||||
// list.forEach((item, index) => {
|
||||
// res.result.some(con => {
|
||||
// if (con.id == item.contentId) {
|
||||
// item.info = con;
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
})
|
||||
},
|
||||
getAnswer(ids,list){
|
||||
if(ids.length == 0){
|
||||
return
|
||||
@@ -465,11 +446,19 @@
|
||||
});
|
||||
},
|
||||
getCourse(ids,list) {
|
||||
apiCourse.ids(ids).then(res=>{
|
||||
let aid = {}
|
||||
let params = {
|
||||
ids:ids,
|
||||
// aid:[this.pageId]
|
||||
}
|
||||
if(this.pageId != this.userInfo.aid) {
|
||||
params.aid = this.pageId
|
||||
}
|
||||
apiCourseStudy.ids(params).then(res=>{
|
||||
if(res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(con => {
|
||||
if (con.id == item.contentId) {
|
||||
if (con.courseId == item.contentId) {
|
||||
item.info = con;
|
||||
return true;
|
||||
} else {
|
||||
@@ -477,7 +466,6 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
// this.getArticleUserData(list);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
import apiStat from "@/api/phase2/stat.js"
|
||||
import apiArticle from '@/api/modules/article.js'
|
||||
import apiCases from '@/api/modules/cases.js'
|
||||
import apiCourseStudy from '@/api/modules/courseStudy.js'
|
||||
import apiQa from '@/api/modules/qa.js'
|
||||
import apiCourse from '@/api/modules/course.js'
|
||||
import apiNote from '@/api/phase2/note.js'
|
||||
@@ -117,7 +118,7 @@
|
||||
personal:true,
|
||||
orgData:[],
|
||||
Profess:[],
|
||||
ids:[],
|
||||
followIds:[],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -126,7 +127,7 @@
|
||||
created() {
|
||||
apiFollow.list().then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.ids = res.result.map(item=>item.followId);
|
||||
this.followIds = res.result.map(item=>item.followId);
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
@@ -160,19 +161,21 @@
|
||||
this.page.pageIndex = val;
|
||||
this.getList();
|
||||
},
|
||||
getList(ids) {
|
||||
getList() {
|
||||
let data = {
|
||||
pageIndex:this.page.pageIndex,
|
||||
pageSize:this.page.pageSize,
|
||||
contentType:this.activeName == 0? '':this.activeName,//内容类型
|
||||
aids:this.ids // 数组
|
||||
aids:this.followIds // 数组
|
||||
}
|
||||
apiStat.userDynamicfollows(data).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.page.count = res.result.count;
|
||||
let ids = res.result.list.map(item=>item.contentId);
|
||||
let aids = [];
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
res.result.list.forEach(item=>{
|
||||
aids.push(item.aid);
|
||||
item.info = {};
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
@@ -187,7 +190,8 @@
|
||||
this.getAllList(res.result.list)
|
||||
}
|
||||
if(this.activeName == 1){
|
||||
this.cousrePageList = res.result.list
|
||||
const noReapetAids = [...new Set(aids)];
|
||||
this.cousrePageList = res.result.list;
|
||||
this.getCourse(noReapetIds,res.result.list);
|
||||
}
|
||||
if(this.activeName == 2) {
|
||||
@@ -197,7 +201,6 @@
|
||||
if(this.activeName == 3) {
|
||||
this.casePageList = res.result.list;
|
||||
this.getCase(noReapetIds,res.result.list);
|
||||
console.log(this.casePageList,'this.casePageList');
|
||||
}
|
||||
if(this.activeName == 6) { // 笔记
|
||||
this.getNote(noReapetIds,res.result.list);
|
||||
@@ -429,11 +432,15 @@
|
||||
});
|
||||
},
|
||||
getCourse(ids,list) {
|
||||
apiCourse.ids(ids).then(res=>{
|
||||
let params = {
|
||||
ids:ids,
|
||||
aids:this.followIds
|
||||
}
|
||||
apiCourseStudy.followIds(params).then(res=>{
|
||||
if(res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(con => {
|
||||
if (con.id == item.contentId) {
|
||||
if (item.contentId == con.courseId && item.aid == con.aid) {
|
||||
item.info = con;
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="exp-hear-text">
|
||||
经验值排行榜
|
||||
<el-tooltip placement="top" effect="light">
|
||||
<div slot="content">占位内容<br/>占位内容</div>
|
||||
<div slot="content">所有用户经验值TOP排行榜单,通过学习、贡献等行为可以获得经验值;</div>
|
||||
<svg-icon style="margin-left: 5px;font-size:20px;padding-top: 4px;" icon-class="doubt"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="exp-hear-textbor"></span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="exp-hear-text">
|
||||
经验值排行榜
|
||||
<el-tooltip placement="top" effect="light">
|
||||
<div slot="content">占位内容<br/>占位内容</div>
|
||||
<div slot="content">所有用户经验值TOP排行榜单,通过学习、贡献等行为可以获得经验值;</div>
|
||||
<svg-icon style="margin-left: 14px;font-size:20px;padding-top: 4px;" icon-class="doubt"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="exp-hear-textbor"></span>
|
||||
@@ -105,7 +105,7 @@
|
||||
<div class="exp-hear-text">
|
||||
学习时长排行榜
|
||||
<el-tooltip placement="top" effect="light">
|
||||
<div slot="content">占位内容<br/>占位内容</div>
|
||||
<div slot="content">所有用户学习时长TOP排行榜单,统计单位为小时;</div>
|
||||
<svg-icon style="margin-left: 14px;font-size:20px;padding-top: 4px;" icon-class="doubt"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="exp-hear-textbor"></span>
|
||||
@@ -188,7 +188,7 @@
|
||||
<div class="exp-hear-text">
|
||||
学习天数排行榜
|
||||
<el-tooltip placement="top" effect="light">
|
||||
<div slot="content">占位内容<br/>占位内容</div>
|
||||
<div slot="content">所有用户学习天数TOP排行榜单,每活跃学习1天可累计学习天数;</div>
|
||||
<svg-icon style="margin-left: 14px;font-size:20px;padding-top: 4px;" icon-class="doubt"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="exp-hear-textbor" style="background:#f1b48f !important"></span>
|
||||
|
||||
Reference in New Issue
Block a user