mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 22:06:43 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal
This commit is contained in:
BIN
public/images/gonggao/close1.png
Normal file
BIN
public/images/gonggao/close1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -17,9 +17,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
if(window.top != window.self){
|
||||
window.top.location=window.self.location;
|
||||
}
|
||||
// if(window.top != window.self){
|
||||
// window.top.location=window.self.location;
|
||||
// }
|
||||
//u-pre.boe.com b82bf0f37925106413d857aa98e47533
|
||||
//u.boe.com ea89f02dca369037a73c5e3907e2c14a
|
||||
var _hmt = _hmt || [];
|
||||
|
||||
@@ -50,9 +50,10 @@ const formRequest=axios.create({
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
//Message({message: msg, type: 'error'});
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
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){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
@@ -191,4 +204,5 @@ export default {
|
||||
postJsonToFile,
|
||||
put,
|
||||
putJson,
|
||||
postPdf,
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ const formRequest=axios.create({
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
console.log(res);
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
@@ -67,7 +68,7 @@ const formRequest=axios.create({
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
console.log('err',error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "网络异常,请稍后重试";
|
||||
|
||||
@@ -23,6 +23,10 @@ const findOrgTreeByOrgId = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/childOrgs',{orgId});
|
||||
}
|
||||
|
||||
const getOrgInfo = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/info',{orgId});
|
||||
}
|
||||
|
||||
/**根据用户id获取用户的信息*/
|
||||
const getUserInfoById = function(id) {
|
||||
return ajax.postJson(baseURL,'/user/list',{id});
|
||||
@@ -36,6 +40,7 @@ const getUserCrowds = function() {
|
||||
return ajax.postJson(baseURL,'/audience/userAudiences',{});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取hrbp数据
|
||||
*/
|
||||
@@ -46,6 +51,7 @@ const getOrgHrbpInfo = function(orgId) {
|
||||
export default {
|
||||
userParentOrg,
|
||||
findOrgsByKeyword,
|
||||
getOrgInfo,
|
||||
findOrgTreeByOrgId,
|
||||
getUserInfoById,
|
||||
getUserCrowds,
|
||||
|
||||
@@ -130,10 +130,6 @@ const exportPdfPre=function (data){
|
||||
return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/pdf-detail',data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出pdf
|
||||
* @param{
|
||||
@@ -141,33 +137,7 @@ const exportPdfPre=function (data){
|
||||
* }
|
||||
* */
|
||||
const exportPdf=function (udata){
|
||||
// return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/exportPdf',data);
|
||||
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)
|
||||
|
||||
// })
|
||||
return ajax.postPdf(baseURL,'/xboe/subgroup/m/noteinfo/expPdf',udata);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
|
||||
.dlg-box{
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
//background: transparent !important;
|
||||
padding:120px 60px 20px 50px;
|
||||
}
|
||||
|
||||
@@ -229,6 +229,7 @@ export default {
|
||||
height: 30px;
|
||||
.uc-coures-name-left{
|
||||
flex: 1;
|
||||
font-size: 18px;
|
||||
}
|
||||
.canfavo{
|
||||
margin-left:auto;
|
||||
|
||||
@@ -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;
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
@@ -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,//前面已经给了
|
||||
|
||||
@@ -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>
|
||||
<!--
|
||||
|
||||
@@ -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;">加载更多>></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;">加载更多>></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='';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
<!--发布回复-->
|
||||
|
||||
@@ -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:'',
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -94,6 +94,7 @@ export const pages=[
|
||||
|
||||
];
|
||||
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/manages',hidden:false,component:'course/ManageList'},
|
||||
{title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'},
|
||||
|
||||
@@ -410,7 +410,7 @@ export function translate(field) {
|
||||
/**格式化人数的文档 ,学习人数,关注人数等*/
|
||||
export function formatUserNumber(num) {
|
||||
let rsNum =0;
|
||||
if(num<5){return 0;}
|
||||
if(num<5){return num;}
|
||||
if(num>=5 && num<= 10){return 10 +"+";}
|
||||
if(num<=94){
|
||||
rsNum=Math.round((num)/10)*10;
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" width="200" show-overflow-tooltip>
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="内容分类" prop="sysType" sortable width="240px">
|
||||
@@ -776,22 +776,22 @@ export default {
|
||||
const {status} = await apiCourse.del(params);
|
||||
if(status === 200) {
|
||||
this.$message.success('操作成功!'); //只是之前发布过的课程删除才可
|
||||
if(!row.erasable){
|
||||
let event = {
|
||||
key: "CourseDelete",//被管理员删除
|
||||
title: '被管理员删除课程',//事件的标题
|
||||
parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的
|
||||
content: '被管理员删除课程',//事件的内容
|
||||
objId: row.id,//关联的id
|
||||
objType: "1",//关联的类型
|
||||
objInfo:row.name,
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
}
|
||||
|
||||
// if(!row.erasable){
|
||||
// let event = {
|
||||
// key: "CourseDelete",//被管理员删除
|
||||
// title: '被管理员删除课程',//事件的标题
|
||||
// parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的
|
||||
// content: '被管理员删除课程',//事件的内容
|
||||
// objId: row.id,//关联的id
|
||||
// objType: "1",//关联的类型
|
||||
// objInfo:row.name,
|
||||
// aid: this.userInfo.aid, //当前登录人的id
|
||||
// aname: this.userInfo.name,//当前人的姓名
|
||||
// status: 1 //状态,直接写1
|
||||
// }
|
||||
// this.$store.dispatch("userTrigger", event);
|
||||
// }
|
||||
|
||||
this.searchData();
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -208,66 +208,66 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(()=>{
|
||||
//新的提交流程
|
||||
// apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
|
||||
// if(rs.status==200 && rs.result){
|
||||
// let req={
|
||||
// courseId:row.id,
|
||||
// email:rs.result.email,
|
||||
// courseUser:row.sysCreateBy,
|
||||
// courseName:row.name,
|
||||
// ucode:rs.result.userNo,
|
||||
// auditUser:rs.result.name,
|
||||
// //ukid:hrbpUser.user_id,
|
||||
// orgId:row.orgId,
|
||||
// orgName:rs.result.orgNamePath +'/'+rs.result.name
|
||||
// }
|
||||
// apiCourse.sumbits(req).then(res=>{
|
||||
// if(res.status==200){
|
||||
// $this.$message.success('提交成功');
|
||||
// row.status=2
|
||||
// }
|
||||
// if(res.status==400){
|
||||
// $this.$message.error('提交失败:'+res.message);
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// $this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||
// }
|
||||
// });
|
||||
apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
|
||||
if(rs.status==200 && rs.result){
|
||||
let req={
|
||||
courseId:row.id,
|
||||
email:rs.result.email,
|
||||
courseUser:row.sysCreateBy,
|
||||
courseName:row.name,
|
||||
ucode:rs.result.userNo,
|
||||
auditUser:rs.result.name,
|
||||
//ukid:hrbpUser.user_id,
|
||||
orgId:row.orgId,
|
||||
orgName:rs.result.orgNamePath +'/'+rs.result.name
|
||||
}
|
||||
apiCourse.sumbits(req).then(res=>{
|
||||
if(res.status==200){
|
||||
$this.$message.success('提交成功');
|
||||
row.status=2
|
||||
}
|
||||
if(res.status==400){
|
||||
$this.$message.error('提交失败:'+res.message);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||
}
|
||||
});
|
||||
|
||||
apiOrg.getSimple(row.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
|
||||
if(rs.status==200 && rs.result.length>0){
|
||||
let hrbpUser=rs.result[0];
|
||||
let req={
|
||||
courseId:row.id,
|
||||
email:hrbpUser.email,
|
||||
courseUser:row.sysCreateBy,
|
||||
courseName:row.name,
|
||||
ucode:hrbpUser.user_no,
|
||||
auditUser:hrbpUser.real_name,
|
||||
ukid:hrbpUser.user_id,
|
||||
orgId:row.orgId,
|
||||
orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
|
||||
}
|
||||
apiCourse.sumbits(req).then(res=>{
|
||||
if(res.status==200){
|
||||
$this.$message.success('提交成功');
|
||||
row.status=2
|
||||
}
|
||||
if(res.status==400){
|
||||
$this.$message.error('提交失败:'+res.message);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$this.$message.error("处理资源归属失败,请重新设置资源归属");
|
||||
}
|
||||
})
|
||||
// apiOrg.getSimple(row.orgId).then(rrs=>{
|
||||
// if(rrs.status==200){
|
||||
// apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
|
||||
// if(rs.status==200 && rs.result.length>0){
|
||||
// let hrbpUser=rs.result[0];
|
||||
// let req={
|
||||
// courseId:row.id,
|
||||
// email:hrbpUser.email,
|
||||
// courseUser:row.sysCreateBy,
|
||||
// courseName:row.name,
|
||||
// ucode:hrbpUser.user_no,
|
||||
// auditUser:hrbpUser.real_name,
|
||||
// ukid:hrbpUser.user_id,
|
||||
// orgId:row.orgId,
|
||||
// orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
|
||||
// }
|
||||
// apiCourse.sumbits(req).then(res=>{
|
||||
// if(res.status==200){
|
||||
// $this.$message.success('提交成功');
|
||||
// row.status=2
|
||||
// }
|
||||
// if(res.status==400){
|
||||
// $this.$message.error('提交失败:'+res.message);
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// $this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// $this.$message.error("处理资源归属失败,请重新设置资源归属");
|
||||
// }
|
||||
// })
|
||||
})
|
||||
},
|
||||
delItem(row) {
|
||||
@@ -286,7 +286,7 @@ export default {
|
||||
const { status } = await apiCourse.del(params);
|
||||
if (status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
//发送自己删除课程的事件,审核通过的,自己不能删除了
|
||||
//事件移到后端处理
|
||||
// if(!row.erasable){
|
||||
// let event = {
|
||||
// key: "DeleteCourse",//被管理员删除
|
||||
|
||||
@@ -667,6 +667,7 @@ import {examType,numberToLetter} from '@/utils/tools.js';
|
||||
import usergroupApi from "@/api/modules/usergroup";
|
||||
import pushRecordApi from "@/api/modules/pushRecord";
|
||||
import {toScoreTow} from '@/utils/tools.js'
|
||||
import apiUserBasic from '@/api/boe/userbasic.js';
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
computed: {
|
||||
@@ -836,6 +837,23 @@ export default {
|
||||
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(){// 考试推送记录
|
||||
pushRecordApi.pushList(this.pushData.row.id).then(res=>{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
<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>
|
||||
<!--评论, 修改边距调整-->
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<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 style="display:inline-block;margin: 0 20px;">
|
||||
<i style="font-size: 25px;color:#6E7B84;" @click="goTop()" class="el-icon-arrow-up"></i>
|
||||
|
||||
38
src/views/portal/iframe.vue
Normal file
38
src/views/portal/iframe.vue
Normal 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>
|
||||
@@ -81,7 +81,7 @@
|
||||
<div class="answer-time">
|
||||
<div> <!--之前显示时间的位置--> </div>
|
||||
<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 class="answer-boot">
|
||||
|
||||
@@ -67,14 +67,15 @@
|
||||
<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-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 class="msg-body">
|
||||
<a :href="returnRouter(item)">
|
||||
<div class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
|
||||
<div class="msg-body-content" v-else>{{item.tip}}</div>
|
||||
</a>
|
||||
<!-- <a :href="returnRouter(item)"> -->
|
||||
<div style="cursor: pointer;" @click="returnRouter(item)" 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-else>{{item.tip}}</div>
|
||||
<!-- </a> -->
|
||||
<div class="msg-body-but">
|
||||
<el-button type="danger" plain @click="delItem(item)">删除</el-button>
|
||||
</div>
|
||||
@@ -314,22 +315,40 @@ export default {
|
||||
|
||||
// 跳转详情事件11
|
||||
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){
|
||||
return item.pageUrl;
|
||||
location.href = item.pageUrl;
|
||||
}else{
|
||||
if (item.refType == 2) {
|
||||
return this.webBaseUrl + '/article/detail?id=' + item.refId;
|
||||
} else if (item.refType == 4||item.refType == 5) {
|
||||
return this.webBaseUrl + '/qa/answer?id=' + item.refId;
|
||||
} else {
|
||||
// if (item.conType == 10) {
|
||||
// return this.webBaseUrl + '/course/micro?id=' + item.refId;
|
||||
// } else if (item.conType == 20) {
|
||||
return this.webBaseUrl + '/course/detail?id=' + item.refId;
|
||||
// }
|
||||
if(item.pageType && item.pageParams){
|
||||
if(item.pageType==1){
|
||||
this.$router.push('/course/studyindex?id='+ item.pageParams);
|
||||
}else if(item.pageType==2){
|
||||
this.$router.push('/article/detail?id='+ item.pageParams);
|
||||
}else if(item.pageType==3){
|
||||
this.$router.push('/case/detail?id='+ item.pageParams);
|
||||
}else if(item.pageType==4){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -814,6 +814,8 @@
|
||||
refId:this.courseInfo.id,
|
||||
refType:1,
|
||||
source:1,
|
||||
pageType:1,
|
||||
pageParams:this.courseInfo.id,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName:this.userInfo.name,
|
||||
|
||||
@@ -351,41 +351,17 @@ export default {
|
||||
}
|
||||
|
||||
if(this.exportType == '1') {
|
||||
|
||||
|
||||
|
||||
apiNote.exportPdf(data).then(res=>{
|
||||
console.log("导出pdf完成");
|
||||
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();
|
||||
link.remove(); // 一次性的,用完就删除a标签
|
||||
this.dialogVisible = false;
|
||||
let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob); // 创建URL
|
||||
link.setAttribute("download", "我的笔记.pdf");
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove(); // 一次性的,用完就删除a标签
|
||||
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 {
|
||||
let data = {
|
||||
orderType:this.orderType,
|
||||
|
||||
Reference in New Issue
Block a user