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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -17,9 +17,9 @@
<script> <script>
if(window.top != window.self){ // if(window.top != window.self){
window.top.location=window.self.location; // window.top.location=window.self.location;
} // }
//u-pre.boe.com b82bf0f37925106413d857aa98e47533 //u-pre.boe.com b82bf0f37925106413d857aa98e47533
//u.boe.com ea89f02dca369037a73c5e3907e2c14a //u.boe.com ea89f02dca369037a73c5e3907e2c14a
var _hmt = _hmt || []; var _hmt = _hmt || [];

View File

@@ -50,9 +50,10 @@ const formRequest=axios.create({
return res.data return res.data
}else{ }else{
if(code === 401){ if(code === 401){
store.dispatch('LogOut').then(() => { //Message({message: msg, type: 'error'});
location.href = this.webBaseUrl + ReLoginUrl; store.dispatch('LogOut').then(() => {
}) location.href = this.webBaseUrl + ReLoginUrl;
})
}else if(code===403){ }else if(code===403){
var msg='当前操作没有权限'; var msg='当前操作没有权限';
Message({message: msg, type: 'error'}); Message({message: msg, type: 'error'});
@@ -141,13 +142,25 @@ const postJson=function(baseURL,url,postData){
}) })
} }
const postPdf=function(baseURL,url,postData){
return request({
baseURL,
url: url,
responseType: 'blob',
method: 'post',
data:postData,
headers:{'Content-Type':'application/pdf'},
})
}
// 导出文件请求定义 // 导出文件请求定义
const postJsonToFile=function(baseURL,url,postData){ const postJsonToFile=function(baseURL,url,postData){
return request({ return request({
baseURL, baseURL,
url: url, url: url,
method: 'post', method: 'post',
data:postData, data:postData,
headers:{'Content-Type':'application/json;charset=utf-8'}, headers:{'Content-Type':'application/json;charset=utf-8'},
responseType: 'blob' responseType: 'blob'
}) })
@@ -191,4 +204,5 @@ export default {
postJsonToFile, postJsonToFile,
put, put,
putJson, putJson,
postPdf,
} }

View File

@@ -47,6 +47,7 @@ const formRequest=axios.create({
Promise.reject(error) Promise.reject(error)
}); });
formRequest.interceptors.response.use(res => { formRequest.interceptors.response.use(res => {
console.log(res);
const code = res.data.status || 200; const code = res.data.status || 200;
if(code===200){ if(code===200){
return res.data return res.data
@@ -67,7 +68,7 @@ const formRequest=axios.create({
} }
}, },
error => { error => {
console.log('err' + error) console.log('err',error)
let { message } = error; let { message } = error;
if (message == "Network Error") { if (message == "Network Error") {
message = "网络异常,请稍后重试"; message = "网络异常,请稍后重试";

View File

@@ -23,6 +23,10 @@ const findOrgTreeByOrgId = function(orgId) {
return ajax.postJson(baseURL,'/org/childOrgs',{orgId}); return ajax.postJson(baseURL,'/org/childOrgs',{orgId});
} }
const getOrgInfo = function(orgId) {
return ajax.postJson(baseURL,'/org/info',{orgId});
}
/**根据用户id获取用户的信息*/ /**根据用户id获取用户的信息*/
const getUserInfoById = function(id) { const getUserInfoById = function(id) {
return ajax.postJson(baseURL,'/user/list',{id}); return ajax.postJson(baseURL,'/user/list',{id});
@@ -36,6 +40,7 @@ const getUserCrowds = function() {
return ajax.postJson(baseURL,'/audience/userAudiences',{}); return ajax.postJson(baseURL,'/audience/userAudiences',{});
} }
/** /**
* 获取hrbp数据 * 获取hrbp数据
*/ */
@@ -46,6 +51,7 @@ const getOrgHrbpInfo = function(orgId) {
export default { export default {
userParentOrg, userParentOrg,
findOrgsByKeyword, findOrgsByKeyword,
getOrgInfo,
findOrgTreeByOrgId, findOrgTreeByOrgId,
getUserInfoById, getUserInfoById,
getUserCrowds, getUserCrowds,

View File

@@ -130,10 +130,6 @@ const exportPdfPre=function (data){
return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/pdf-detail',data); return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/pdf-detail',data);
} }
/** /**
* 导出pdf * 导出pdf
* @param{ * @param{
@@ -141,33 +137,7 @@ const exportPdfPre=function (data){
* } * }
* */ * */
const exportPdf=function (udata){ const exportPdf=function (udata){
// return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/exportPdf',data); return ajax.postPdf(baseURL,'/xboe/subgroup/m/noteinfo/expPdf',udata);
return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/expPdf',udata);
// var url = baseURL + '/xboe/subgroup/m/noteinfo/exportPdf';
// axios({
// method: 'POST',
// url: url,
// data:udata,
// responseType: 'blob',
// headers: { 'XBOE-Access-Token':getToken(),'Content-Type':'application/pdf;charset=utf-8'}
// }).then(res => {
// //resolveBlob(res, mimeMap.zip);
// console.log(res);
// const aLink = document.createElement('a')
// var blob = new Blob([res.request.response], { type: 'application/pdf' })
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
//var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
//var contentDisposition = decodeURI(res.headers['content-disposition'])
//var result = patt.exec(contentDisposition)
//var fileName = result[1]
//fileName = fileName.replace(/\"/g, '')
// aLink.href = URL.createObjectURL(blob)
// aLink.setAttribute('download','我的笔记.pdf') // 设置下载文件名称
// document.body.appendChild(aLink)
// aLink.click()
// document.body.removeChild(aLink)
// })
} }
/** /**

View File

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

View File

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

View File

@@ -560,10 +560,10 @@ export default {
}, },
confirmChooseOrg(orgInfo){ confirmChooseOrg(orgInfo){
//console.log(orgInfo,'orgInfo'); //console.log(orgInfo,'orgInfo');
// if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){ if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
// this.$message.error("此机构无HRBP审核人信息请重新选择"); this.$message.error("此机构无HRBP审核人信息请重新选择");
// return; return;
// } }
this.orgName=orgInfo.name; this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid; //kid已不存在 this.orgKid=orgInfo.kid; //kid已不存在
this.courseInfo.orgId=orgInfo.id; this.courseInfo.orgId=orgInfo.id;
@@ -598,30 +598,32 @@ export default {
}), }),
loadUserGroup(){ loadUserGroup(){
let $this=this; let $this=this;
apiUserGroup.findByName('').then(rs=>{ // apiUserGroup.findByName('').then(rs=>{
if(rs.status==200){ // if(rs.status==200){
let crowdList=[]; // let crowdList=[];
rs.result.forEach(item=>{ // rs.result.forEach(item=>{
crowdList.push({ // crowdList.push({
id:item.key, // id:item.key,
name:item.value, // 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 disabled:false
}) })
}) });
this.userGroupList=crowdList; 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) { resOwnerName(code) {
if (code == '') { if (code == '') {
@@ -666,6 +668,7 @@ export default {
//console.log(this.$refs.weikePanel,'this.$refs.weikePanel'); //console.log(this.$refs.weikePanel,'this.$refs.weikePanel');
//this.$refs.weikePanel.init(); //this.$refs.weikePanel.init();
//this.$refs.onlineCourse.resetData(); //this.$refs.onlineCourse.resetData();
//刷新用户受众
//初始化显示内容 //初始化显示内容
this.btnLoading = false; this.btnLoading = false;
this.curStepIndex = 1; //打开都是第一步 this.curStepIndex = 1; //打开都是第一步
@@ -716,13 +719,20 @@ export default {
} }
this.orgKid=''; this.orgKid='';
if(this.courseInfo.orgId){ if(this.courseInfo.orgId){
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ // apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){ // if(rrs.status==200){
this.orgName=rrs.result.name; // this.orgName=rrs.result.name;
this.orgKid=rrs.result.kid; // this.orgKid=rrs.result.kid;
this.orgNamePath=rrs.result.namePath; // 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 { } else {
@@ -829,10 +839,10 @@ export default {
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{ apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
if(ors.status==200){ if(ors.status==200){
$this.courseInfo.orgId=ors.result.id; $this.courseInfo.orgId=ors.result.id;
apiOrg.getSimple(ors.result.id).then(rrs=>{ apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){ if(rrs.status==200){
$this.orgName=rrs.result.name; $this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid; //$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath; $this.orgNamePath=rrs.result.namePath;
}else{ }else{
this.courseInfo.orgId=''; this.courseInfo.orgId='';
@@ -845,16 +855,26 @@ export default {
}) })
}else{ }else{
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ // apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){ // if(rrs.status==200){
$this.orgName=rrs.result.name; // $this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid; // $this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath; // $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{ }else{
$this.courseInfo.orgId=''; $this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择'); $this.$message.error('资源归属已变更,请重新选择');
} }
}) });
} }
this.resOwnerArray=[]; this.resOwnerArray=[];
@@ -1381,30 +1401,31 @@ export default {
}; };
this.btnLoading = true; this.btnLoading = true;
let $this = this; let $this = this;
console.log(this.courseInfo.orgId,'this.courseInfo.orgId') //console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息 //先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
// apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{ 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){
if(rs.status==200 && rs.result.length>0){ postData.auditUser={
let hrbpUser=rs.result[0]; email:rs.result.email,
postData.auditUser={ code:rs.result.userNo,
email:hrbpUser.email, name:rs.result.name,
code:hrbpUser.user_no, aid:rs.result.id,
name:hrbpUser.real_name, orgId:rs.result.orgId
kid:hrbpUser.user_id, }
orgId:hrbpUser.orgnization_id postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
}
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.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 => { apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false; //this.btnLoading=false;
@@ -1429,6 +1450,10 @@ export default {
$this.btnLoading = false; $this.btnLoading = false;
this.$message.error('获取审核HRBP失败:'+rs.message); 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.total=paper.items.length;
this.paper =paper; this.paper =paper;
//console.log(this.paper); //console.log(this.paper);
this.curItem=paper.items[this.curIndex]; this.curItem=paper.items[this.curIndex];
this.startTime=new Date();//记录开始时间 this.startTime=new Date();//记录开始时间
this.timerValue=this.info.testDuration; this.timerValue=this.info.testDuration;
@@ -335,12 +336,12 @@ export default {
showClose:false, showClose:false,
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.submitTest() this.submitTest(score);
}).catch(()=>{ }).catch(()=>{
}) })
}else{ }else{
this.submitTest() this.submitTest(score);
} }
}, },
countTest(){ //计算考试的分数 countTest(){ //计算考试的分数
@@ -382,11 +383,20 @@ export default {
noAnswers.push(idx+1); noAnswers.push(idx+1);
} }
let allRight = true; let allRight = true;
//console.log('用户的答案',item.userAnswer);
item.options.forEach(it =>{ item.options.forEach(it =>{
if(it.answer && item.userAnswer.indexOf(it.id)==-1) { //console.log('选项',it.answer,it.id,item.userAnswer.indexOf(it.id));
allRight=false; 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){ if(allRight){
scoreNum+=item.score; scoreNum+=item.score;
} }
@@ -404,14 +414,15 @@ export default {
//console.log('本次得分='+this.lastScore); //console.log('本次得分='+this.lastScore);
return this.lastScore; return this.lastScore;
}, },
submitTest(){ //提交处理 submitTest(testScore){ //提交处理
//清空提示 //清空提示
if(this.timer){ if(this.timer){
window.clearInterval(this.timer); window.clearInterval(this.timer);
} }
let now=new Date(); let now=new Date();
let testScore=this.countTest(); if(!testScore){
testScore=this.countTest();
}
let postData={ let postData={
studyId:this.studyId,// studyId:this.studyId,//
studyItemId:this.studyItemId,//前面已经给了 studyItemId:this.studyItemId,//前面已经给了

View File

@@ -64,7 +64,7 @@
</div> </div>
<div class="learning-border" ></div> <div class="learning-border" ></div>
<div class="learning-info" style="margin-left:22px"> <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 class="learning-an"><span>{{statData.uvalue}}</span></div>
</div> </div>
<!-- <!--

View File

@@ -87,7 +87,7 @@
</div> </div>
<div class="comment-time portal-time"> <div class="comment-time portal-time">
<showTime :time="com.sysCreateTime"></showTime> <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>
<div class="comment-btns"> <div class="comment-btns">
@@ -113,7 +113,7 @@
</div> </div>
<!--回复内容--> <!--回复内容-->
<div v-if="com.replyList && com.replyList.length>0"> <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" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
<div class="comment-top"> <div class="comment-top">
<div class="comment-author"> <div class="comment-author">
@@ -135,7 +135,7 @@
</div> </div>
<div class="comment-time portal-time"> <div class="comment-time portal-time">
<showTime :time="reply.sysCreateTime"></showTime> <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>
<div class="comment-btns"> <div class="comment-btns">
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> --> <!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
@@ -159,7 +159,7 @@
</div> </div>
</div> </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> </div>
</div> </div>
@@ -384,7 +384,8 @@
}, },
methods: { methods: {
loadReplyMore(item){ loadReplyMore(item){
item.showAll=true; item.showNum=item.showNum+3;
//item.showAll=true;
}, },
loadMore() { loadMore() {
this.pageIndex +=1; this.pageIndex +=1;
@@ -455,6 +456,7 @@
let ids=[]; let ids=[];
let allList=[]; let allList=[];
res.result.list.forEach(item=>{ res.result.list.forEach(item=>{
item.showNum=3;
item.answers=item.replys; item.answers=item.replys;
item.showAll=false; item.showAll=false;
item.avatar=''; item.avatar='';

View File

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

View File

@@ -29,7 +29,7 @@
</div> </div>
<div class="comment-time portal-time"> <div class="comment-time portal-time">
<showTime :time="com.sysCreateTime"></showTime> <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>
<div v-if="replyInfo.parentId==com.id" class="comment-reply" style="padding-bottom: 5px;margin-top: 20px;"> <div v-if="replyInfo.parentId==com.id" class="comment-reply" style="padding-bottom: 5px;margin-top: 20px;">
<div style="width:100%;display:flex;"> <div style="width:100%;display:flex;">
@@ -65,7 +65,7 @@
</div> </div>
<div class="comment-time portal-time"> <div class="comment-time portal-time">
<showTime :time="reply.sysCreateTime"></showTime> <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>
</div> </div>
<!--发布回复--> <!--发布回复-->

View File

@@ -188,10 +188,10 @@ export default {
this.popupConfig={ this.popupConfig={
id:'123',//数据id id:'123',//数据id
closeable:false,//不可以关闭 closeable:false,//不可以关闭
width:'500px',//宽度 width:'472px',//宽度
height:'500px', height:'500px',
title:'用户体验调研',//标题 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',//背景图 bgImage:'dlg_bg_pen',//背景图
pcUrl:'https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx',//点击后打开的地址,最好是使用相对地址 pcUrl:'https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx',//点击后打开的地址,最好是使用相对地址
h5Url:'', h5Url:'',

View File

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

View File

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

View File

@@ -94,6 +94,7 @@ export const pages=[
]; ];
export const iframes=[ export const iframes=[
{title:'嵌入测试', path:'/iframe/index',hidden:false,component:'portal/iframe'},
{title:'课件管理', path:'/iframe/course/coursewares',hidden:false,component:'course/Courseware'}, {title:'课件管理', path:'/iframe/course/coursewares',hidden:false,component:'course/Courseware'},
{title:'课程管理', path:'/iframe/course/manages',hidden:false,component:'course/ManageList'}, {title:'课程管理', path:'/iframe/course/manages',hidden:false,component:'course/ManageList'},
{title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'}, {title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'},

View File

@@ -410,7 +410,7 @@ export function translate(field) {
/**格式化人数的文档 ,学习人数,关注人数等*/ /**格式化人数的文档 ,学习人数,关注人数等*/
export function formatUserNumber(num) { export function formatUserNumber(num) {
let rsNum =0; let rsNum =0;
if(num<5){return 0;} if(num<5){return num;}
if(num>=5 && num<= 10){return 10 +"+";} if(num>=5 && num<= 10){return 10 +"+";}
if(num<=94){ if(num<=94){
rsNum=Math.round((num)/10)*10; rsNum=Math.round((num)/10)*10;

View File

@@ -75,7 +75,7 @@
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" width="200" show-overflow-tooltip> <el-table-column label="名称" prop="name" width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span> <span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内容分类" prop="sysType" sortable width="240px"> <el-table-column label="内容分类" prop="sysType" sortable width="240px">
@@ -776,22 +776,22 @@ export default {
const {status} = await apiCourse.del(params); const {status} = await apiCourse.del(params);
if(status === 200) { if(status === 200) {
this.$message.success('操作成功!'); //只是之前发布过的课程删除才可 this.$message.success('操作成功!'); //只是之前发布过的课程删除才可
if(!row.erasable){ // if(!row.erasable){
let event = { // let event = {
key: "CourseDelete",//被管理员删除 // key: "CourseDelete",//被管理员删除
title: '被管理员删除课程',//事件的标题 // title: '被管理员删除课程',//事件的标题
parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的 // parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的
content: '被管理员删除课程',//事件的内容 // content: '被管理员删除课程',//事件的内容
objId: row.id,//关联的id // objId: row.id,//关联的id
objType: "1",//关联的类型 // objType: "1",//关联的类型
objInfo:row.name, // objInfo:row.name,
aid: this.userInfo.aid, //当前登录人的id // aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名 // aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1 // status: 1 //状态直接写1
} // }
this.$store.dispatch("userTrigger", event); // this.$store.dispatch("userTrigger", event);
} // }
this.searchData(); this.searchData();
} }
} catch (error) { } catch (error) {

View File

@@ -208,66 +208,66 @@ export default {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
//新的提交流程 //新的提交流程
// apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{ apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
// if(rs.status==200 && rs.result){ if(rs.status==200 && rs.result){
// let req={ let req={
// courseId:row.id, courseId:row.id,
// email:rs.result.email, email:rs.result.email,
// courseUser:row.sysCreateBy, courseUser:row.sysCreateBy,
// courseName:row.name, courseName:row.name,
// ucode:rs.result.userNo, ucode:rs.result.userNo,
// auditUser:rs.result.name, auditUser:rs.result.name,
// //ukid:hrbpUser.user_id, //ukid:hrbpUser.user_id,
// orgId:row.orgId, orgId:row.orgId,
// orgName:rs.result.orgNamePath +'/'+rs.result.name orgName:rs.result.orgNamePath +'/'+rs.result.name
// } }
// apiCourse.sumbits(req).then(res=>{ apiCourse.sumbits(req).then(res=>{
// if(res.status==200){ if(res.status==200){
// $this.$message.success('提交成功'); $this.$message.success('提交成功');
// row.status=2 row.status=2
// } }
// if(res.status==400){ if(res.status==400){
// $this.$message.error('提交失败:'+res.message); $this.$message.error('提交失败:'+res.message);
// } }
// }) })
// }else{ }else{
// $this.$message.error("获取HRBP审核人员失败:"+rs.message); $this.$message.error("获取HRBP审核人员失败:"+rs.message);
// } }
// }); });
apiOrg.getSimple(row.orgId).then(rrs=>{ // apiOrg.getSimple(row.orgId).then(rrs=>{
if(rrs.status==200){ // if(rrs.status==200){
apiHRBP.getHRBP(rrs.result.kid).then(rs=>{ // apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
if(rs.status==200 && rs.result.length>0){ // if(rs.status==200 && rs.result.length>0){
let hrbpUser=rs.result[0]; // let hrbpUser=rs.result[0];
let req={ // let req={
courseId:row.id, // courseId:row.id,
email:hrbpUser.email, // email:hrbpUser.email,
courseUser:row.sysCreateBy, // courseUser:row.sysCreateBy,
courseName:row.name, // courseName:row.name,
ucode:hrbpUser.user_no, // ucode:hrbpUser.user_no,
auditUser:hrbpUser.real_name, // auditUser:hrbpUser.real_name,
ukid:hrbpUser.user_id, // ukid:hrbpUser.user_id,
orgId:row.orgId, // orgId:row.orgId,
orgName:rs.result.orgnization_name_path+'/'+rrs.result.name // orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
} // }
apiCourse.sumbits(req).then(res=>{ // apiCourse.sumbits(req).then(res=>{
if(res.status==200){ // if(res.status==200){
$this.$message.success('提交成功'); // $this.$message.success('提交成功');
row.status=2 // row.status=2
} // }
if(res.status==400){ // if(res.status==400){
$this.$message.error('提交失败:'+res.message); // $this.$message.error('提交失败:'+res.message);
} // }
}) // })
}else{ // }else{
$this.$message.error("获取HRBP审核人员失败:"+rs.message); // $this.$message.error("获取HRBP审核人员失败:"+rs.message);
} // }
}) // })
}else{ // }else{
$this.$message.error("处理资源归属失败,请重新设置资源归属"); // $this.$message.error("处理资源归属失败,请重新设置资源归属");
} // }
}) // })
}) })
}, },
delItem(row) { delItem(row) {
@@ -286,7 +286,7 @@ export default {
const { status } = await apiCourse.del(params); const { status } = await apiCourse.del(params);
if (status === 200) { if (status === 200) {
this.$message.success('操作成功!'); this.$message.success('操作成功!');
//发送自己删除课程的事件,审核通过的,自己不能删除了 //事件移到后端处理
// if(!row.erasable){ // if(!row.erasable){
// let event = { // let event = {
// key: "DeleteCourse",//被管理员删除 // key: "DeleteCourse",//被管理员删除

View File

@@ -667,6 +667,7 @@ import {examType,numberToLetter} from '@/utils/tools.js';
import usergroupApi from "@/api/modules/usergroup"; import usergroupApi from "@/api/modules/usergroup";
import pushRecordApi from "@/api/modules/pushRecord"; import pushRecordApi from "@/api/modules/pushRecord";
import {toScoreTow} from '@/utils/tools.js' import {toScoreTow} from '@/utils/tools.js'
import apiUserBasic from '@/api/boe/userbasic.js';
export default { export default {
name: 'articleItems', name: 'articleItems',
computed: { computed: {
@@ -836,6 +837,23 @@ export default {
this.pushData.count = res.result.count; this.pushData.count = res.result.count;
} }
}); });
//从接口中获取受众数据,22/11/28
// apiUserBasic.getUserCrowds().then(res=>{
// if(res.status==200){
// let list=[];
// res.result.forEach(crowd=>{
// list.push({
// id:crowd.id,
// kid:crowd.kid,
// name:crowd.audienceName,
// audienceType:crowd.audienceType,
// type:crowd.type
// })
// });
// this.pushData.data=list
// }
// })
}, },
getFindPage(){// 考试推送记录 getFindPage(){// 考试推送记录
pushRecordApi.pushList(this.pushData.row.id).then(res=>{ pushRecordApi.pushList(this.pushData.row.id).then(res=>{

View File

@@ -35,7 +35,7 @@
</div> </div>
<!-- </el-card> --> <!-- </el-card> -->
<div style="margin-top:10px;"> <div style="margin-top:10px;">
<interactBar :type="2" :data="articleDetailData" :theme='1' :shares="true" ></interactBar> <interactBar v-if="articleDetailData.id" :type="2" :data="articleDetailData" :theme='1' :shares="true" ></interactBar>
</div> </div>
</div> </div>
<!--评论, 修改边距调整--> <!--评论, 修改边距调整-->

View File

@@ -78,7 +78,7 @@
</div> </div>
<div> <div>
<div style="display:inline-block;"> <div style="display:inline-block;">
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar> <interactBar v-if="caseDetail.id" :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
</div> </div>
<div style="display:inline-block;margin: 0 20px;"> <div style="display:inline-block;margin: 0 20px;">
<i style="font-size: 25px;color:#6E7B84;" @click="goTop()" class="el-icon-arrow-up"></i> <i style="font-size: 25px;color:#6E7B84;" @click="goTop()" class="el-icon-arrow-up"></i>

View File

@@ -0,0 +1,38 @@
<template>
<div class="box">
<iframe :src="url" style="width: 100%;height: 100%;margin-top: 30px;" frameborder="0"></iframe>
</div>
</template>
<script>
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
export default {
components: {
portalHeader,
portalFooter
},
data(){
return {
id: "",
url: "",
boeUrl:process.env.VUE_APP_BOE_WEB_URL
}
},
mounted() {
this.id = this.$route.query.id;
this.type = this.$route.query.type;
let urlPre=window.location.protocol+'//'+window.location.host;
this.url= `${urlPre}/pc/iframe/course/coursewares`
},
methods:{
}
}
</script>
<style lang="scss" >
.box{
// width: 100%;
height: 100%;
}
</style>

View File

@@ -81,7 +81,7 @@
<div class="answer-time"> <div class="answer-time">
<div> <!--之前显示时间的位置--> </div> <div> <!--之前显示时间的位置--> </div>
<div style="margin-right: 10px;"> <div style="margin-right: 10px;">
<interactBar :type="5" :data="item" :comments="false" :shares="false" :views="false"></interactBar> <interactBar :type="5" :pageType="4" :pageParams="detailData.id" :data="item" :comments="false" :shares="false" :views="false"></interactBar>
</div> </div>
</div> </div>
<div class="answer-boot"> <div class="answer-boot">

View File

@@ -67,14 +67,15 @@
<span style="padding-right: 10px;"><el-checkbox v-model="item.checked" @change="setCheckAll(item)"></el-checkbox></span> <span style="padding-right: 10px;"><el-checkbox v-model="item.checked" @change="setCheckAll(item)"></el-checkbox></span>
<span v-if="!item.isRead" style="font-size:12px;padding:5px 7px; border-radius: 2px;background: #FF6562;color: #fff;margin-right: 5px">未读</span> <span v-if="!item.isRead" style="font-size:12px;padding:5px 7px; border-radius: 2px;background: #FF6562;color: #fff;margin-right: 5px">未读</span>
<span v-else style="font-size:14px;padding:5px 7px; background: #eee; border-radius: 2px; color: #666666;margin-right: 5px">已读</span> <span v-else style="font-size:14px;padding:5px 7px; background: #eee; border-radius: 2px; color: #666666;margin-right: 5px">已读</span>
<a :href="returnRouter(item)"><span>{{ item.title }}</span></a> <!-- <a :href="returnRouter(item)"> -->
<span style="cursor: pointer;" @click="returnRouter(item)">{{ item.title }}</span>
</div> </div>
</div> </div>
<div class="msg-body"> <div class="msg-body">
<a :href="returnRouter(item)"> <!-- <a :href="returnRouter(item)"> -->
<div class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div> <div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
<div class="msg-body-content" v-else>{{item.tip}}</div> <div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-else>{{item.tip}}</div>
</a> <!-- </a> -->
<div class="msg-body-but"> <div class="msg-body-but">
<el-button type="danger" plain @click="delItem(item)">删除</el-button> <el-button type="danger" plain @click="delItem(item)">删除</el-button>
</div> </div>
@@ -314,22 +315,40 @@ export default {
// 跳转详情事件11 // 跳转详情事件11
returnRouter(item) { returnRouter(item) {
apiMessage.updateIsRead([item.id]).then(res => {
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
// this.queryMessage(true)
item.isRead = true;
}
});
if(item.pageUrl && item.pageUrl.length>10){ if(item.pageUrl && item.pageUrl.length>10){
return item.pageUrl; location.href = item.pageUrl;
}else{ }else{
if (item.refType == 2) { if(item.pageType && item.pageParams){
return this.webBaseUrl + '/article/detail?id=' + item.refId; if(item.pageType==1){
} else if (item.refType == 4||item.refType == 5) { this.$router.push('/course/studyindex?id='+ item.pageParams);
return this.webBaseUrl + '/qa/answer?id=' + item.refId; }else if(item.pageType==2){
} else { this.$router.push('/article/detail?id='+ item.pageParams);
// if (item.conType == 10) { }else if(item.pageType==3){
// return this.webBaseUrl + '/course/micro?id=' + item.refId; this.$router.push('/case/detail?id='+ item.pageParams);
// } else if (item.conType == 20) { }else if(item.pageType==4){
return this.webBaseUrl + '/course/detail?id=' + item.refId; this.$router.push('/qa/answer?id='+ item.pageParams);
// } }
}else{
if (item.refType == 2) {
this.$router.push('/article/detail?id='+ item.refId);
}else if(item.refType==3){
this.$router.push('/case/detail?id='+ item.refId);
}else if (item.refType == 4||item.refType == 5) {
this.$router.push('/qa/answer?id='+ item.refId);
} else if (item.refType == 1){
this.$router.push('/course/studyindex?id='+ item.refId);
}
} }
} }
} }
} }
}; };

View File

@@ -814,6 +814,8 @@
refId:this.courseInfo.id, refId:this.courseInfo.id,
refType:1, refType:1,
source:1, source:1,
pageType:1,
pageParams:this.courseInfo.id,
pageUrl:location.href, pageUrl:location.href,
sendAid:this.userInfo.aid, sendAid:this.userInfo.aid,
sendName:this.userInfo.name, sendName:this.userInfo.name,

View File

@@ -351,41 +351,17 @@ export default {
} }
if(this.exportType == '1') { if(this.exportType == '1') {
apiNote.exportPdf(data).then(res=>{ apiNote.exportPdf(data).then(res=>{
console.log("导出pdf完成");
const link = document.createElement('a');// 创建a标签 const link = document.createElement('a');// 创建a标签
// let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型 let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型
let blob = new Blob([res],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); // 设置文件类型 link.style.display = "none";
link.style.display = "none"; link.href = URL.createObjectURL(blob); // 创建URL
link.href = URL.createObjectURL(blob); // 创建URL link.setAttribute("download", "我的笔记.pdf");
link.setAttribute("download", "我的笔记.pdf"); document.body.appendChild(link);
document.body.appendChild(link); link.click();
link.click(); link.remove(); // 一次性的用完就删除a标签
link.remove(); // 一次性的用完就删除a标签 this.dialogVisible = false;
this.dialogVisible = false;
}) })
//apiNote.exportPdf(data);
// apiNote.exportPdf(data).then(res=>{
// if(res.status) {
// this.$message.error('导出失败');
// } else {
// const link = document.createElement('a');// 创建a标签
// // let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型
// let blob = new Blob([res],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); // 设置文件类型
// link.style.display = "none";
// link.href = URL.createObjectURL(blob); // 创建URL
// link.setAttribute("download", "我的笔记.pdf");
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
// this.dialogVisible = false;
// }
// })
} else { } else {
let data = { let data = {
orderType:this.orderType, orderType:this.orderType,