mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-23 17:55:37 +08:00
Merge remote-tracking branch 'origin/stat' into stat
This commit is contained in:
@@ -249,9 +249,10 @@ export default {
|
||||
this.setTime = setTimeout(()=>{
|
||||
event.key = 'ReadArticle';
|
||||
event.title = "阅读文章";
|
||||
event.parameters='second:60';//增加60秒的学习时长
|
||||
event.content = "阅读了文章"
|
||||
$this.$store.dispatch("userTrigger", event);
|
||||
},2000);
|
||||
},61000);//1分钟后记录
|
||||
//}
|
||||
}else{
|
||||
this.noData = false;
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
<span class="crumbs-line">/</span>
|
||||
<span class="crumbs-last">案例详情</span>
|
||||
</div>
|
||||
<div class="title">{{ caseDetail.title }}</div>
|
||||
<div class="title">
|
||||
<h5>{{ caseDetail.title }}</h5>
|
||||
<span style="text-align: right;" v-if="caseDetail.sysCreateTime"> <i class="el-icon-time"></i> {{ caseDetail.sysCreateTime.substring(0,10) }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<author :onlyAvatar="true" :avatar="authorInfo.avatar" :sex="authorInfo.sex" ></author>
|
||||
<span>案主:{{ authorInfo.name }} ({{authorInfo.orgInfo}})</span>
|
||||
@@ -21,7 +24,6 @@
|
||||
<span>工号:{{ authorInfo.code }}</span>
|
||||
<span>组织:{{ authorInfo.orgInfo }} </span> -->
|
||||
<span> {{authorInfo.sign}}</span>
|
||||
<span style="text-align: right;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
|
||||
</div>
|
||||
<!-- <div class="label">
|
||||
<span style="margin-left:0px;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
|
||||
@@ -529,6 +531,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.case-banner{
|
||||
height: 240px;
|
||||
background: url('/images/case-banner.png');
|
||||
@@ -630,11 +633,21 @@ export default {
|
||||
background-color: #fff;
|
||||
padding: 50px;
|
||||
.title {
|
||||
font-size: 20px;
|
||||
line-height: 45px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0px;
|
||||
word-break:break-all;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
h5{
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
line-height: 45px;
|
||||
font-weight: 600;
|
||||
flex: 1;
|
||||
}
|
||||
span{
|
||||
margin-left: auto;
|
||||
line-height: 45px;
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.label {
|
||||
font-size: 15px;
|
||||
@@ -802,6 +815,7 @@ export default {
|
||||
.aligh-title{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
.ranking-data {
|
||||
margin: 10px 0;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
<div class="search-item">
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;padding-right: 10px;">
|
||||
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
||||
<img class="orgaicon" src="../../../../public/images/orgaimg.png" alt="">
|
||||
<span class="item-title" >组织领域</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1;">
|
||||
@@ -32,7 +33,8 @@
|
||||
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;padding-right: 10px;">
|
||||
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
||||
<img class="orgaicon" src="../../../../public/images/specimg.png" alt="">
|
||||
<span class="item-title" >专业分类</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1" id="searchBox">
|
||||
@@ -714,6 +716,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.orgaicon{
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.course-resources{
|
||||
margin-top: 26px;
|
||||
img{
|
||||
@@ -834,37 +846,27 @@ export default {
|
||||
//box-shadow: none!important;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
margin: 10px 10px 10px 0;
|
||||
//font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
// line-height: 20px;
|
||||
::v-deep.item-title {
|
||||
margin: 15px 10px 10px 0;
|
||||
font-size: 16px !important;
|
||||
font-weight: 400;
|
||||
color: #6B7C85;
|
||||
line-height: 25px;
|
||||
}
|
||||
.item-line {
|
||||
padding-left: 2px;
|
||||
height: 20px;
|
||||
|
||||
background: #ddd;
|
||||
// background: #ddd;
|
||||
}
|
||||
|
||||
.portal-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// .item-title{
|
||||
// margin-bottom: 5px;
|
||||
// line-height: 36px;
|
||||
// font-size: 14px;
|
||||
// font-weight: 600;
|
||||
// color: #333333;
|
||||
// }
|
||||
|
||||
}
|
||||
.searchbar {
|
||||
background-color: #ffffff;
|
||||
// border: 1px solid #f3f3f3;
|
||||
// width: 1200px;
|
||||
// padding: 5px 20px;
|
||||
// margin-bottom: 10px;
|
||||
|
||||
}
|
||||
|
||||
.fixed {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</ul>
|
||||
</Remark>
|
||||
<portal-header :goSearch="10"></portal-header> -->
|
||||
<div class="xcontent portal-content">
|
||||
<div class=" portal-content">
|
||||
<div class="msg-nav">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div><el-checkbox v-model="checkAll" :indeterminate="isIndeterminate">多选</el-checkbox></div>
|
||||
@@ -32,14 +32,22 @@
|
||||
<span>{{ item.title }}</span>
|
||||
<!-- <span class="msg-time"></span> -->
|
||||
</div>
|
||||
<div><el-button type="danger" size="small" @click="delItem(item)">删除</el-button></div>
|
||||
<!-- <div><el-button type="danger" size="small" @click="delItem(item)">删除</el-button></div> -->
|
||||
</div>
|
||||
<div class="msg-body">
|
||||
<!-- {{ filterContent(item.content)[0] }}- -->
|
||||
<div class="msg-body-content">
|
||||
<!-- {{ filterContent(item.content)[0] }}- -->
|
||||
{{item.tip}}-
|
||||
<a :href="returnRouter(item)">{{ item.content }}</a>
|
||||
</div>
|
||||
|
||||
<div class="msg-body-but">
|
||||
<el-button type="danger" plain @click="delItem(item)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="msg-time">{{ item.msgTime }}</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;margin-top: 50px" v-if="total > queryData.pageSize">
|
||||
@@ -274,11 +282,37 @@ export default {
|
||||
line-height: 30px;
|
||||
}
|
||||
.msg-body {
|
||||
word-break:break-all;
|
||||
padding: 10px 10px 10px 25px;
|
||||
color: #727272;
|
||||
a:hover {
|
||||
color: #409eff;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
.msg-body-content{
|
||||
flex: 1;
|
||||
word-break:break-all;
|
||||
color: #727272;
|
||||
a:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
.msg-body-but{
|
||||
margin-left: auto;
|
||||
|
||||
button{
|
||||
width: 88px;
|
||||
height: 32px;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 0;
|
||||
color: #F52F3E;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
border: 1px solid #F52F3E;
|
||||
}
|
||||
button:hover{
|
||||
background-color: rgba(255,101,98,0.13);
|
||||
color: #F52F3E;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.msg-time {
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Remark>
|
||||
1.我的问答,我发的问题列表信息
|
||||
<br />
|
||||
2.关于问题标题是否是必须的可以讨论下
|
||||
<br />
|
||||
</Remark>
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;">
|
||||
<!-- <div style="padding-top: 5px;"> -->
|
||||
<!--
|
||||
<el-tag type="primary" style="margin-right: 20px;">最新</el-tag>
|
||||
<el-tag type="info">最热</el-tag>
|
||||
-->
|
||||
<!-- </div> -->
|
||||
<div>
|
||||
<div style="display: flex;justify-content:space-around;padding: 12px 22px 10px 18px;">
|
||||
<!--<div style="padding: 0px 5px;"><el-cascader clearable v-model="params.type" :options="typeList"></el-cascader></div>-->
|
||||
|
||||
@@ -329,6 +329,7 @@
|
||||
notetab: 1,
|
||||
localTimeKey:'boeu-study-time' ,//本地存储的学习时长的key json格式
|
||||
localTimeValue:0,//计算的时间
|
||||
appendStudyOtherHandle:null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -372,6 +373,41 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//非音视频课学习时长的增加,每一分钟保存一次
|
||||
appendStudyOtherTime() {
|
||||
//console.log('开始追加学习时长',this.isAppendTime);
|
||||
if (this.studyId == '') {
|
||||
return;
|
||||
}
|
||||
if (!this.contentData.id) {
|
||||
return;
|
||||
}
|
||||
let postData={
|
||||
"key": "StudyCourseOther",//课程学习的key
|
||||
"title": "非音视频课内容",//事件的标题
|
||||
"parameters":"second:60",//second:value 本次的学习时长
|
||||
"content": "学习课程【"+this.courseInfo.name+"】",//事件的内容
|
||||
"objId": this.contentData.id,//课程的内容id
|
||||
"objType": "1",//类型
|
||||
"source":"page",
|
||||
"objInfo": ""+this.contentData.contentName,
|
||||
"aid":this.userInfo.aid, //当前登录人的id
|
||||
"aname":this.userInfo.name,//当前人的姓名
|
||||
"status": 1 //状态
|
||||
}
|
||||
//静默处理
|
||||
apiStat.sendEvent(postData).then(rs=>{
|
||||
if(rs.status != 200) {
|
||||
console.log(rs.message);
|
||||
}
|
||||
});
|
||||
//每一分钟保存一次
|
||||
let $this=this;
|
||||
this.appendStudyOtherHandle = setTimeout(function() {
|
||||
$this.appendStudyOtherTime();
|
||||
}, 1000*60);
|
||||
|
||||
},
|
||||
//关注功能
|
||||
toFollow(item) {
|
||||
apiFollow.save(item.teacherId).then(res => {
|
||||
@@ -529,8 +565,17 @@
|
||||
this.contentData.status = 2; //进行中
|
||||
}
|
||||
if (this.contentData.contentType > 20) { //非视频类的
|
||||
//用户的学习时长,只是视听课的学习时长,所以这里不要追加学习时长
|
||||
//用户的学习时长,非音视频课程学习,单独的处理
|
||||
this.isAppendTime = false;
|
||||
|
||||
if(this.appendStudyOtherHandle!=null){
|
||||
windows.clearTimeout(this.appendStudyOtherHandle);
|
||||
}
|
||||
|
||||
|
||||
this.appendStudyOtherHandle = setTimeout(function() {
|
||||
$this.appendStudyOtherTime();
|
||||
}, 1000*60*2); //非音视频课程学习,2分钟后记录,因为一次记录是60秒
|
||||
//this.appendStudyTime();
|
||||
this.handleTimeout = setTimeout(function() {
|
||||
$this.saveStudyInfo();
|
||||
@@ -1034,7 +1079,7 @@
|
||||
saveStudyDuration(duration) { //保存本地存储的学习时长
|
||||
if (duration > 0) {
|
||||
//发送用户学习事件
|
||||
console.log('保存到后台学习时长='+duration);
|
||||
//console.log('保存到后台学习时长='+duration);
|
||||
let postData={
|
||||
"key": "StudyCourse",//课程学习的key
|
||||
"title": "学习课程",//事件的标题
|
||||
@@ -1042,7 +1087,7 @@
|
||||
"content": "学习课程【"+this.courseInfo.name+"】",//事件的内容
|
||||
"objId": this.courseInfo.id,//课程的id
|
||||
"objType": "1",//类型
|
||||
"source":"页面事件",
|
||||
"source":"page",
|
||||
"objInfo": ""+this.courseInfo.name,
|
||||
"aid":this.userInfo.aid, //当前登录人的id
|
||||
"aname":this.userInfo.name,//当前人的姓名
|
||||
@@ -1079,7 +1124,7 @@
|
||||
},
|
||||
//结束追加学习时长
|
||||
stopStudyTime(){
|
||||
console.log('停止追加学习时长');
|
||||
//console.log('停止追加学习时长');
|
||||
this.isAppendTime=false;
|
||||
if (this.appendHandle != null) {
|
||||
window.clearTimeout(this.appendHandle);
|
||||
@@ -1104,7 +1149,7 @@
|
||||
}
|
||||
//首先从本地读取
|
||||
let duration = studyUtil.getStudyDuration();
|
||||
console.log('追加学习时长,当前本地积累的学习时长='+duration);
|
||||
//console.log('追加学习时长,当前本地积累的学习时长='+duration);
|
||||
//追加学习长
|
||||
let $this = this;
|
||||
if (this.appendStartTime == null) {
|
||||
|
||||
Reference in New Issue
Block a user