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

This commit is contained in:
dongruihua
2022-11-10 11:02:58 +08:00
29 changed files with 344 additions and 194 deletions

View File

@@ -25,12 +25,13 @@ const del=function (id){
/**
* 回复或者删除留言
* @param{
* id
* reply 回复内容
* parentId 父id
* topId 一级id
* content 回复内容
* }
* */
const answer=function (data){
return ajax.post(baseURL,'/xboe/subgroup/m/guest/answer',data);
return ajax.postJson(baseURL,'/xboe/subgroup/m/guest/answer',data);
}
/**

View File

@@ -3,9 +3,15 @@
<div class="article-list" v-for="(item, idx) in items" :key="idx" @click="jumpDetail(item)">
<div class="article-info">
<div class="article-info-title one-line-ellipsis">
<span class="titleContent" >
<div class="titleContent" >
<span style="float: right;">
<el-button class="btncolor" @click.stop="editItem(item.id)" type="text" icon="el-icon-edit">编辑</el-button>
<el-button style="margin-left: 30px;" class="btncolor" @click.stop="delItem(item)" type="text" icon="el-icon-delete">删除</el-button>
</span>
{{ item.title }}
</span>
</div>
</div>
<div class="art-head two-line-ellipsis">
<div class="article-info-summary">
@@ -65,7 +71,7 @@ export default {
}
},
mounted() {
console.log(this.items)
},
methods: {
classFilter(status){
@@ -197,6 +203,11 @@ export default {
font-size: 14px;
}
}
.btncolor{
color: #8590A6;
font-size: 14px;
}
.one-line-ellipsis {
width: 100%;
text-overflow: ellipsis;

View File

@@ -305,7 +305,7 @@ export default {
homeworkInfo: {},
examInfo: {},
assessInfo: {},
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
btnLoading: false,
curCFile:{},//课件内容
coursewareInfo: {

View File

@@ -366,7 +366,7 @@
data(){
return {
converStatus:4,
fileBaseUrl:this.$xpage.constants.fileBaseUrl,
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
curPdfPath:'',
curCFile:{},//当前课件的内容
comTypes:[

View File

@@ -149,7 +149,7 @@
show-word-limit
:rows="3"
v-model="courseInfo.summary"
placeholder="请尽量填写课程简介(限255字以内),用于列表中显示,可以让用户更容易了解课程信息">
placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
</el-input>
</el-form-item>
</el-col>
@@ -258,9 +258,9 @@
<el-form-item label="目标人群" required>
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item label="受众">
<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-option v-for="item in userGroupList" :key="item.key" :label="item.value" :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>
@@ -303,10 +303,10 @@
<el-input
type="textarea"
show-word-limit
maxlength="150"
maxlength="255"
:rows="5"
v-model="courseInfo.summary"
placeholder="请尽量填写课程简介(限255字以内),用于列表中显示,可以让用户更容易了解课程信息">
placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
</el-input>
</el-form-item>
<!-- v-if="!weike.onlyRequired" -->
@@ -843,14 +843,25 @@ export default {
let crowdList=[];
if(result.crowds && result.crowds.length>0){
result.crowds.forEach(crowd=>{
crowdList.push({
let newCrowd={
key:crowd.groupId,
value:crowd.groupName,
disabled:false,
text:''
})
}
crowdList.push(newCrowd);
let hasUG=$this.userGroupList.some(ug=>{
return ug.key==crowd.groupId;
});
if(!hasUG){
newCrowd.disabled=true;
$this.userGroupList.push(newCrowd);
}
});
}
this.courseCrowds=crowdList;
//反向看userGroupList是否有
//课程图片
if (this.courseInfo.coverImg != '') {
this.courseCoverurl = this.fileUrl+this.courseInfo.coverImg;

View File

@@ -2,7 +2,7 @@
<div class="answer-list">
<ul v-if="list.length > 0">
<li class="answer-list-index" v-for="item in list" :key="item.id">
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px">
<p class="portal-summary-text" style="margin-bottom:18px">
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
<span v-if="item.hidden">已隐藏</span>
@@ -27,11 +27,11 @@
</div>
</li>
</ul>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-answer.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有回答</p>
</div>
</div> -->
</div>
</template>
@@ -78,6 +78,10 @@
},
methods:{
jumpDetail(item){
if(item.deleted){
this.$message.warning("此内容已删除");
return;
}
this.$router.push('/qa/answer?id='+item.contentId)
},
emitHide(id) {

View File

@@ -2,7 +2,7 @@
<div class="article-list">
<ul v-if="list.length > 0">
<li class="article-list-index" v-for="item in list" :key="item.id">
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px">
<p class="portal-summary-text" style="margin-bottom:18px">
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right" >
@@ -31,11 +31,11 @@
</div>
</li>
</ul>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" style="width:150px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-article.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有文章</p>
</div>
</div> -->
</div>
</template>
@@ -78,6 +78,10 @@
},
methods:{
jumpDetail(item){
if(item.info.deleted){
this.$message.warning("此文章已删除");
return;
}
this.$router.push('/article/detail?id='+item.contentId)
},
emitHide(id) {

View File

@@ -3,7 +3,7 @@
<div class="data-content" v-if="list.length >0">
<div :span="24" v-for="item in list" :key="item.id" class="case-list">
<div class="case-info">
<p v-if="isDynamic" class="portal-summary-text">
<p class="portal-summary-text">
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
@@ -55,11 +55,11 @@
</div>
</div>
</div>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-case.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有案例</p>
</div>
</div> -->
</div>
</template>
@@ -124,6 +124,13 @@
if(code==''|| code==undefined){return '';}
return this.orgDomainMap.get(code);
},
jumpDetail(item){
if(item.info.deleted){
this.$message.warning("此案例已删除");
return;
}
this.$router.push('/case/detail?id='+item.contentId)
},
}
}
</script>

View File

@@ -2,7 +2,7 @@
<div class="">
<ul class="data-info-ul" v-if="list.length > 0">
<li class="data-info" v-for="item in list" :key="item.id">
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px">
<p class="portal-summary-text" style="margin-bottom:18px">
<span v-if="!personal || isFollow">{{item.aname}}</span>
{{item.cusInfo}} <span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right" >
@@ -39,11 +39,11 @@
</li>
</ul>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有课程</p>
</div>
</div> -->
</div>
</template>
@@ -98,7 +98,11 @@
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 } });
}
}

View File

@@ -2,7 +2,7 @@
<div class="note-list">
<ul v-if="list.length > 0">
<li class="note-list-index" v-for="item in list" :key="item.id">
<p v-if="isDynamic" style="word-break:break-all;word-wrap:break-word;margin-bottom:18px" class="portal-summary-text">
<p style="word-break:break-all;word-wrap:break-word;margin-bottom:18px" class="portal-summary-text">
<span style="word-break:break-all;word-wrap:break-word;margin-bottom:18px" v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
@@ -24,11 +24,11 @@
</div>
</li>
</ul>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有笔记</p>
</div>
</div> -->
</div>
</template>
@@ -74,6 +74,10 @@
},
methods:{
jumpDetail(item){
if(item.info.deleted){
this.$message.warning("此笔记已删除");
return;
}
this.$router.push('/course/detail?id='+item.info.courseId)
},
emitHide(id) {

View File

@@ -2,7 +2,7 @@
<div class="put-list">
<ul v-if="list.length > 0">
<li class="put-list-index" v-for="item in list" :key="item.id">
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px;margin-top:10px">
<p class="portal-summary-text" style="margin-bottom:18px;margin-top:10px">
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
@@ -23,11 +23,11 @@
</div>
</li>
</ul>
<div v-else class="home-no-list">
<!-- <div v-else class="home-no-list">
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
<p v-if="isFollow" class="text">暂时没有动态</p>
<p v-else class="text">还没有提问</p>
</div>
</div> -->
</div>
</template>
@@ -74,7 +74,11 @@
},
jumpDetail(data) {
if(!data.id){
return;
return;
}
if(item.info.deleted){
this.$message.warning("此问题已删除");
return;
}
this.$router.push({ path: '/qa/answer', query: { id: data.id } });
},
@@ -115,4 +119,3 @@
}
</style>

View File

@@ -48,7 +48,7 @@
</el-tooltip>
<span class="interact-bar-value"> {{data.shares}}</span>
</div>
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<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;padding-top: 4px;" icon-class="eyes"></svg-icon>
</el-tooltip>

View File

@@ -155,7 +155,7 @@ export default {
components:{gonggao},
computed: {
...mapGetters(['userInfo', 'userMsg','identity']),
...mapGetters(['userInfo', 'userMsg','identity','studyTaskCount']),
avatarText(){
return userAvatarText(this.userInfo.name);
@@ -190,20 +190,25 @@ export default {
console.log('lll')
},
loadBoeData() {
let params = {
// keyword:this.keyword,
page: 1,
size: 10
// cmtask_status:this.cmtask_status,
// cmtask_name:this.cmtask_name,
};
apiBoeCourse.cmtaskList(params).then(res => {
if (res.status == 200 && res.result.count > 0) {
this.isTiao = true;
} else {
this.isTiao = false;
}
});
if(this.studyTaskCount>0){
this.isTiao = true;
}else{
this.isTiao = false;
}
// let params = {
// // keyword:this.keyword,
// page: 1,
// size: 10
// // cmtask_status:this.cmtask_status,
// // cmtask_name:this.cmtask_name,
// };
// apiBoeCourse.cmtaskList(params).then(res => {
// if (res.status == 200 && res.result.count > 0) {
// this.isTiao = true;
// } else {
// this.isTiao = false;
// }
// });
},
handleCommand(val) {
let urlPre=window.location.protocol+'//'+window.location.host;

View File

@@ -78,9 +78,9 @@
</div>
<div class="learning-info">
<!--
<div @click="jumrank" style="cursor: pointer;" class="ranking-link"> BOE 排行榜 >></div>
-->
</div>
</div>

View File

@@ -89,7 +89,20 @@ export const pages=[
]},
{title:'消息中心',path:'/message/center',hidden:false,children:[
{title:'消息中心',path:'index',component:'portal/user/Message',hidden:false}
]},
]}
];
export const iframes=[
{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'},
{title:'考试试卷管理', path:'/iframe/exam/papers',hidden:false,component:'exam/TestPaper'},
{title:'考试管理', path:'/iframe/exam/tests',hidden:false,component:'exam/ExamList'},
{title:'案例管理', path:'/iframe/cases/manages',hidden:false,component:'case/ManageList'},
{title:'文章管理', path:'/iframe/article/manages',hidden:false,component:'article/ManageList'},
{title:'问答管理', path:'/iframe/qa/manages',hidden:false,component:'qa/ManageList'},
{title:'待审核课程', path:'/iframe/course/noapproved',hidden:false,component:'examine/NotApproved'},
{title:'已审核课程', path:'/iframe/course/reviewed',hidden:false,component:'examine/Reviewed'}
]
export function routers(){
@@ -110,10 +123,17 @@ export function routers(){
delete sub.title;
})
};
myrouters.push(item);
n++;
});
//增加iframe的页面
iframes.forEach((item,index)=>{
item.name='iframe'+index;
item.alwaysShow=true;
item.meta={title:item.title,icon:"menu",noCache:true},
delete item.title;
myrouters.push(item);
})
return myrouters;
}

View File

@@ -17,9 +17,11 @@ router.beforeEach((to, from, next) => {
//动态计算文件的路径
let configPath=process.env.VUE_APP_FILE_RELATIVE_PATH;
if(configPath.startsWith('http')){
xpage.fileBaseUrl=configPath;
//xpage.fileBaseUrl=configPath;
xpage.constants.fileBaseUrl=configPath;
}else{
xpage.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath;
//xpage.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath;
xpage.constants.fileBaseUrl=window.location.protocol+'//'+window.location.host+configPath;
}

View File

@@ -1,6 +1,6 @@
/**页面设置的一些常量,方便,用于一个处理只写一处,不要多处写*/
const constants={
fileBaseUrl:'http://192.168.0.11/cdn/upload',
fileBaseUrl:'',
newLoginKey:'boe_new_login'
}

View File

@@ -64,10 +64,10 @@
</div>
<ul class="personal-ul">
<li>
<router-link to="/user/ranking">
<!-- <router-link to="/user/ranking"> -->
<span class="label">累计学习</span>
<p><span>{{userData.totalStudyHour}}</span>小时</p>
</router-link>
<!-- </router-link> -->
</li>
<!-- <li>
<span class="label">经验值等级</span>

View File

@@ -19,20 +19,20 @@
<p>{{item.content}}</p>
</div>
<div class="li-right">
<div class="replys-icon" v-if="userInfo.aid == pageId" @click="isReplys(item, idx)"><svg-icon style="margin-right: 4px;font-size: 14px;" icon-class="comment"></svg-icon>回复</div>
<div class="replys-icon" @click="showReplyInput(item, idx)"><svg-icon style="margin-right: 4px;font-size: 14px;" icon-class="comment"></svg-icon>回复</div>
<div style="margin-top:4px">
<interactBar :type="7" :data="item" :comments="false" :shares="false" :views="false" :favorites="false"></interactBar>
</div>
<div class="replys-icon" style="margin-right:0px;margin-left:10px" v-if="userInfo.aid == pageId || userInfo.aid == item.sysCreateAid" @click="delReply(item)"><svg-icon icon-class="notedel" style="margin-right: 4px;font-size: 14px;"></svg-icon>删除</div>
<div class="replys-icon" style="margin-right:0px;margin-left:10px" v-if="userInfo.aid == item.sysCreateAid" @click="delReply(item)"><svg-icon icon-class="notedel" style="margin-right: 4px;font-size: 14px;"></svg-icon>删除</div>
</div>
</div>
<!-- 回复框 -->
<div class="replys-input" style="padding-left: 60px;margin:10px 0" v-if="item.isReplys">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="replysContent" maxlength="200" show-word-limit></el-input>
<el-button class="lea-btn" type="primary" @click="addReplys()">回复</el-button>
<el-button class="lea-btn" type="primary" @click="addReplys(item,item)">回复</el-button>
</div>
<!-- 回复框 -->
<div class="lev-li-tow" v-for="(rep,index) in item.replysList" :key="index">
<div class="lev-li-tow" v-for="(rep,index) in item.replyList" :key="index">
<div class="lev-li">
<div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
<div class="li-text">
@@ -40,10 +40,15 @@
<p>{{rep.content}}</p>
</div>
<div class="li-right">
<div class="replys-icon" @click="showReplyInput(rep, idx)"><svg-icon style="margin-right: 4px;font-size: 14px;" icon-class="comment"></svg-icon>回复</div>
<!-- <interactBar :type="7" :data="rep" :comments="false" :shares="false" :views="false" :favorites="false"></interactBar> -->
<div class="replys-icon" style="margin-right:0px;margin-left:10px" v-if="userInfo.aid == pageId || userInfo.aid == item.sysCreateAid" @click="delReplySon(item,index)"><svg-icon icon-class="notedel" style="margin-right: 4px;font-size: 14px;"></svg-icon>删除</div>
<div class="replys-icon" style="margin-right:0px;margin-left:10px" v-if="userInfo.aid == item.sysCreateAid" @click="delReplySon(item,index)"><svg-icon icon-class="notedel" style="margin-right: 4px;font-size: 14px;"></svg-icon>删除</div>
</div>
</div>
<div class="replys-input" style="padding-left: 60px;margin:10px 0" v-if="rep.isReplys">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="replysContent" maxlength="200" show-word-limit></el-input>
<el-button class="lea-btn" type="primary" @click="addReplys(item,rep)">回复</el-button>
</div>
</div>
</li>
@@ -111,23 +116,14 @@
},
delReplySon(item,index) { //子级的删除手动删掉,调用保存接口
//修改后,替换为下面的情况
// apiGuestbook.del(item.id).then(res=>{
// if(res.status==200){
// item.replysList.splice(index,1);
// }else{
// this.$message.error('删除失败'+res.message);
// }
// });
item.replysList.splice(index,1);
let replysData = {
id:item.id,
reply:JSON.stringify(item.replysList)
}
apiGuestbook.answer(replysData).then(res=>{
if(res.status == 200) {
this.$message.success('删除留言成功');
apiGuestbook.del(item.id).then(res=>{
if(res.status==200){
item.replyList.splice(index,1);
this.$message.success('删除成功');
}else{
this.$message.error('删除失败'+res.message);
}
})
});
},
delReply(item) {
this.$confirm('此操作将永久删除该留言, 是否继续?', '提示', {
@@ -145,28 +141,54 @@
this.$message({type: 'info', message: '已取消删除'});
});
},
isReplys(item,idx) {
item.isReplys = true;
showReplyInput(item,idx) {
//关闭其它的
this.leavingList.forEach(top=>{
if(top.id!=item.id){
top.isReplys=false;
}
top.replyList.forEach(reply=>{
if(reply.id!=item.id){
reply.isReplys=false;
}
})
})
if(item.isReplys){
item.isReplys =false;
}else{
item.isReplys =true;
}
this.replysData.id = item.id;
this.replysData.reply = item.replysList;
//this.replysData.reply = item.replyList;
},
addReplys() {
addReplys(top,p) {
if(this.replysContent.trim().length == 0) {
return this.$message.warning('请填写内容!');
}
this.replysData.reply.push({
content: this.replysContent,
authorInfo:this.userInfo,
praises:0,
})
this.replysData.reply = JSON.stringify(this.replysData.reply);
apiGuestbook.answer(this.replysData).then(res=>{
let postData={
content:this.replysContent,
topId:top.id,
parentId:p.id,
level:2,
replys:0
}
let $this=this;
apiGuestbook.answer(postData).then(res=>{
this.replysContent = '';
if(res.status == 200) {
this.$message.success('留言发布成功');
this.leavingList.forEach(item=>{
item.isReplys = false;
})
this.$message.success('回复留言成功');
p.isReplys = false;
res.result.authorInfo=$this.userInfo;
top.replyList.push(res.result);
//直接追加到列表后面
// this.leavingList.forEach(item=>{
// item.isReplys = false;
// })
}else{
this.$message.error('回复留言失败');
}
})
},
@@ -175,19 +197,22 @@
apiGuestbook.givelist(this.page).then(res=>{
if(res.status == 200) {
this.count = res.result.count;
let ids=[];
res.result.list.forEach(item=>{
if(!item.replysList){
item.replysList = [];
if(!item.replyList){
item.replyList = [];
}
ids.push(item.sysCreateAid);
item.isReplys = false;
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
if(item.replys != '' && item.replys.length>10) {
item.replysList = JSON.parse(item.replys);
}
//if()
item.replyList.forEach(child=>{
child.isReplys=false;
child.authorInfo= { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
ids.push(child.sysCreateAid);
})
})
this.leavingList = res.result.list;
this.getUserData(res.result.list);
this.getUserData(ids,this.leavingList);
}
})
},
@@ -210,46 +235,37 @@
}
})
},
getUserData(list) {
if(this.pageId == this.userInfo.aid) {
let ids = list.map(item=> item.aid);
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.aid) {
item.authorInfo = author;
return true;
} else {
return false;
}
});
});
} else {
this.$message.error(res.message);
}
});
} else {
let ids = list.map(item=> item.sysCreateAid);
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.sysCreateAid) {
item.authorInfo = author;
return true;
} else {
return false;
}
});
});
} else {
this.$message.error(res.message);
}
});
}
getUserData(ids,list) {
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.sysCreateAid) {
item.authorInfo = author;
return true;
} else {
return false;
}
});
item.replyList.forEach(child=>{
res.result.some(author => {
if (author.aid == child.sysCreateAid) {
child.authorInfo = author;
return true;
} else {
return false;
}
});
})
});
} else {
this.$message.error(res.message);
}
});
},
handleSizeChange(val) {
this.page.pageSize = val;
@@ -278,6 +294,7 @@
position: relative;
.lea-btn {
float: right;
cursor: pointer;
margin-top: 26px;
width: 80px;
height: 30px;
@@ -333,6 +350,7 @@
margin-top: 40px;
.replys-icon{
width: 50px;
cursor: pointer;
color: #6E7B84;
font-size: 12px;
margin-right: 22px;

View File

@@ -16,30 +16,58 @@
<answer-list v-if="item.contentType == 5" :list="[item]" :isDynamic="true" :personal="personal" @hideIndex="dynamicHide"></answer-list>
<article-list v-if="item.contentType == 2" :list="[item]" :isDynamic="true" :personal="personal" @hideIndex="dynamicHide"></article-list>
</template>
<div v-if="!loading && allPageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
<p class="text">还没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="1" v-loading="loading1">
<span slot="label"><svg-icon icon-class="home-course" style="font-size: 30px;"></svg-icon><span class="tabs-info">课程</span></span>
<course-list :list="cousrePageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></course-list>
<div v-if="!loading1 && cousrePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
<p class="text">还没有课程</p>
</div>
</el-tab-pane>
<el-tab-pane name="3" v-loading="loading3">
<span slot="label"><svg-icon icon-class="home-case" style="font-size: 30px;"></svg-icon><span class="tabs-info">案例</span></span>
<case-list :list="casePageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></case-list>
<div v-if="!loading3 && casePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-case.png`" alt="" srcset="">
<p class="text">还没有案例</p>
</div>
</el-tab-pane>
<el-tab-pane name="6" v-loading="loading6">
<span slot="label"><svg-icon icon-class="home-note" style="font-size: 30px;"></svg-icon><span class="tabs-info">笔记</span></span>
<note-list :list="notePageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></note-list>
<div v-if="!loading6 && notePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
<p class="text">还没有笔记</p>
</div>
</el-tab-pane>
<el-tab-pane name="4" v-loading="loading4">
<span slot="label"><svg-icon icon-class="home-qa" style="font-size: 30px;"></svg-icon><span class="tabs-info">提问</span></span>
<put-list :list="qaPageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></put-list>
<div v-if="!loading4 && qaPageList.length==0" class="home-no-list">
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
<p class="text">还没有提问</p>
</div>
</el-tab-pane>
<el-tab-pane name="5" v-loading="loading5">
<span slot="label"><svg-icon icon-class="home-answer" style="font-size: 30px;"></svg-icon><span class="tabs-info">回答</span></span>
<answer-list :list="answerPageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></answer-list>
<div v-if="!loading5 && answerPageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-answer.png`" alt="" srcset="">
<p class="text">还没有回答</p>
</div>
</el-tab-pane>
<el-tab-pane name="2" v-loading="loading2">
<span slot="label"><svg-icon icon-class="home-article" style="font-size: 30px;"></svg-icon><span class="tabs-info">文章</span></span>
<article-list :list="articlePageList" :isDynamic="false" :personal="personal" @hideIndex="dynamicHide"></article-list>
<div v-if="!loading2 && articlePageList.length==0" class="home-no-list">
<img class="img" style="width:150px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-article.png`" alt="" srcset="">
<p class="text">还没有文章</p>
</div>
</el-tab-pane>
<el-tab-pane name="7">
<span slot="label"><svg-icon icon-class="home-follow" style="font-size: 30px;"></svg-icon><span class="tabs-info">关注</span></span>

View File

@@ -293,7 +293,7 @@ export default {
studyId: "",
tags: [],
numberToLetter: numberToLetter,
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
blobUrl:'',//播放的文件地址新添加采用blob方式
getType: getType,
courseType,

View File

@@ -29,21 +29,45 @@
</el-tab-pane>
<el-tab-pane name="1" label="课程" v-loading="loading1">
<course-list :list="cousrePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
<div v-if="!loading1 && cousrePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="6" label="笔记" v-loading="loading6">
<note-list :list="notePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></note-list>
<div v-if="!loading6 && notePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="3" label="案例" v-loading="loading3">
<case-list :list="casePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
<div v-if="!loading3 && casePageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-case.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="2" label="文章" v-loading="loading2">
<article-list :list="articlePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></article-list>
<div v-if="!loading2 && articlePageList.length==0" class="home-no-list">
<img class="img" style="width:150px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-article.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="4" label="提问" v-loading="loading4">
<put-list :list="qaPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></put-list>
<div v-if="!loading4 && qaPageList.length==0" class="home-no-list">
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<el-tab-pane name="5" label="回答" v-loading="loading5">
<answer-list :list="answerPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></answer-list>
<div v-if="!loading5 && answerPageList.length==0" class="home-no-list">
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-answer.png`" alt="" srcset="">
<p class="text">暂时没有动态</p>
</div>
</el-tab-pane>
<!-- <el-tab-pane name="7" label="关注">

View File

@@ -55,7 +55,7 @@
<div style="display: flex;justify-content:space-between;">
<div style="width: 150px;">
<author :avatar="qa.authorInfo.avatar" :name="qa.authorInfo.name" :sex="qa.authorInfo.sex"></author>
<author :aid="qa.sysCreateAid" :avatar="qa.authorInfo.avatar" :name="qa.authorInfo.name" :sex="qa.authorInfo.sex"></author>
</div>
<div><interactBar nodeWidth="60px" :readonly="true" :type="4" :data="qa" @addAnswers="qaAnswer(qa)" :shares="false" :comments="false" :answers="true" :clickAnswer="true" :views="false"></interactBar></div>
</div>

View File

@@ -2,7 +2,7 @@
<div>
<div style="display: flex;justify-content:space-between; padding: 12px 32px 10px 22px;">
<div style="display: flex;justify-content: flex-start;">
<div class="uc-center-page">报名</div>
<div class="uc-center-page">我报名</div>
<div style="margin-left:32px">
<el-select v-model="courseType" class="uc-select" clearable placeholder="类型">
<el-option label="全部类型" value='1'></el-option>

View File

@@ -292,7 +292,7 @@ export default {
totalContent: 0, //课程内容数量
pageCount: 0,
currentPage: 0,
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
contentList: [],
sectionList: [],
teachers: [],

View File

@@ -31,16 +31,23 @@
</div>
</div>
</div>
<div class="experience">
<div class="exp-hear">
<div class="exp-hear-text">
经验值排行榜
学习天数排行榜
<el-tooltip placement="top" effect="light">
<div slot="content" style="line-height:13px;">
<!--
所有用户经验值TOP排行榜单通过学习贡献等行为可以获得经验值 </br>
系统已经根据您在4月23日新系统上线之后产生的学习数据对经验值进行</br>
<span style="line-height:15px;">了初始化更早的数据以及老系统中产生的数据将在2022年底一次性</span></br>
补充到您的经验值中请您耐心等待
-->
所有用户学习天数TOP排行榜单每活跃学习1天可累计学习天数
</div>
<svg-icon style="margin-left: 5px;font-size:20px;padding-top: 4px;" icon-class="doubt"></svg-icon>
</el-tooltip>
@@ -53,9 +60,9 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="total">累计</el-dropdown-item>
<el-dropdown-item command="weeks">本周</el-dropdown-item>
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
<el-dropdown-item command="months">本月</el-dropdown-item>
<el-dropdown-item command="years">本年</el-dropdown-item>
<el-dropdown-item command="years">本年</el-dropdown-item> -->
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -65,7 +72,7 @@
累计排名 : <span> {{currentUserRankingTotalData.rankNo}}</span>
</div>
<div class="myexperience">
累计经验值 : <span>{{currentUserRankingTotalData.rankValue}}</span>
累计学习天数 : <span>{{currentUserRankingTotalData.rankValue}}</span>
</div>
</div>
@@ -87,7 +94,7 @@
<div style="margin-left:5px">排名</div>
<div style="margin-left:5px">姓名</div>
<div class="bm">部门</div>
<div class="jy">经验值</div>
<div class="jy">学习天数</div>
</div>
<div>
<div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px"
@@ -141,6 +148,15 @@
</div>
</div>
<el-dialog :visible.sync="dialogVisible" :show-close="false" width="716px" top="13%">
<div class="dialog-box">
<div class="box-top">
@@ -334,7 +350,7 @@
getRanking() {
let data = {
aid: this.userInfo.aid, // #用户id
statType: 20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
statType: 11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
field: this.cycle, // #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
num: 5, // #显示的条数
}
@@ -351,10 +367,10 @@
this.getUserData([res.result.currentUserRankingData.aid], [res.result.currentUserRankingData])
this.currentUserRankingData = res.result.currentUserRankingData;
if(this.cycle == 'total'){
this.current = this.experienceValue(res.result.currentUserRankingData.total);
// this.current = this.experienceValue(res.result.currentUserRankingData.total);
this.currentUserRankingTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
this.currentUserRankingTotalData.rankValue = res.result.currentUserRankingData.total;
this.currentUserRankingTotalData.endValue = this.current.endValue;
// this.currentUserRankingTotalData.endValue = this.current.endValue;
}
}

View File

@@ -202,10 +202,8 @@ export default {
}
}
}).catch(()=>{
this.isShowTip = '当前网络异常,内容已离线保存,请尝试连接网络后重新自动上传';
setTimeout(()=>{
this.isShowTip = '';
},10000 * 2)
this.isShowTip = '当前网络异常,内容已离线保存,请尝试连接网络后重新保存';
setTimeout(()=>{ this.isShowTip = ''; },10000 * 2)
sessionStorage.setItem('isShowTip',this.editdata.content);
})
}

View File

@@ -48,8 +48,8 @@
<h4>个人主页设置<svg-icon v-show="!hideHomeEdit" type="primary" @click="hideHomeEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon></h4>
</div>
<div class="dynamic-range">
<el-radio v-model="hideHome" :label="true">关闭个人主页</el-radio>
<el-radio v-model="hideHome" :label="false">打开个人主页</el-radio>
<el-radio :disabled="!hideHomeEdit" v-model="hideHome" :label="true">关闭个人主页</el-radio>
<el-radio :disabled="!hideHomeEdit" v-model="hideHome" :label="false">打开个人主页</el-radio>
<!-- <el-checkbox v-model="hideHome"> 关闭个人主页 </el-checkbox> -->
<el-button v-show="hideHomeEdit" style="margin-left:110px" @click="hideHomeEdit = false">取消</el-button>
<el-button v-show="hideHomeEdit" type="primary" @click="saveHideHome()">保存</el-button>
@@ -61,9 +61,9 @@
<h4>动态可见范围<svg-icon v-show="!dynamicDataEdit" type="primary" @click="dynamicDataEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon></h4>
</div>
<div class="dynamic-range">
<el-radio v-model="form.dynamic" :label="1">全部动态</el-radio>
<el-radio v-model="form.dynamic" :label="2">最近半年动态</el-radio>
<el-radio v-model="form.dynamic" :label="3">最近三个月动态</el-radio>
<el-radio :disabled="!dynamicDataEdit" v-model="form.dynamic" :label="1">全部动态</el-radio>
<el-radio :disabled="!dynamicDataEdit" v-model="form.dynamic" :label="2">最近半年动态</el-radio>
<el-radio :disabled="!dynamicDataEdit" v-model="form.dynamic" :label="3">最近三个月动态</el-radio>
<el-button v-show="dynamicDataEdit" style="margin-left:110px" @click="dynamicDataEdit = false">取消</el-button>
<el-button type="primary" v-show="dynamicDataEdit" @click="saveDynamic()">保存</el-button>
<!-- <el-button v-show="!dynamicData.isEdit" style="margin-left:110px" type="primary" @click="dynamicData.isEdit = true">编辑</el-button> -->

View File

@@ -1,5 +1,6 @@
<template>
<div class="page-ranking">
<!--
<div class="page-ranking-col experience">
<div class="exp-hear">
<div class="exp-hear-text">
@@ -22,9 +23,9 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="total">累计</el-dropdown-item>
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
<el-dropdown-item command="weeks">本周</el-dropdown-item>
<el-dropdown-item command="months">本月</el-dropdown-item>
<el-dropdown-item command="years">本年</el-dropdown-item> -->
<el-dropdown-item command="years">本年</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -38,18 +39,6 @@
</div>
</div>
<!--
<div class="exp-bar">
<h6> {{currentUserRankingTotalData.rankValue}}/{{currentUserRankingTotalData.endValue}}</h6>
<div class="exp-barbox">
<el-progress :percentage="currentUserRankingTotalData.rankValue*100/currentUserRankingTotalData.endValue" color="#387DF7"></el-progress>
</div>
<div class="exp-barname">
<span>{{current.start}}</span>
<span>{{current.end}}</span>
</div>
</div>
-->
<div class="exp-table" style="margin-top:20px;">
<div class="table-hear">
@@ -127,9 +116,9 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="total">累计</el-dropdown-item>
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
<el-dropdown-item command="weeks">本周</el-dropdown-item>
<el-dropdown-item command="months">本月</el-dropdown-item>
<el-dropdown-item command="years">本年</el-dropdown-item> -->
<el-dropdown-item command="years">本年</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -196,6 +185,7 @@
</div>
</div>
</div>
-->
<div class="page-ranking-col Duration">
<div class="exp-hear study-info">