Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal

This commit is contained in:
dongruihua
2022-12-05 21:27:50 +08:00
29 changed files with 440 additions and 297 deletions

View File

@@ -78,6 +78,7 @@
.dlg-box{
text-align: center;
margin: 0 auto;
//background: transparent !important;
padding:120px 60px 20px 50px;
}

View File

@@ -229,6 +229,7 @@ export default {
height: 30px;
.uc-coures-name-left{
flex: 1;
font-size: 18px;
}
.canfavo{
margin-left:auto;

View File

@@ -560,10 +560,10 @@ export default {
},
confirmChooseOrg(orgInfo){
//console.log(orgInfo,'orgInfo');
// if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
// this.$message.error("此机构无HRBP审核人信息请重新选择");
// return;
// }
if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
this.$message.error("此机构无HRBP审核人信息请重新选择");
return;
}
this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid; //kid已不存在
this.courseInfo.orgId=orgInfo.id;
@@ -598,30 +598,32 @@ export default {
}),
loadUserGroup(){
let $this=this;
apiUserGroup.findByName('').then(rs=>{
if(rs.status==200){
let crowdList=[];
rs.result.forEach(item=>{
crowdList.push({
id:item.key,
name:item.value,
// apiUserGroup.findByName('').then(rs=>{
// if(rs.status==200){
// let crowdList=[];
// rs.result.forEach(item=>{
// crowdList.push({
// id:item.key,
// name:item.value,
// disabled:false
// })
// })
// this.userGroupList=crowdList;
// }
// });
apiUserBasic.getUserCrowds().then(rs=>{
if(rs.status==200){
let crowdList=[];
rs.result.forEach(item=>{
crowdList.push({
id:item.kid,
name:item.audienceName,
disabled:false
})
})
this.userGroupList=crowdList;
}
});
// apiUserBasic.getUserCrowds().then(rs=>{
// if(rs.status==200){
// let crowdList=[];
// rs.result.forEach(item=>{
// crowdList.push({
// id:item.kid,
// name:item.audienceName
// })
// })
// }
// })
});
this.userGroupList=crowdList;
}
})
},
resOwnerName(code) {
if (code == '') {
@@ -666,6 +668,7 @@ export default {
//console.log(this.$refs.weikePanel,'this.$refs.weikePanel');
//this.$refs.weikePanel.init();
//this.$refs.onlineCourse.resetData();
//刷新用户受众
//初始化显示内容
this.btnLoading = false;
this.curStepIndex = 1; //打开都是第一步
@@ -716,13 +719,20 @@ export default {
}
this.orgKid='';
if(this.courseInfo.orgId){
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){
this.orgName=rrs.result.name;
this.orgKid=rrs.result.kid;
this.orgNamePath=rrs.result.namePath;
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// this.orgName=rrs.result.name;
// this.orgKid=rrs.result.kid;
// this.orgNamePath=rrs.result.namePath;
// }
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
this.orgName=rs.result.name;
//this.orgKid=rs.result.kid;
this.orgNamePath=rs.result.namePath;
}
})
});
}
} else {
@@ -829,10 +839,10 @@ export default {
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
if(ors.status==200){
$this.courseInfo.orgId=ors.result.id;
apiOrg.getSimple(ors.result.id).then(rrs=>{
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
//$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
@@ -845,16 +855,26 @@ export default {
})
}else{
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// $this.orgNamePath=rrs.result.namePath;
// }else{
// $this.courseInfo.orgId='';
// $this.$message.error('资源归属已变更,请重新选择');
// }
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
$this.orgName=rs.result.name;
//$this.orgKid=rs.result.kid;
$this.orgNamePath=rs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
})
});
}
this.resOwnerArray=[];
@@ -1381,30 +1401,31 @@ export default {
};
this.btnLoading = true;
let $this = this;
console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
// apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
// if(rs.status==200 && rs.result){
// postData.auditUser={
// email:rs.result.email,
// code:rs.result.userNo,
// name:rs.result.name,
// aid:rs.result.id,
// orgId:rs.result.orgId
// }
// postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
apiHRBP.getHRBP(this.orgKid).then(rs=>{
if(rs.status==200 && rs.result.length>0){
let hrbpUser=rs.result[0];
postData.auditUser={
email:hrbpUser.email,
code:hrbpUser.user_no,
name:hrbpUser.real_name,
kid:hrbpUser.user_id,
orgId:hrbpUser.orgnization_id
}
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
if(rs.status==200 && rs.result){
postData.auditUser={
email:rs.result.email,
code:rs.result.userNo,
name:rs.result.name,
aid:rs.result.id,
orgId:rs.result.orgId
}
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
// apiHRBP.getHRBP(this.orgKid).then(rs=>{
// if(rs.status==200 && rs.result.length>0){
// let hrbpUser=rs.result[0];
// postData.auditUser={
// email:hrbpUser.email,
// code:hrbpUser.user_no,
// name:hrbpUser.real_name,
// kid:hrbpUser.user_id,
// orgId:hrbpUser.orgnization_id
// }
// postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;
@@ -1429,6 +1450,10 @@ export default {
$this.btnLoading = false;
this.$message.error('获取审核HRBP失败:'+rs.message);
}
}).catch(err=>{
//this.$message.error('获取审核HRBP失败:'+err);
this.$message.error('获取审核HRBP失败请检查资源归属下是否有HRBP审核人员');
$this.btnLoading = false;
})
},

View File

@@ -278,6 +278,7 @@ export default {
this.total=paper.items.length;
this.paper =paper;
//console.log(this.paper);
this.curItem=paper.items[this.curIndex];
this.startTime=new Date();//记录开始时间
this.timerValue=this.info.testDuration;
@@ -335,12 +336,12 @@ export default {
showClose:false,
type: 'warning'
}).then(() => {
this.submitTest()
this.submitTest(score);
}).catch(()=>{
})
}else{
this.submitTest()
this.submitTest(score);
}
},
countTest(){ //计算考试的分数
@@ -382,11 +383,20 @@ export default {
noAnswers.push(idx+1);
}
let allRight = true;
//console.log('用户的答案',item.userAnswer);
item.options.forEach(it =>{
if(it.answer && item.userAnswer.indexOf(it.id)==-1) {
allRight=false;
//console.log('选项',it.answer,it.id,item.userAnswer.indexOf(it.id));
if(it.answer){ //正确答案
if(item.userAnswer.indexOf(it.id)==-1){
allRight=false;
}
}else{
if(item.userAnswer.indexOf(it.id)>-1){
allRight=false;
}
}
});
//console.log('是否回答正确',allRight)
if(allRight){
scoreNum+=item.score;
}
@@ -404,14 +414,15 @@ export default {
//console.log('本次得分='+this.lastScore);
return this.lastScore;
},
submitTest(){ //提交处理
submitTest(testScore){ //提交处理
//清空提示
if(this.timer){
window.clearInterval(this.timer);
}
let now=new Date();
let testScore=this.countTest();
if(!testScore){
testScore=this.countTest();
}
let postData={
studyId:this.studyId,//
studyItemId:this.studyItemId,//前面已经给了

View File

@@ -64,7 +64,7 @@
</div>
<div class="learning-border" ></div>
<div class="learning-info" style="margin-left:22px">
<div class="learning-qus">我的U币累计</div>
<div class="learning-qus">{{pageId == userInfo.aid? '我的U币累计':'TA的U币累计'}}</div>
<div class="learning-an"><span>{{statData.uvalue}}</span></div>
</div>
<!--

View File

@@ -87,7 +87,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="com.sysCreateTime"></showTime>
<interactBar :type="praisesType" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="praisesType" :pageType="objType" :pageParams="objId" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
</div>
<div class="comment-btns">
@@ -113,7 +113,7 @@
</div>
<!--回复内容-->
<div v-if="com.replyList && com.replyList.length>0">
<div v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="com.showAll || replyIdx<3">
<div v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="replyIdx<com.showNum">
<div class="comment" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
<div class="comment-top">
<div class="comment-author">
@@ -135,7 +135,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="reply.sysCreateTime"></showTime>
<interactBar :type="praisesType" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="praisesType" :pageType="objType" :pageParams="objId" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
</div>
<div class="comment-btns">
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
@@ -159,7 +159,7 @@
</div>
</div>
</div>
<div v-if="!com.showAll && com.replyList.length>3" style="padding-left: 45px;padding-bottom: 10px;" @click="loadReplyMore(com)"><span style="color: #9e9e9e;cursor: pointer; border-radius: 5px;border:1px solid #cccccc;padding: 5px 10px;font-size: 14px;">加载更多&gt;&gt;</span></div>
<div v-if="com.replyList.length>com.showNum" style="padding-left: 45px;padding-bottom: 10px;" @click="loadReplyMore(com)"><span style="color: #9e9e9e;cursor: pointer; border-radius: 5px;border:1px solid #cccccc;padding: 5px 10px;font-size: 14px;">加载更多&gt;&gt;</span></div>
</div>
</div>
</div>
@@ -384,7 +384,8 @@
},
methods: {
loadReplyMore(item){
item.showAll=true;
item.showNum=item.showNum+3;
//item.showAll=true;
},
loadMore() {
this.pageIndex +=1;
@@ -455,6 +456,7 @@
let ids=[];
let allList=[];
res.result.list.forEach(item=>{
item.showNum=3;
item.answers=item.replys;
item.showAll=false;
item.avatar='';

View File

@@ -48,11 +48,14 @@
</el-tooltip>
<span class="interact-bar-value"> {{data.shares}}</span>
</div>
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '40px':'20px'}`" class="interact-bar-btn" :class="{cursor:!readonly}">
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '20px':'20px'}`" class="interact-bar-btn ese-view" :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:22px;" icon-class="eyes"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ formatNum(data.views)}}</span>
<!-- <div style="float:right;margin-left:8px"> -->
<span class="interact-bar-value eyes-view" > {{ formatNum(data.views)}}</span>
<!-- </div> -->
</div>
</div>
<!-- <div v-if="courseExclusive" @click="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
@@ -171,11 +174,20 @@ export default {
unicom:{
type:Boolean,
default:false
},
pageType:{
type:Number,
default:0
},
pageParams:{
type:String,
default:''
}
},
data(){
return {
formatNum:formatUserNumber,
msgPageType:0,
loading:false,
isPraise:false,
isFavorite:false,
@@ -219,6 +231,14 @@ export default {
if(this.data && this.data.id && !this.readonly){
this.checkHas();
}
if(this.pageType==0){
this.msgPageType=this.type;
}else{
this.msgPageType=this.pageType;
}
},
methods:{
addAnswers() {
@@ -251,7 +271,7 @@ export default {
content='提问'
}
if(this.type==5){
content='回答'
content='回答';
}
if(this.type==6){
content='课程笔记'
@@ -270,19 +290,27 @@ export default {
content='案例评论'
}
// 评论点赞通知没有关联id,评论通知暂时关闭
// 设置了主信息的关联,再把这个判断去掉
if(this.type==60 || this.type==10 || this.type==20 || this.type==30 || this.type == 6) {
return;
// content=sendName+typeText+content
} else {
content=sendName+typeText+content+'-'+title
//return;
}
if(title){
content=sendName+typeText+content+'-'+title
}else{
content=sendName+typeText+content
}
let msgPageParams=this.pageParams;
if(!msgPageParams){
msgPageParams=this.data.id;
}
let message={
content,
refId,
refType:this.type,
source:1,
pageType:this.msgPageType,
pageParams:msgPageParams,
pageUrl:location.href,
sendAid:this.userInfo.aid,
sendName,
@@ -397,9 +425,10 @@ export default {
if(this.unicom) {
this.$store.dispatch("unicomPraises",true)
}
if(this.type!=1&&this.type!=5){
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'点赞了我的');
}
//console.log('点选了我的 pageType='+this.msgPageType+','+this.pageParams)
//if(this.type!=1&&this.type!=5){
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'点赞了我的');
//}
// if(this.type==5){
// this.messageSave(this.data.id,this.data.content,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'评论了我的');
// }
@@ -517,9 +546,9 @@ export default {
if(this.unicom) {
this.$store.dispatch("unicomFavorites",true)
}
if(this.type===2||this.type===4){
//if(this.type===2||this.type===4){
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'收藏了我发布的');
}
//}
this.$message({message:'已加入收藏',type:'success'});
//this.$emit('addFavorite',res.result);//添加收藏,如果是true代表添加成功false代表已存在
}else{
@@ -629,13 +658,13 @@ export default {
if(rs.result){
$this.data.shares++;
this.$message.success("分享成功")
if(this.type!=3){
//if(this.type!=3){
if(this.type==1){
this.messageSave(this.data.id,this.data.name,this.userInfo.name,curUser.name,curUser.aid,'分享给我的');
}else{
this.messageSave(this.data.id,this.data.title,this.userInfo.name,curUser.name,curUser.aid,'分享给我的');
}
}
//}
let event = {
key: "Share",//分享
title: "分享",//分享
@@ -664,6 +693,11 @@ export default {
</script>
<style lang="scss" scoped>
// .eyes-view{
// color: #000;
// position: fixed;
// line-height: 40px;
// }
::v-deep .g-dialog .el-dialog__header{
text-align: left !important;
}

View File

@@ -29,7 +29,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="com.sysCreateTime"></showTime>
<interactBar :type="6" :shares="false" :data="com" @addAnswers="showReply(com)" :views="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="6" :pageType="1" :pageParams="objId" :shares="false" :data="com" @addAnswers="showReply(com)" :views="false" :comments="false" :answers="true"></interactBar>
</div>
<div v-if="replyInfo.parentId==com.id" class="comment-reply" style="padding-bottom: 5px;margin-top: 20px;">
<div style="width:100%;display:flex;">
@@ -65,7 +65,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="reply.sysCreateTime"></showTime>
<interactBar :type="60" :shares="false" :data="reply" @addAnswers="showReply(reply)" :views="false" :favorites="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="60" :pageType="1" :pageParams="objId" :shares="false" :data="reply" @addAnswers="showReply(reply)" :views="false" :favorites="false" :comments="false" :answers="true"></interactBar>
</div>
</div>
<!--发布回复-->

View File

@@ -188,10 +188,10 @@ export default {
this.popupConfig={
id:'123',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
width:'472px',//宽度
height:'500px',
title:'用户体验调研',//标题
content:'<div style="font-size:20px;font-weight: 600;padding-bottom:10px">亲爱的校友:</div><div> 诚邀您对11月4日上线的学习平台V2.0的使用体验进行测评,我们将以您的意见反馈为输入,不断的优化和改进。</div>',//文字内容
content:'<div style="font-size:20px;font-weight: 600;padding-bottom:10px;">亲爱的校友:</div><div> 诚邀您对11月4日上线的学习平台V2.0的使用体验进行测评,我们将以您的意见反馈为输入,不断的优化和改进。</div>',//文字内容
bgImage:'dlg_bg_pen',//背景图
pcUrl:'https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx',//点击后打开的地址,最好是使用相对地址
h5Url:'',

View File

@@ -106,22 +106,41 @@
}else{
let $this=this;
if(node.level === 1){
parentId = '-1';
// apiUserBasic.findOrgsByKeyword('').then(rs=>{
// let treeList=[];
// rs.result.forEach(item=>{
// let node={
// id:item.id,
// name:item.name,
// hrbpId:item.hrbpId,
// children:[]
// }
// treeList.push(node);
// });
// resolve(treeList);
// });
// parentId = '-1';
apiUserBasic.findOrgsByKeyword('').then(rs=>{
let treeList=[];
rs.result.forEach(item=>{
let node={
id:item.id,
name:item.name,
hrbpId:item.hrbpId,
children:[]
}
treeList.push(node);
});
resolve(treeList);
});
}else{
parentId = node.data.id;
apiUserBasic.getOrgInfo(parentId).then(rs=>{
if(rs.status==200){
let treeList=[];
if(rs.result.directChildList){
rs.result.directChildList.forEach(item=>{
let node={
id:item.id,
name:item.name,
hrbpId:item.hrbpId,
children:[]
}
treeList.push(node);
});
}
resolve(treeList);
}else{
resolve([]);
}
});
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
// if(rs.status==200){
// let treeList=[];
@@ -145,17 +164,17 @@
// }
// });
}
usergroupApi.userOrgs(parentId).then(res =>{
if (res.status == 200) {
if(res.result != null && res.result.length > 0){
resolve(res.result);
}else{
resolve([]);
}
}else{
this.$message.error('查询用户的机构失败');
}
});
// usergroupApi.userOrgs(parentId).then(res =>{
// if (res.status == 200) {
// if(res.result != null && res.result.length > 0){
// resolve(res.result);
// }else{
// resolve([]);
// }
// }else{
// this.$message.error('查询用户的机构失败');
// }
// });
}
},
handleSelectionChange(val) {

View File

@@ -98,7 +98,12 @@
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
</template>
<!-- <i class="el-icon-menu"></i> -->
</el-menu-item>
<el-menu-item v-show="curIdentity == 3">
<template slot="title">
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
</template>
</el-menu-item>
<el-menu-item v-show="curIdentity == 3">
<template slot="title">
@@ -209,7 +214,7 @@
</el-menu-item> -->
</el-submenu>
<!--user-->
<!-- <el-menu-item >
<svg-icon icon-class="myubi"></svg-icon>
<span slot="title">我的U币</span>
@@ -292,11 +297,11 @@
<span slot="title" class="textl">分享给我的</span>
</el-menu-item>
</el-submenu>
<!-- v-show="curIdentity == 1" -->
<el-menu-item index="/user/favorites" v-show="curIdentity == 1">
<svg-icon :icon-class="activeMenu == '/user/favorites'?'stra-active':'stra'"></svg-icon>
<span slot="title">我的收藏</span>
@@ -305,7 +310,7 @@
<svg-icon :icon-class="activeMenu == '/message/center/index'?'messageicon':'messageactive'"></svg-icon>
<span slot="title">消息中心</span>
</el-menu-item>
<!-- <el-submenu index="myArwticle" v-show="curIdentity == 1">
<template slot="title">
<i class="el-icon-s-grid"></i>
@@ -465,12 +470,12 @@ export default {
line-height: 36px;
}
.course-card{
}
.course-image {
position: relative;
.course-image {
}
.course-type{
position: absolute;