Merge remote-tracking branch 'origin/stat' into stat

This commit is contained in:
weinan2087
2022-10-13 14:31:50 +08:00
17 changed files with 217 additions and 92 deletions

View File

@@ -10,7 +10,7 @@ VUE_APP_BASE_API = '/systemapi'
VUE_APP_BOE_BASE_API = '/uboeApi'
# 资源位的api
VUE_APP_CESOURCE_BASE_API = '/subgroupApi'
VUE_APP_CESOURCE_BASE_API = '/socialApi'
# 事件的api
VUE_APP_STAT_BASE_API = '/statApi'

BIN
public/images/orgaimg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

BIN
public/images/specimg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

View File

@@ -1,16 +1,8 @@
<template>
<div>
<Remark :fixed="false">
<ul>
<li>class名为problem的dom(即时间)无法直接垂直居中</li>
<li>状态有草稿待审核未通过已通过已发布</li>
<li>状态为已发布时才显示点赞收藏图标</li>
<li>点击编辑时没有跳转到新页面</li>
</ul>
</Remark>
<div class="article-list" v-for="(item, idx) in items" :key="idx" @click="jumpDetail(item)">
<div class="article-info">
<div class="article-info-title one-line-ellipsis"
<div class="article-info-title one-line-ellipsis"
>
<!-- <span v-if="item.enabled" :class="classFilter(item.status).className">{{classFilter(item.status).text}}</span> -->
<!-- <span v-else class="article-status8">已下架</span> -->
@@ -53,6 +45,7 @@
</template>
<script>
import { mapGetters } from "vuex";
import interactBar from '@/components/Portal/interactBar.vue';
import apiArticle from '@/api/modules/article.js';
import editItems from '@/components/Article/editItems.vue';
@@ -60,6 +53,9 @@ export default {
components: {
interactBar,editItems
},
computed: {
...mapGetters(["userInfo"]),
},
name: 'articleItems',
props: {
items: {
@@ -78,7 +74,7 @@ export default {
}
};
},
filters:{
sysCreateTimeFilter(item){
return item.split(' ')[0]
@@ -146,26 +142,35 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
apiArticle
.del(item.id)
.then(res => {
}).then(() => {
apiArticle.del(item.id).then(res => {
if (res.status == 200) {
this.$emit('update',true)
this.$message.success('删除成功');
console.log('shanchushanchu')
//发送删除事件
let event = {
key: "DeleteArticle",//后台的事件key 发布文章且审核通过
title: "删除文章",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "删除文章",//事件的内容
source:'page',
objId: item.id,//关联的id
objType: "2",//关联的类型
objInfo: item.title,
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
}else{
this.$message.error('删除失败');
this.$message.error('删除失败:'+res.message);
}
})
.catch(err => {
}).catch(err => {
this.$message.error('删除失败');
});
})
.catch(() => {});
}).catch(() => {});
}
}
};
@@ -275,7 +280,7 @@ export default {
width: 100%;
font-size: 18px;
// font-weight: 400;
// height: 40px;
margin-top: 7px;
// line-height: 40px;

View File

@@ -53,7 +53,7 @@
show-word-limit
v-model="inputValue"
maxlength="800"
placeholder="写下您的评论(800字以内),可以@案主哦"
placeholder="写下您的评论~"
></el-input>
@@ -793,6 +793,7 @@
</script>
<style lang="scss" scoped>
.publish-button{
// line-height: 30px;
padding-top: 7px;

View File

@@ -26,7 +26,7 @@
</el-tooltip>
<span class="interact-bar-value"> {{data.comments}}</span>
</div>
<div v-if="praises" @click="addPraise()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="点赞" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0;font-size: 14px;" :icon-class="isPraise?'praised':'like'"></svg-icon>
@@ -336,6 +336,21 @@ export default {
if(this.unicom) {
this.$store.dispatch("unicomPraises",false)
}
let event = {
key: "cancelPraise",//
title: "取消点赞",//事件的标题
parameters:"author:"+this.data.sysCreateAid,//用户自定义参数 name:value,name:value
content: "取消点赞"+this.data.title,//事件的内容
objId: this.data.id,//关联的id
objType: this.type,//关联的类型
objInfo: this.data.title,
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
this.$message({message:'取消点赞',type:'success'})
}else{
console.log('取消失败:'+res.message);
@@ -362,7 +377,7 @@ export default {
let event = {
key: "Praise",//后台的事件key 发布文章且审核通过
title: "点赞",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
parameters:"author:"+this.data.sysCreateAid,//用户自定义参数 name:value,name:value
content: "点赞"+this.data.title,//事件的内容
objId: this.data.id,//关联的id
objType: this.type,//关联的类型
@@ -552,7 +567,7 @@ export default {
}
}
let event = {
key: "Share",//后台的事件key
key: "Share",//后台的事件key
title: "被分享",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: '被分享',//事件的内容

View File

@@ -164,13 +164,13 @@ export default {
this.feedbackDlgShow=false;
let event = {
key: "Feedback",//后台的事件key
key: "Feedback",//后台的事件key
title: "意见反馈",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: '意见反馈',//事件的内容
// objId: this.data.id,//关联的id
// objType: this.type,//关联的类型
// objInfo: this.data.title,
objId: res.result.id,//关联的id
objType:'99',//关联的类型
objInfo: "意见反馈",
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1

View File

@@ -74,7 +74,7 @@
<el-badge class="person-action-index message-count" :value="userMsg" :hidden="userMsg == 0">
<el-tooltip content="消息" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip">
<el-link type="primary" :href="`${webBaseUrl}/message/center/index`" :underline="false">
<svg-icon v-if="current == 'qa'" style="margin-right: 0;font-size:26px;" icon-class="message"></svg-icon>
<svg-icon v-if="current == 'qa' || 'index'" style="margin-right: 0;font-size:26px;" icon-class="message"></svg-icon>
<svg-icon v-else style="margin-right: 0;font-size:26px;" icon-class="messfff"></svg-icon>
</el-link>
</el-tooltip>

View File

@@ -32,7 +32,7 @@
<span v-if="item.status==0||item.status==2" style="color: red">{{statusText(item.status)}}</span>
<!-- <div class="article-info-tools-btns"> -->
<!-- <interactBar :data="item" :type="0" class="test" :answers="true" :comments="false" :shares="false" :views="false"></interactBar> -->
<div class="button-cla"><interactBar nodeWidth="60px" :readonly="true" :type="4" :data="item" :shares="true" :comments="false" :answers="true" :clickAnswer="true" :views="false"></interactBar></div>
</div>
<!-- <el-link icon="el-icon-chat-line-round" class="article-info-tools-btn" >回答57</el-link>
@@ -78,12 +78,16 @@
<script>
// import interactBar from '@/components/Portal/interactBar';
import { mapGetters } from "vuex";
import imageUpload from '@/components/ImageUpload/index.vue';
import apiQa from '@/api/modules/qa.js'
import interactBar from '@/components/Portal/interactBar.vue';
export default {
name: 'articleItems',
components: { imageUpload,interactBar },
computed: {
...mapGetters(["userInfo"]),
},
props: {
items: {
//name,
@@ -200,7 +204,22 @@ export default {
apiQa.del(item.id).then(res=>{
if(res.status==200){
this.$message({ type: 'success', message: '删除成功!' });
this.$emit('sure',true)
this.$emit('sure',true);
//发送删除问题事件
let event = {
key: "DeleteQuestion",//
title: "删除提问",//事件的标题
parameters:"author:"+item.sysCreateAid,//作者参数
content: "删除提问【"+item.title+"】",//事件的内容
source:'page',
objId: item.id,//关联的id
objType: "2",//关联的类型
objInfo: item.title,
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
}
})
})

View File

@@ -41,7 +41,7 @@
<!-- </div> -->
<div>
<el-badge :value="userMsg" :hidden="userMsg==0" class="message-count">
<el-link type="primary" :href="`${webBaseUrl}/message/center/index`" target="_blank" :underline="false">
<el-link type="primary" :href="`${webBaseUrl}/message/center/index`" :underline="false">
<svg-icon style="margin-right: 0;font-size:26px;" icon-class="messfff"></svg-icon>
</el-link>
</el-badge>
@@ -126,6 +126,7 @@ export default {
components:{InterestCollection,GuideBox},
data() {
return {
isTiao:false,
interestShow:false,
checked:true,
signInShow: false,
@@ -430,7 +431,7 @@ export default {
color:#409EFF;
}
}
.el-button{
margin-top: 1px;
// margin-left: 20px;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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>-->

View File

@@ -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) {

View File

@@ -141,14 +141,14 @@ module.exports = {
'^/statApi': ''
}
},
'/subgroupApi': {
'/socialApi': {
// 目标代理服务器地址
target: 'http://192.168.0.11:9081',
changeOrigin: true,
logLevel:'debug',
secure: false,
pathRewrite: {
'^/subgroupApi': ''
'^/socialApi': ''
}
},
},