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

This commit is contained in:
dongruihua
2022-11-23 21:06:38 +08:00
47 changed files with 1040 additions and 279 deletions

View File

@@ -0,0 +1,125 @@
<template>
<!--弹出窗口设置-->
<div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="showGonggao" :append-to-body="true" >
<div class="dlg-box" :style="`width:${config.width};height:${config.height}; background: url(${webBaseUrl}/images/gonggao/${config.bgImage}.png) no-repeat;`">
<span class="dlg-close" @click="showGonggao = false"><i style="font-size: 28px;color: #999;" class="el-icon-close"></i></span>
<div style="text-align:left;">
<div class="dlg-title" v-html="config.title"></div>
<div class="dlg-content" v-html="config.content"></div>
</div>
<div v-if="config.btnText"><a :href="config.pcUrl" @click="showGonggao = false" target="_blank" :style="{'background-color':config.btnColor}" class="dlg-button">{{config.btnText}}</a> </div>
<div v-if="config.author" style="text-align: right;padding-top: 20px;"><span>{{config.author}}</span> </div>
</div>
</el-dialog>
</div>
</template>
<script>
export default{
props:{
config: {
type:Object,
default(){
return{
id:'',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
height:'500px',
title:'公告',//标题
content:'',//文字内容
bgImage:'dlg_bg',//背景图
pcUrl:'',//点击后打开的地址,最好是使用相对地址
h5Url:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'',
type:0,//0表不控制
}
}
},
},
data() {
return {
showGonggao:false,
sessionKey:'alertpopup',
};
},
mounted() {
let loadNum = localStorage.getItem(this.sessionKey);
let hasFlag = sessionStorage.getItem(this.sessionKey);
let $this=this;
if(!hasFlag){
let times=0;
if(loadNum){
times=Number(loadNum);
}
if(times<3){
let now=new Date();
let min=new Date(2022,10,9,0,0,0);
let max=new Date(2022,11,1,0,0,0);
//console.log(now,min,max);
//console.log(now.getTime(),min.getTime(),max.getTime());
if(now.getTime()>min.getTime() && now.getTime()<max.getTime()){
//console.log('open')
this.showGonggao=true;
times++;
localStorage.setItem(this.sessionKey,times);
sessionStorage.setItem(this.sessionKey,1);
}
}
}
}
}
</script>
<style scoped lang="scss">
.dlg-box{
text-align: center;
//background: transparent !important;
padding:120px 60px 20px 50px;
}
.dlg-title{
color: #333333;
font-size: 26px;
padding: 30px 0px;
text-align: center;
font-weight: 600;
}
.dlg-content{
color: #333333;font-size: 18px;height: 150px;
}
.dlg-button{
border-radius: 22px;
display: inline-block;
font-size: 18px;
padding: 10px;
width: 300px;
height: 46px;
text-align: center;
color: #fff;
}
.dlg-close{
float: right;
margin-top: -90px;
cursor: pointer;
}
.medalbox {
::v-deep .el-dialog{
background: transparent !important;
box-shadow:none !important;
.el-dialog__header{
display: none !important;
}
.el-dialog__body{
// width: 320px !important;
// height: 420px !important;
background: transparent !important;
}
}
}
</style>

View File

@@ -14,7 +14,11 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>文章</span>{{item.title}}
<div style="width: 100%;">文章{{item.title}}</div>
<div style="color: #999999;font-size: 12px;font-weight: normal; cursor: pointer;width: 50px;" v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回
</div>
</div>
</div>
<!-- 旧版 -->
@@ -130,11 +134,15 @@ export default {
width: 100%;
padding: 30px 0;
border-bottom:1px solid #e9e9e9 ;
.coures-content{
margin-top: 20px;
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;
@@ -142,10 +150,12 @@ export default {
}
.coures-head{
display: flex;
.share-name{
font-size: 14px;
color: #666666;
margin-right: 17px;
cursor: pointer;
}
.share-time{
font-size: 14px;

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>案例</span>{{item.title}}
<div style="width: 100%;">案例{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
@@ -121,6 +124,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -109,8 +109,8 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item label="受众" v-if="!weike.onlyRequired">
<el-select value-key="key" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.key" :label="item.value" :value="item"></el-option>
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值" v-if="!weike.onlyRequired">
@@ -259,8 +259,8 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item label="受众"><!--:disabled="item.disabled"-->
<el-select value-key="key" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.key" :label="item.value" :value="item"></el-option>
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值"><el-input maxlength="200" v-model="courseInfo.value" show-word-limit placeholder="课程价值(限200字以内)"></el-input></el-form-item>
@@ -550,12 +550,24 @@ export default {
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;
},
removeCrowd(e){
//console.log(e);
if(e.disabled){
this.$message.error("您不能移除创建人加的受众");
this.courseCrowds.push(e);
return false;
}
},
confirmChooseOrg(orgInfo){
//console.log(orgInfo,'orgInfo');
this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid;
this.courseInfo.orgId=orgInfo.id;
this.$refs.refChooseOrg.dlgShow = false;
//console.log(orgInfo,'orgInfo');
// 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;
this.$refs.refChooseOrg.dlgShow = false;
},
getTeacherList(res) {
this.teacherValues = res;
@@ -585,11 +597,31 @@ export default {
loadSysTypes: 'sysType/loadSysTypes'
}),
loadUserGroup(){
let $this=this;
apiUserGroup.findByName('').then(rs=>{
if(rs.status==200){
this.userGroupList=rs.result;
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
// })
// })
// }
// })
},
resOwnerName(code) {
if (code == '') {
@@ -780,6 +812,7 @@ export default {
},
async getDetail(id) {
this.curCourseId = id;
this.orgName='';
let $this = this;
try {
const { result, status } = await apiCourse.detail(id);
@@ -801,10 +834,13 @@ export default {
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
//this.$message.error('资源归属已变更,请重新选择');
}
})
}else{
//
//this.$message.error('无机构关联,不需要提示');
}
})
@@ -814,6 +850,9 @@ export default {
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
})
}
@@ -844,14 +883,13 @@ export default {
if(result.crowds && result.crowds.length>0){
result.crowds.forEach(crowd=>{
let newCrowd={
key:crowd.groupId,
value:crowd.groupName,
disabled:false,
text:''
id:crowd.groupId,
name:crowd.groupName,
disabled:false
}
crowdList.push(newCrowd);
let hasUG=$this.userGroupList.some(ug=>{
return ug.key==crowd.groupId;
return ug.id==crowd.groupId;
});
if(!hasUG){
newCrowd.disabled=true;
@@ -1088,8 +1126,8 @@ export default {
let crowds=[];
this.courseCrowds.forEach(item=>{
crowds.push({
groupId:item.key,
groupName:item.value
groupId:item.id,
groupName:item.name
})
});
//以下是老师内容的处理
@@ -1238,10 +1276,10 @@ export default {
this.$message.error('请选择资源归属');
return;
}
if(!this.orgKid){
this.$message.error('资源归属无关联HRBP信息');
return;
}
// if(!this.orgKid){
// this.$message.error('资源归属无关联HRBP信息');
// return;
// }
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
//return;
@@ -1327,8 +1365,8 @@ export default {
let crowds=[];
this.courseCrowds.forEach(item=>{
crowds.push({
groupId:item.key,
groupName:item.value
groupId:item.id,
groupName:item.name
})
});
@@ -1343,7 +1381,19 @@ export default {
};
this.btnLoading = true;
let $this = this;
//先获取课程内容
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;
apiHRBP.getHRBP(this.orgKid).then(rs=>{
if(rs.status==200 && rs.result.length>0){
let hrbpUser=rs.result[0];
@@ -1355,6 +1405,7 @@ export default {
orgId:hrbpUser.orgnization_id
}
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;
setTimeout(function() {

View File

@@ -161,7 +161,6 @@ export default {
//$this.controlHeight=h-
this.listHeight=val-95;
this.inputHeight=(val-220);
this.inputRows=parseInt(this.inputHeight/30);
if(this.inputRows>20){
this.inputRows=20;
@@ -492,6 +491,8 @@ export default {
.newcote-text {
// margin-top: 24px;
word-break: break-all;
word-wrap: break-word;
font-size: 14px;
color: #333333;
height: 100%;
@@ -560,15 +561,12 @@ export default {
.mynote-tab {
width: 180px;
margin-top: 17px;
display: flex;
div {
font-size: 16px;
color: #666666;
flex: 1;
}
.noteactive span {
font-weight: 600;
color: #333333;

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>课程</span>{{item.title}}
<div style="width: 100%;">课程{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
@@ -166,6 +169,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -66,7 +66,7 @@
</div>
</div>
</div>
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
</div>
<!--音频-->
<div v-if="cware.content.contentType==20">
@@ -92,7 +92,7 @@
<br/>
</div>
</div>
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
</div>
</div>
<!--图片-->
@@ -125,7 +125,7 @@
<div>
<div><WxEditor v-model="cware.content.content" :minHeight="300"></WxEditor></div>
<div style="text-align: center;padding-top: 20px;">
<el-button @click="saveContent(1)" type="primary">保存</el-button>
<el-button :loading="loading" @click="saveContent(1)" type="primary">保存</el-button>
<!-- <el-button @click="deleteContent(1)" type="danger">删除</el-button> -->
</div>
</div>
@@ -231,7 +231,7 @@
</el-form-item>
</el-form>
<div style="text-align: center;padding: 10px;">
<el-button type="primary" @click="saveContent(2)">保存</el-button>
<el-button :loading="loading" type="primary" @click="saveContent(2)">保存</el-button>
<el-button type="danger" @click="deleteContent(2)">删除</el-button>
</div>
</div>
@@ -308,7 +308,7 @@
<div>自定义考试</div>
<div>
<el-checkbox v-model="exam.onlyQuestion">只显示试题</el-checkbox>
<el-button style="margin-left: 10px;" @click="saveContent(3)" type="primary" > </el-button>
<el-button :loading="loading" style="margin-left: 10px;" @click="saveContent(3)" type="primary" > </el-button>
<el-button style="margin-left: 10px;" @click="deleteContent(3)" type="danger" > </el-button>
</div>
</div>
@@ -322,7 +322,7 @@
-->
<el-form-item label="考试时长">
<el-col :span="8">
<el-input v-model="exam.info.testDuration" placeholder="20-120">
<el-input size="mini" v-model="exam.info.testDuration" placeholder="20-120">
<template slot="append">分钟</template>
</el-input>
</el-col>
@@ -331,9 +331,9 @@
<el-input-number v-model="exam.info.times" :min="0" :max="10" label="0表不限制"></el-input-number>
</el-form-item>
</el-col> -->
<el-col :span="9">
<el-col :span="12">
<el-form-item label="及格线">
<el-input placeholder="20-120" v-model="exam.info.passLine">
<el-input size="mini" placeholder="20-100" :maxlength="3" v-model="exam.info.passLine">
<template slot="append">%</template>
</el-input>
</el-form-item>
@@ -376,9 +376,9 @@
<el-radio :label="2">最后一次</el-radio>
</el-radio-group>
</el-col>
<el-col :span="15">
<el-col :span="16">
<el-form-item label="百分制">
<el-checkbox v-model="exam.info.percentScore">按百分制显示成绩实际成绩*100/实际总分</el-checkbox>
<el-checkbox v-model="exam.info.percentScore">实际成绩*100/实际总分</el-checkbox>
</el-form-item>
</el-col>
</el-form-item>
@@ -559,6 +559,7 @@
},
data(){
return {
loading:false,
converStatus:4,
courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
@@ -683,13 +684,14 @@
testDuration:30,
showAnalysis:false,
showAnswer:false,
times:1,
times:0,
qnum:0,//试题数量,只是模式是随机生成试题时才会有
arrange:0,
scoringType:1,
passLine:60,
randomMode:false,
percentScore:true,
passLine:60,
paperType:1,//自定义试卷
paperId:'',//试卷的id,只有paperType为2的时间才会有值
info:'',//考试说明
@@ -945,6 +947,7 @@
this.$message.error("请先保存课程信息再添加课件等信息");
return;
}
this.loading=true;
let postData={
type:10,
content:null,
@@ -1036,6 +1039,9 @@
}else{
this.$message.error(res.message);
}
this.loading=false;
}).catch(err=>{
this.loading=false;
})
},
deleteContent(index){

View File

@@ -9,6 +9,7 @@
<script>
import { mapGetters} from 'vuex';
import apiFollow from "@/api/phase2/userfollow.js"
import apiUser from "@/api/system/user.js";
export default{
name:"followButton",
props:{
@@ -50,14 +51,15 @@
watch:{
has(newVal,oldVal){
this.has=newVal;
console.log(newVal,oldVal,'测试问题');
this.hasFollow=newVal;
if(newVal!=oldVal && this.auto){
this.autoCheck();
}
},
aid(newVal){
this.aid=newVal;
aid(newVal,oldVal){
//this.aid=newVal;
}
},
methods: {
@@ -105,7 +107,28 @@
if(res.status == 200) {
$this.hasFollow=true;
$this.$message.success("关注成功");
$this.$emit('add',$this.aid,$this.data);
// $this.$emit('add',$this.aid,$this.data);
let pageId = this.$xpage.getHomeId(this.$route);
if(pageId == this.userInfo.aid) {
apiUser.getByIds([this.aid]).then(rs => {
if (res.status == 200) {
let data = {
has:true,
userFollow:{
aid:res.result.aid,
followId:res.result.followId,
followTime:res.result.followTime,
id:res.result.id,
authorInfo:rs.result[0],
}
}
$this.$emit('add',data);
} else {
this.$message.error(res.message);
}
});
}
} else {
$this.$message.error("关注失败:"+res.message);
$this.$emit('error',$this.aid);
@@ -120,6 +143,7 @@
<style scoped>
.follow-btn{
cursor: pointer;
/* margin-top: 18px;
height: 40px;
width: 140px; */

View File

@@ -15,26 +15,28 @@
<course-image width="254px" height="144px" :course="item.info"></course-image>
</div>
<div class="data-cen pointer" @click="jumpDetail(item)">
<h6 class="course-tit portal-title-tow">{{item.info.courseName || item.contentInfo}}
<span class="sysType-name" v-if="item.info.sysType1 !='' && item.info.sysType1 != 0">{{sysTypeName(item.info.sysType1)}}</span>
<span class="sysType-name" v-if="item.info.sysType2 !='' && item.info.sysType2 != 0">{{sysTypeName(item.info.sysType2)}}</span>
<span class="sysType-name" v-if="item.info.sysType3 !='' && item.info.sysType3 != 0">{{sysTypeName(item.info.sysType3)}}</span>
<span class="score-info" v-if="toScore(item.info.lastScore) > 0">{{toScore(item.info.lastScore)}}</span>
<div class="tit-float" >
<h6 class="course-tit portal-title-tow">{{item.info.courseName || item.contentInfo}}
</h6>
<div class="sysType-box">
<span class="sysType-name" v-if="item.info.sysType1 !='' && item.info.sysType1 != 0">{{sysTypeName(item.info.sysType1)}}</span>
<span class="sysType-name" v-if="item.info.sysType2 !='' && item.info.sysType2 != 0">{{sysTypeName(item.info.sysType2)}}</span>
<span class="sysType-name" v-if="item.info.sysType3 !='' && item.info.sysType3 != 0">{{sysTypeName(item.info.sysType3)}}</span>
<span class="score-info" v-if="toScore(item.info.lastScore) > 0">{{toScore(item.info.lastScore)}}</span>
</div>
</div>
<p class="title-info">{{item.info.summary}}</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.eventTime}}</p>
</div>
<div style="width:150px">
<!-- <div class="follow-hide pointer" style="text-align: right;" v-if="!isDynamic && personal">
<span v-if="item.hidden">已隐藏</span>
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
</div> -->
<div class="btn-right">
<!-- <el-button class="btn" type="primary" @click="jumpDetail(item)">{{item.eventKey == 'Praise' ? '我也去学' : item.aid == userInfo.aid? '继续学习' : '我也去学'}}</el-button> -->
<el-button class="btn" type="primary" @click="jumpDetail(item)">{{personal? '继续学习' : '我也去学'}}</el-button>
</div>
</div>
<div class="btn-box">
<div class="btn-right">
<el-button class="btn" type="primary" @click="jumpDetail(item)">{{personal? '继续学习' : '我也去学'}}</el-button>
</div>
</div>
</div>
</li>
@@ -98,18 +100,34 @@
if(!data.contentId){
return;
}
console.log(data.info,'data.info')
if(!data.info.enabled || data.info.deleted){
this.$message.warning("此课程已停用或已删除");
return;
}
this.$router.push({ path: '/course/detail?id=', query: { id: data.contentId } });
this.$router.push({ path: '/course/studyindex?id=', query: { id: data.contentId } });
}
}
}
</script>
<style lang="scss" scoped>
.tit-float{
height: 25px;
}
.sysType-box{
float: left;
}
.sysType-name{
display: inline-block;
padding:0px 8px;
line-height: 24px;
font-size: 12px;
border-radius:2px;
margin-right: 8px;
color: #2C68FF;
height: 24px;
background: rgba(44,104,255,0.06);
}
.data-info-ul{
margin: 0;
// padding-top: 32px;
@@ -125,18 +143,7 @@
margin: 0;
font-size: 18px !important;
line-height: 25px;
.sysType-name{
display: inline-block;
padding:0px 8px;
// margin-top: 5px;
line-height: 24px;
font-size: 12px;
border-radius:2px;
margin-right: 8px;
color: #2C68FF;
height: 24px;
background: rgba(44,104,255,0.06);
}
float: left;
}
.title-info{
font-size: 14px;
@@ -144,7 +151,7 @@
margin-top: 14px;
}
.pro-line{
margin: 30px 0 16px 0;
margin: 22px 0 16px 0;
font-size: 14px;
color: #333333;
display: flex;

View File

@@ -1,11 +1,11 @@
<template>
<div>
<ul class="follow-top-tabs">
<li class="follow-home-title tabs-index" @click="tagTab(1)">{{userInfo.aid == pageId ?'我关注的人':'关注的人'}}<span v-if="active == 1" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(2)">{{userInfo.aid == pageId ?'关注我的人':'关注的人'}}<span v-if="active == 2" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(1)">{{userInfo.aid == pageId ?'我关注的人':'TA关注的人'}}<span v-if="active == 1" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(2)">{{userInfo.aid == pageId ?'关注我的人':'关注TA的人'}}<span v-if="active == 2" class="line"></span></li>
</ul>
<div v-show="active ==1">
<div class="follow-list" v-for="(item,index) in follow.list" :key="index">
<div class="follow-list" v-for="(item,index) in follow.list" :key="item.userFollow.id">
<div style="width:60px;height:60" @click="toHome(item.userFollow.authorInfo)">
<el-avatar shape="circle" style="width:60px;height:60px" size="small" :src="baseUrl+item.userFollow.authorInfo.avatar" v-if="item.userFollow.authorInfo.avatar"></el-avatar>
<div v-else class="uavatar">
@@ -37,7 +37,7 @@
-->
</div>
<!--分页没有加-->
<div style="text-align: center; margin-top:57px;" v-show="follow.count > 0">
<div style="text-align: center; margin-top:57px;" v-show="follow.count > follow.pageSize">
<el-pagination
background
@size-change="handleSizeChange"
@@ -74,7 +74,7 @@
<p class="portal-summary-text">{{maPage.userFollow.authorInfo.sign}}</p>
</div>
<div>
<followButton :has="maPage.has" :aid="maPage.userFollow.aid"></followButton>
<followButton data="maPage.userFollow" :has="maPage.has" :aid="maPage.userFollow.aid" @add="myFollowAdd" @cancel="myFollowCancel"></followButton>
</div>
<!--
<div v-if="pageId == userInfo.aid">
@@ -89,7 +89,7 @@
-->
</div>
<!--分页没有加-->
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
<div style="text-align: center; margin-top:57px;" v-show="followMe.count > followMe.pageSize">
<el-pagination
background
@size-change="handleSizeChange"
@@ -149,73 +149,97 @@ import apiUser from "@/api/system/user.js";
count:0,
pageIndex:1,
pageSize:10
},
page:{
pageIndex:1,
pageSize:10,
aid:'',
count:0
}
}
},
mounted() {
this.pageId = this.$xpage.getHomeId(this.$route);
this.$bus.$on('followIndex',(num)=>{
this.active = num;
})
this.pageId = this.$xpage.getHomeId(this.$route);
this.$bus.$on('followIndex',(num)=>{
this.active = num;
})
},
methods:{
toHome(ava) {
this.$router.push({path:this.$xpage.getHomePath(ava.aid)})
},
myCancelFollow(dataIndex){ //我关注的,我取消关注
//this.follow.list.splice(dataIndex,1);
},
myAddFollow(dataIndex){ //我关注的,取消关注
//this.follow.list.splice(dataIndex,1);
myCancelFollow(aid,delIdx){ //我关注的,取消关注操作
this.followMe.pageIndex=1;
this.getMyPage();
// console.log(aid,delIdx,'参数值');
// //先从我关注的人中员列表中移除
// //this.$nextTick(()=>{
// this.follow.list.splice(delIdx,1);
// //})
// // this.follow.list.forEach(one=>{
// // console.log(one.has,one.followId,'存在的用户');
// // })
// //检查“关注我的”人列表中是否有此人,有此设置设置关注状态
// this.followMe.list.some((fme,idx)=>{
// //console.log('关注我的:',fme.userFollow.aid,aid);
// if(fme.userFollow.aid==aid){
// fme.has=false;
// //console.log('设置关注状态');
// //this.$forceUpdate();
// return true
// }
// return false;
// });
},
myAddFollow(data){ //我关注的,添加关注
this.followMe.pageIndex=1;
this.getMyPage();
//检查“关注我的”人列表中是否有此人,有此设置设置关注状态
// this.followMe.list.some((item,idx)=>{
// //console.log('我关注的用户:'+item.userFollow.followId);
// if(item.userFollow.aid==data.userFollow.followId){
// item.has=true;
// return true
// }
// return false;
// });
},
myFollowAdd(data) { //关注我的,添加关注
//直接刷新“我关注的”人员列表
this.follow.pageIndex=1;
this.getPage();
// 因为转移到新的列表,所以这里需要转化一下
// let check=this.follow.list.some((item,idx)=>{
// console.log('我关注的用户:'+item.userFollow.followId,data.userFollow.followId);
// if(item.userFollow.followId==data.userFollow.followId){
// item.has=true;
// return true
// }
// return false;
// });
// if(!check){
// this.follow.list.push(data);//同步添加“我关注的”列表中
// }
},
myFollowCancel(aid){ //关注我的,取消关注
//同步,从我关注的列表中移除
this.follow.pageIndex=1;
this.getPage();
//console.log('移除用户:'+aid);
// let delIdx=-1;
// this.follow.list.forEach((item,idx)=>{
// //console.log('我关注的用户:'+item.userFollow.followId);
// if(item.userFollow.followId==aid){
// delIdx=idx;
// }
// });
// if(delIdx>-1){
// this.follow.list.splice(delIdx,1);
// }
},
toFollow(item) {
let id = '';
if(this.active == 2) {
id = item.userFollow.aid;
} else {
id = item.userFollow.followId;
}
apiFollow.save(id).then(res=>{
if(res.status == 200) {
// this.$message.success("关注成功");
this.getMyPage();
} else {
this.$message.error(res.message);
}
})
},
resetActive(){
// this.active=1;
this.follow={list:[],count:0,pageIndex:1,pageSize:10},
this.followMe={list:[],count:0,pageIndex:1,pageSize:10},
this.tagTab(this.active);
},
cancel(item,idx) {
let $this=this;
let id = '';
if(idx == 2) {
id = item.userFollow.aid;
} else {
id = item.userFollow.followId;
}
apiFollow.remove(id).then(res=>{
if(res.status == 200) {
if(idx == 2) {
this.getMyPage()
} else {
this.getPage();
}
// $this.follow.list.splice(idx,1);
}
})
},//展示全部
tagTab(num) {
this.active = num;
if(num == 1) {
@@ -250,37 +274,41 @@ import apiUser from "@/api/system/user.js";
},
getMyPage() {//关注我的,关注他的
this.page.aid = this.pageId;
this.page.pageIndex=this.followMe.pageIndex;
this.page.pageSize=this.followMe.pageSize;
let params={
aid:this.pageId,
pageIndex:this.followMe.pageIndex,
pageSize:this.followMe.pageSize
}
let $this=this;
apiFollow.mypage(this.page).then(res=>{
apiFollow.mypage(params).then(res=>{
if(res.status== 200) {
$this.followMe.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
this.followMe.list = res.result.list;
$this.followMe.list = res.result.list;
//console.log(this.mypageList,'this.mypageList');
this.getUserData(res.result.list,2);
$this.getUserData(res.result.list,2);
}else{
console.log('加载关注我数据错误:'+res.message);
}
})
},
getPage() { //我关注的,他关注的
this.page.aid = this.pageId;
this.page.pageIndex=this.follow.pageIndex;
this.page.pageSize=this.follow.pageSize;
let params={
aid:this.pageId,
pageIndex:this.follow.pageIndex,
pageSize:this.follow.pageSize
}
let $this=this;
apiFollow.page(this.page).then(res=>{
apiFollow.page(params).then(res=>{
if(res.status== 200) {
$this.follow.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
this.follow.list = res.result.list;
this.getUserData(res.result.list, 1);
$this.follow.list = res.result.list;
$this.getUserData(res.result.list, 1);
}
})
},
@@ -305,8 +333,9 @@ import apiUser from "@/api/system/user.js";
} else {
return false;
}
});
});
});
});
this.$forceUpdate()
} else {
this.$message.error(res.message);
}

View File

@@ -23,7 +23,7 @@
<router-link v-if="pageId == userInfo.aid" to="/user/Setting"><span class="content-one-info pointer" style="line-height: 30px;">个人设置</span></router-link>
<span v-if="pageId == userInfo.aid" style="margin-left:10px;line-height: 30px;" class="content-one-info" ><router-link to="/uc/study/courses" class="pointer" style="color:#0060FF;">个人中心</router-link></span>
<span class="content-one-info" v-if="pageId != userInfo.aid && !isFollowHas" @click="toFollow()">关注TA</span>
<spap class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</spap>
<span class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</span>
<el-button type="text" round class="btn-user" > <router-link :to="'/home/'+pageId+'/leaving'">{{pageId == userInfo.aid ? '留言板':'去留言'}}<i class="el-icon-arrow-right"></i> </router-link> </el-button>
<!-- <div style="height: 30px;margin-top: 10px;"> -->
@@ -119,6 +119,7 @@
}
},
mounted() {
this.pageId = this.$xpage.getHomeId(this.$route);
this.sex = this.userInfo.sex;
// 判断路由是进入的学员默认页面就重置setCurIdentity
@@ -131,6 +132,7 @@
if(this.pageId !== this.userInfo.aid) {
this.followHas();
}
},
methods:{
cancelFollow() {
@@ -350,6 +352,7 @@
}
}
.content-one-info{
cursor: pointer;
display: inline-block;
line-height: 30px;
width: 80px;

View File

@@ -50,7 +50,7 @@
</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}">
<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>
<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>

View File

@@ -15,7 +15,7 @@
<div class="comment" v-for="(com,comIdx) in list" :key="com.id">
<div class="comment-top">
<div class="comment-author">
<authorInfo :avatar="com.avatar" :name="com.name" :sex="com.sex" :info="com.orgInfo" :sign="com.sign"></authorInfo>
<authorInfo :avatar="com.avatar" :name="com.name" :sex="com.sex" :info="com.orgInfo" :sign="com.sign" :aid="com.sysCreateAid"></authorInfo>
</div>
</div>
<div class="comment-body" >
@@ -23,7 +23,7 @@
<div class="comment-content" @click="cancelReply()">
<span class="play-time" v-if="com.playTime>0"><img :src="`${webBaseUrl}/images/coteplay.png`" alt=""> {{ getHMS(com.playTime) }}</span>
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(com)"></span>
<span v-if="com.content.length>170" @click="changeIsAll(com)">
<span v-if="com.content.length>170 || com.content.split('\n').length>3" @click="changeIsAll(com)">
{{com.isAll?'收起':'全文'}}
</span>
</div>
@@ -47,7 +47,7 @@
<div class="comment" v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="com.showAll || replyIdx<3" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
<div class="comment-top">
<div class="comment-author">
<authorInfo :avatar="reply.avatar" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
<authorInfo :avatar="reply.avatar" :aid="reply.sysCreateAid" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
<span style="margin-left: 10px;color: #8590A6;font-size:14px; ">
<!-- <svg-icon style="font-size: 10px;margin-right: 0;" icon-class="triangle"></svg-icon> -->
<span>回复了</span>
@@ -59,7 +59,7 @@
<div class="comment-info" >
<div class="comment-content" @click="cancelReply()">
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
<span v-if="reply.content.length>170 || com.content.split('\n').length>3" @click="changeIsAll(reply)">
{{reply.isAll?'收起':'全文'}}
</span>
</div>
@@ -371,7 +371,7 @@
objType:6,
objId:item.id
}
//console.log(item,'item'); 去读取回复
//console.log(item,'item'); 去读取回复
//2022-11-2日与产品润博确认笔记回复只显示一级不显示二级: "value",
//直接修改后台,查询全部
apiComment.listQuery(query).then(res2=>{
@@ -474,6 +474,8 @@
let content = '';
content = item.content.replace(/(\n){2,}/,'<br>');
item.content = content;
var hlength = item.content.split("\n").length;
if(!item.isAll && hlength > 3 ) {return item.content.slice(0, 5) + "...";}
if(!item.isAll && item.content && item.content.length > 150) {
return item.content.slice(0, 150) + "...";
}

View File

@@ -124,13 +124,13 @@
</div>
</div>
</div>
<gonggao></gonggao>
<popup v-if="popupConfig.id" :config="popupConfig"></popup>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import apiMessage from '@/api/system/message.js';
import gonggao from '@/components/Gonggao.vue';
import popup from '@/components/AlertPopup.vue';
import apiBoeCourse from '@/api/boe/course.js';
import {userAvatarText} from "@/utils/tools.js";
export default {
@@ -153,7 +153,7 @@ export default {
}
},
components:{gonggao},
components:{popup},
computed: {
...mapGetters(['userInfo', 'userMsg','identity','studyTaskCount']),
@@ -169,7 +169,7 @@ export default {
},
data() {
return {
showGonggao:true,
popupConfig:{},
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
findType: '1',
keyword: '',
@@ -181,8 +181,26 @@ export default {
this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg');
this.loadBoeData();
this.loadPopupConfig();
},
methods: {
loadPopupConfig(){
this.popupConfig={
id:'123',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
height:'500px',
title:'用户体验调研',//标题
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:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'BOEU学习平台产品团队',
type:0,//0表不控制
}
},
setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden);
},

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>问答</span>{{item.title}}
<div style="width: 100%;">问答{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
<!-- 旧版 -->
@@ -136,6 +139,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -33,6 +33,7 @@
<script>
import usergroupApi from "@/api/modules/usergroup";
import orgApi from "@/api/system/organiza";
import apiUserBasic from "@/api/boe/userbasic";
export default{
props:{
@@ -42,12 +43,16 @@
dlgShow:false,
orgName:'',
chooseOrg:{},
treeData:[],
departData:[],
departProps: {
children: 'children',
label: 'name'
}
}
},
mounted() {
},
methods:{
handleClose(){
@@ -63,17 +68,82 @@
}else{
return (<span class="custom-tree-node"> <span>{node.label}</span></span>);
}
},
initTree(){
apiUserBasic.findOrgsByKeyword('').then(rs=>{
rs.result.forEach(item=>{
let node={
id:item.id,
name:item.name,
children:[]
}
if(item.treeChildList){
node.children=[];
}
this.treeData.push(node)
});
});
},
readTreeNode(treeNode,listData){//递归加载组织机构树信息
let $this=this;
listData.forEach(item=>{
let node={
id:item.id,
name:item.name,
hrbpId:item.hrbpId,
children:[]
}
if(item.treeChildList){
$this.readTreeNode(node,item.treeChildList);
}
treeNode.children.push(node);
})
},
loadNode(node, resolve) {
var parentId = null;
if (node.level === 0) {
resolve([{name:'组织机构树',id:'-1'}]);
}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);
// });
}else{
parentId = node.data.id;
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
// if(rs.status==200){
// let treeList=[];
// if(rs.result.length>0 && rs.result[0].treeChildList){
// rs.result[0].treeChildList.forEach(item=>{
// let node={
// id:item.id,
// name:item.name,
// hrbpId:item.hrbpId,
// children:[]
// }
// if(item.treeChildList){
// $this.readTreeNode(node,item.treeChildList);
// }
// treeList.push(node);
// });
// }
// resolve(treeList);
// }else{
// resolve([]);
// }
// });
}
usergroupApi.userOrgs(parentId).then(res =>{
if (res.status == 200) {
@@ -92,9 +162,7 @@
this.multipleSelection = val;
},
handleDepartNodeClick(data){
this.chooseOrg.id = data.id;
this.chooseOrg.name=data.name;
this.chooseOrg.kid=data.kid;
this.chooseOrg = data;
},
confirm(){
if(!this.chooseOrg.id){

View File

@@ -128,6 +128,9 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
//this.orgInfo=cutFullName(testName,1);
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
this.loadUserStat();
this.$bus.$on('u-Currency',(num)=>{
this.statData.uvalue = num;
})
},
methods:{

View File

@@ -399,7 +399,7 @@ export default {
// if(item.courseType==10){
// return this.webBaseUrl+'/course/micro?id='+item.courseId;
// }else if(item.courseType==20){
return this.webBaseUrl+'/course/detail?id='+item.courseId;
return this.webBaseUrl+'/course/studyindex?id='+item.courseId;
// }
}