mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 06:16:44 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal
This commit is contained in:
@@ -42,11 +42,24 @@ const isRead=function(){
|
||||
const updateIsRead=function(ids){
|
||||
return ajax.postJson('/xboe/sys/message/updateIsRead',ids)
|
||||
}
|
||||
|
||||
/**把当前人所有未读消息设置为已读*/
|
||||
const readAll=function(){
|
||||
return ajax.postJson('/xboe/sys/message/readall')
|
||||
}
|
||||
|
||||
/**清空当前人的接收到的所有的消息*/
|
||||
const cleanAll=function(){
|
||||
return ajax.postJson('/xboe/sys/message/clearall')
|
||||
}
|
||||
|
||||
export default{
|
||||
list,
|
||||
del,
|
||||
detail,
|
||||
save,
|
||||
isRead,
|
||||
updateIsRead
|
||||
updateIsRead,
|
||||
readAll,
|
||||
cleanAll
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
font-size: 24px;
|
||||
font-family: JCHEadA;
|
||||
color: #D9D9D9;
|
||||
|
||||
|
||||
margin-right: 10px;
|
||||
img{
|
||||
vertical-align: top;
|
||||
@@ -272,12 +272,12 @@
|
||||
color: #333333;
|
||||
line-height: 22px;
|
||||
}
|
||||
.portal-index-title{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #00253E;
|
||||
line-height: 22px;
|
||||
}
|
||||
// .portal-index-title{
|
||||
// font-size: 16px;
|
||||
// font-weight: 500;
|
||||
// color: #00253E;
|
||||
// line-height: 22px;
|
||||
// }
|
||||
.portal-index-summary{
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
@@ -359,21 +359,9 @@
|
||||
// padding: 2px 12px;
|
||||
line-height: 24px;
|
||||
}
|
||||
/**滚动条的宽度*/
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/*滚动条的滑块*/
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #D8D8D8;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #D8D8D8;
|
||||
}
|
||||
|
||||
@keyframes ubAddBlock {
|
||||
// from {
|
||||
// bottom: 0;
|
||||
@@ -449,6 +437,13 @@
|
||||
}
|
||||
// boe-index
|
||||
@media screen and (max-width: 1366px){
|
||||
.portal-index-title{
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #00253E;
|
||||
margin-bottom: 4px;
|
||||
// line-height: 22px;
|
||||
}
|
||||
.portal-input{
|
||||
width: 260px;
|
||||
}
|
||||
@@ -592,6 +587,7 @@
|
||||
line-height: 14px;
|
||||
}
|
||||
.qa-views{
|
||||
font-size: 12px !important;
|
||||
left: 10px;
|
||||
bottom: 6px;
|
||||
}
|
||||
@@ -717,7 +713,12 @@
|
||||
.case-inter-orgin{
|
||||
width: 47%;
|
||||
}
|
||||
|
||||
.portal-index-title{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #00253E;
|
||||
line-height: 22px;
|
||||
}
|
||||
.portal-input{
|
||||
width: 280px;
|
||||
}
|
||||
@@ -856,6 +857,7 @@
|
||||
.qa-views{
|
||||
left: 18px;
|
||||
bottom: 18px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.qa-char{
|
||||
@@ -986,7 +988,12 @@
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1920px) and (min-width: 1681px){
|
||||
|
||||
.portal-index-title{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #00253E;
|
||||
line-height: 22px;
|
||||
}
|
||||
.case-inter-orgin{
|
||||
width: 60%;
|
||||
}
|
||||
@@ -1138,6 +1145,7 @@
|
||||
.qa-views{
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.qa-char{
|
||||
@@ -1246,6 +1254,12 @@
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1921px){
|
||||
.portal-index-title{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #00253E;
|
||||
line-height: 22px;
|
||||
}
|
||||
.case-inter-orgin{
|
||||
width: 60%;
|
||||
}
|
||||
@@ -1393,6 +1407,7 @@
|
||||
.qa-views{
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.qa-char{
|
||||
|
||||
@@ -2,6 +2,29 @@
|
||||
* 门户页面的一些通用样式定义在这里面
|
||||
*/
|
||||
body {margin: 0px;padding: 0px;}
|
||||
|
||||
/**滚动条的宽度*/
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 10px;
|
||||
scrollbar-color: #009cea #f7f7f9; /* 滑块颜色 滚动条背景颜色 */
|
||||
scrollbar-width: thin; /* 滚动条宽度有三种:thin、auto、none */
|
||||
}
|
||||
|
||||
/*滚动条的滑块*/
|
||||
::-webkit-scrollbar-thumb {
|
||||
//background-color: #D8D8D8;
|
||||
border-radius: 3px;
|
||||
background-color: rgb(103, 197, 255);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #D8D8D8;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
|
||||
//定义全局的核心区域宽度
|
||||
.xcontent{
|
||||
min-width: 1100px;
|
||||
|
||||
@@ -737,7 +737,6 @@
|
||||
this.homework.info.id='';
|
||||
this.exam.content={id:'',contentType:61,sortIndex:3};
|
||||
this.exam.show=1;
|
||||
this.exam.content='';
|
||||
this.exam.paperJson={items:[]};
|
||||
this.exam.info.id='';
|
||||
this.exam.info.paperContent='';
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
</p>
|
||||
<h6 class="answer-title-info follow-home-title">
|
||||
<span class="pointer" @click="jumpDetail(item)">{{item.contentInfo}}</span>
|
||||
<span class="follow-hide" style="float:right" v-if="!isDynamic && personal">
|
||||
<!-- <span class="follow-hide" style="float:right" v-if="!isDynamic && personal">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</span>
|
||||
</span> -->
|
||||
</h6>
|
||||
<p class="answer-text">
|
||||
{{displayAll(item)}}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
</span>
|
||||
</p>
|
||||
<h6 class="article-title-info follow-home-title"><span @click="jumpDetail(item)">{{item.info.title || item.contentInfo}}</span>
|
||||
<span class="follow-hide pointer" style="float:right" v-if="!isDynamic && personal">
|
||||
<!-- <span class="follow-hide pointer" style="float:right" v-if="!isDynamic && personal">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</span>
|
||||
</span> -->
|
||||
</h6>
|
||||
<div style="height:58px;padding-top:14px ">
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex" :aid="item.authorInfo.aid"></author>
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<router-link :to="'/case/detail?id='+item.info.id">
|
||||
<span class="case-tittext" v-html="item.info.title || item.contentInfo"></span>
|
||||
</router-link>
|
||||
<span class="follow-hide pointer" v-if="!isDynamic && personal">
|
||||
<!-- <span class="follow-hide pointer" v-if="!isDynamic && personal">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</span>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<router-link :to="'/case/detail?id='+item.info.id">
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
<p class="portal-time">最新一次学习时间:{{item.eventTime}}</p>
|
||||
</div>
|
||||
<div style="width:150px">
|
||||
<div class="follow-hide pointer" style="text-align: right;" v-if="!isDynamic && personal">
|
||||
<!-- <div class="follow-hide pointer" style="text-align: right;" v-if="!isDynamic && personal">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="btn-right">
|
||||
<!-- <el-button class="btn" type="primary" @click="jumpDetail(item)">{{item.eventKey == 'Praise' ? '我也去学' : item.aid == userInfo.aid? '继续学习' : '我也去学'}}</el-button> -->
|
||||
<el-button class="btn" type="primary" @click="jumpDetail(item)">{{personal? '继续学习' : '我也去学'}}</el-button>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div style="display: flex;justify-content: start;margin-left:25px">
|
||||
<div style="min-width: 240px;">
|
||||
<div class="content-top">
|
||||
<h6> {{userData.name}}<span style="margin-left:8px;color: #999999;font-weight: 400;">{{orgInfo}}</span> </h6>
|
||||
<h6> {{userData.name}}<span style="margin-left:8px;color: #999999;font-weight: 400;">{{userData.orgInfo}}</span> </h6>
|
||||
</div>
|
||||
<div class="grade" style="margin-top:5px">
|
||||
<div class="level" style="margin-top:4px">{{statData.level}}</div>
|
||||
@@ -26,7 +26,7 @@
|
||||
<spap class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</spap>
|
||||
<el-button type="text" round class="btn-user" > <router-link :to="'/home/'+pageId+'/leaving'">{{pageId == userInfo.aid ? '留言板':'去留言'}}<i class="el-icon-arrow-right"></i> </router-link> </el-button>
|
||||
<!-- <div style="height: 30px;margin-top: 10px;"> -->
|
||||
|
||||
|
||||
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
@@ -35,11 +35,11 @@
|
||||
<p v-if="userData.sign" class="portal-summary-text">{{userData.sign}} </p>
|
||||
<p v-else class="portal-summary-text">暂无签名</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <div style="text-align: center;"> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,6 +147,7 @@
|
||||
apiUser.getByIds([this.pageId]).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.userData = res.result[0];
|
||||
this.userData.orgInfo=cutFullName(this.userData.orgInfo);
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
@@ -359,7 +360,7 @@
|
||||
border: 1px solid #619DFF;
|
||||
font-size: 14px;
|
||||
color: #387DF7;
|
||||
|
||||
|
||||
}
|
||||
.Followed{
|
||||
width: 80px;
|
||||
@@ -468,7 +469,7 @@
|
||||
}
|
||||
}
|
||||
.content-bottom{
|
||||
|
||||
|
||||
.medalbutt{
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
</span>
|
||||
</p>
|
||||
<h6 style="word-break:break-all;" class="note-title-info follow-home-title pointer"><span @click="jumpDetail(item)">{{item.contentInfo}}</span> <span style="color: #333333;font-weight: 400;font-size: 14px;margin-left: 20px;"></span>
|
||||
<span class="follow-hide pointer" style="float:right" v-if="(item.aid == userInfo.aid) && !isDynamic">
|
||||
<!-- <span class="follow-hide pointer" style="float:right" v-if="(item.aid == userInfo.aid) && !isDynamic">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</span>
|
||||
</span> -->
|
||||
</h6>
|
||||
<p class="note-text" style="word-break:break-all;word-wrap:break-word;margin-bottom:18px">
|
||||
{{item.info.content}}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
</p>
|
||||
<h6 class="put-title-info follow-home-title">
|
||||
<span class="pointer" @click="jumpDetail(item.info)">{{item.info.title || item.contentInfo}}</span>
|
||||
<span class="portal-time follow-hide pointer" style="float:right" v-if="!isDynamic && personal">
|
||||
<!-- <span class="portal-time follow-hide pointer" style="float:right" v-if="!isDynamic && personal">
|
||||
<span v-if="item.hidden">已隐藏</span>
|
||||
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
||||
</span>
|
||||
</span> -->
|
||||
</h6>
|
||||
<div class="put-footer">
|
||||
<div style="margin-top:20px;font-size: 14px;color: #666666;">{{item.info.answers}}个回答</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '40px':'20px'}`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
||||
<el-tooltip effect="light" content="浏览量" placement="top" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<svg-icon style="margin-right: 0;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>
|
||||
<svg-icon style="margin-right: 0;font-size:22px;" icon-class="eyes"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="interact-bar-value"> {{ formatNum(data.views)}}</span>
|
||||
</div>
|
||||
@@ -235,7 +235,6 @@ export default {
|
||||
// if(type=='praise'){
|
||||
// typeText='点赞了我的'
|
||||
// }
|
||||
|
||||
let content;
|
||||
let conType;
|
||||
if(this.type==1){
|
||||
@@ -283,6 +282,9 @@ export default {
|
||||
content,
|
||||
refId,
|
||||
refType:this.type,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName,
|
||||
acceptName,
|
||||
acceptId,
|
||||
@@ -291,9 +293,7 @@ export default {
|
||||
conType,
|
||||
}
|
||||
apiMessage.save(message).then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
}
|
||||
if(res.status!=200){ console.log('发送消息失败') }
|
||||
})
|
||||
},
|
||||
checkHas(){
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!--机构树-->
|
||||
<div>
|
||||
<el-dialog title="先择组织机构" :append-to-body="true" :visible.sync="dlgShow" :before-close="handleClose" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
|
||||
<el-dialog title="选择组织机构" :append-to-body="true" :visible.sync="dlgShow" :before-close="handleClose" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
|
||||
<div>
|
||||
<!--
|
||||
<el-input placeholder="" v-model="orgName">
|
||||
|
||||
@@ -313,7 +313,7 @@ export function getUType(type) {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**此方法的意义,需要一起讨论*/
|
||||
/**此方法的定义,后期需要云掉*/
|
||||
export function experienceValue(total) {
|
||||
let data = {
|
||||
start:'',
|
||||
|
||||
@@ -2188,7 +2188,7 @@
|
||||
.qa-views {
|
||||
position: absolute;
|
||||
color: #6E7B84;
|
||||
font-size: 14px;
|
||||
// font-size: 14px;
|
||||
// left: 20px;
|
||||
// bottom: 20px;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<i style="color: #333333" class="el-icon-search"></i>
|
||||
</div> -->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane name="" v-loading="loading">
|
||||
<el-tab-pane name="0" v-loading="loading">
|
||||
<span slot="label"><svg-icon icon-class="home-dynamic" style="font-size: 30px;"></svg-icon> <span class="tabs-info">动态</span></span>
|
||||
<template v-for="item in allPageList">
|
||||
<course-list v-if="item.contentType == 1" :list="[item]" :isDynamic="true" :personal="personal" @hideIndex="dynamicHide"></course-list>
|
||||
@@ -20,6 +20,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
|
||||
<p class="text">还没有动态</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="allPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="allPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="allPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="allPage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -28,6 +40,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
|
||||
<p class="text">还没有课程</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="cousrePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="cousrePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="cousrePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="cousrePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -36,6 +60,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-case.png`" alt="" srcset="">
|
||||
<p class="text">还没有案例</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="casePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="casePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="casePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="casePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -44,6 +80,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
|
||||
<p class="text">还没有笔记</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="notePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="notePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="notePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="notePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -52,6 +100,18 @@
|
||||
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
|
||||
<p class="text">还没有提问</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="qaPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="qaPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="qaPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="qaPage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -60,6 +120,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-answer.png`" alt="" srcset="">
|
||||
<p class="text">还没有回答</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="answerPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="answerPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="answerPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="answerPage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -68,6 +140,18 @@
|
||||
<img class="img" style="width:150px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-article.png`" alt="" srcset="">
|
||||
<p class="text">还没有文章</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="articlePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="articlePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="articlePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="articlePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -78,18 +162,6 @@
|
||||
<book-list></book-list>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0 && activeName!='7'">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="page.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="page.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="page.count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div style="height:200px"></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -125,6 +197,7 @@
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
pageId:'',
|
||||
loading:false,
|
||||
loading1:false,
|
||||
loading2:false,
|
||||
@@ -133,22 +206,30 @@
|
||||
loading5:false,
|
||||
loading6:false,
|
||||
intTabIndex:-1,//初始化显示哪个tab,71我关注的人,72关注我的人
|
||||
page:{
|
||||
pageIndex:1,
|
||||
pageSize:10,
|
||||
count:0
|
||||
},
|
||||
input:'',
|
||||
activeName:'',
|
||||
pageId:'',
|
||||
activeName:'0',
|
||||
// pageList:[],
|
||||
casePageList:[],
|
||||
casePage:{count:0,pageSize:10, pageIndex:1},
|
||||
|
||||
notePageList:[],
|
||||
notePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
articlePageList:[],
|
||||
articlePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
qaPageList:[],
|
||||
qaPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
answerPageList:[],
|
||||
answerPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
cousrePageList:[],
|
||||
cousrePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
allPageList:[],
|
||||
allPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
personal:false,
|
||||
orgData:[],
|
||||
Profess:[]
|
||||
@@ -211,19 +292,40 @@
|
||||
loadMajorType:'majorType/loadMajorTypes',
|
||||
loadOrgDomain:'orgDomain/loadOrgDomains'
|
||||
}),
|
||||
getPagerData(){
|
||||
if(this.activeName == '0') {
|
||||
return this.allPage;
|
||||
} else if(this.activeName == '1') {
|
||||
return this.cousrePage;
|
||||
} else if(this.activeName == '2') {
|
||||
return this.articlePage;
|
||||
} else if(this.activeName == '3') {
|
||||
return this.casePage;
|
||||
} else if(this.activeName == '4') {
|
||||
return this.qaPage;
|
||||
} else if(this.activeName == '5') {
|
||||
return this.answerPage;
|
||||
} else if(this.activeName == '6') {
|
||||
return this.notePage;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
this.page.pageIndex = 1;
|
||||
let curPageData=this.getPagerData();
|
||||
curPageData.pageIndex=1;
|
||||
curPageData.pageSize=val;
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page.pageIndex = val;
|
||||
let curPageData=this.getPagerData();
|
||||
curPageData.pageIndex=val;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
let curPageData=this.getPagerData();
|
||||
let data = {
|
||||
pageIndex:this.page.pageIndex,
|
||||
pageSize:this.page.pageSize,
|
||||
pageIndex:curPageData.pageIndex,
|
||||
pageSize:curPageData.pageSize,
|
||||
contentType:this.activeName == 0? '':this.activeName,//内容类型
|
||||
aid:this.pageId, //指定用户的动态,
|
||||
hidden:this.pageId == this.userInfo.aid?'':false,//是否隐藏,不指定,查询全部
|
||||
@@ -253,7 +355,7 @@
|
||||
this.loading5 = false;
|
||||
this.loading6 = false;
|
||||
if(res.status == 200) {
|
||||
this.page.count = res.result.count;
|
||||
curPageData.count = res.result.count;
|
||||
let ids = res.result.list.map(item=>item.contentId);
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
res.result.list.forEach(item=>{
|
||||
@@ -542,17 +644,43 @@
|
||||
})
|
||||
},
|
||||
handleClick() {
|
||||
if(this.activeName == '7') {
|
||||
//单独的分页,所以这里不与当前页面的分页共用
|
||||
this.$refs.followList.resetActive();
|
||||
this.$refs.followList.getPage();
|
||||
return
|
||||
|
||||
if(this.activeName == '0') {
|
||||
if(this.allPageList.length>0){
|
||||
return;
|
||||
}
|
||||
this.page.count = 0
|
||||
} else if(this.activeName == '1') {
|
||||
if(this.cousrePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '2') {
|
||||
if(this.articlePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '3') {
|
||||
if(this.casePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '4') {
|
||||
if(this.qaPageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '5') {
|
||||
if(this.answerPageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '6') {
|
||||
if(this.notePageList.length>0){
|
||||
return;
|
||||
}
|
||||
}else if(this.activeName == '7'){
|
||||
//单独的分页,所以这里不与当前页面的分页共用
|
||||
this.$refs.followList.resetActive();
|
||||
this.$refs.followList.getPage();
|
||||
return
|
||||
}
|
||||
if(this.activeName == '8') {
|
||||
this.page.count = 0;
|
||||
// console.log(this.$refs.followList,'this.$refs.followList');
|
||||
// this.$refs.followList.getPage();
|
||||
// 书箱没有了
|
||||
return
|
||||
}
|
||||
this.getList();
|
||||
@@ -562,6 +690,10 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.div-pagination{
|
||||
text-align: center;
|
||||
margin-top:50px;
|
||||
}
|
||||
.home-page{
|
||||
::v-deep .el-tabs__active-bar{
|
||||
height: 4px;
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
写文章
|
||||
</div>
|
||||
<div id="articleAnking">
|
||||
|
||||
|
||||
<div class="portal-ranking ranking-bg">
|
||||
<p class="ranking-title">贡献榜</p>
|
||||
<ul class="ranking-data">
|
||||
@@ -299,7 +299,19 @@ export default {
|
||||
},
|
||||
success(value){
|
||||
let content=this.userInfo.name+'评论了我的文章'+'-'+this.articleDetailData.title;
|
||||
let query={refId:this.articleDetailData.id,sendType:1,title:'系统消息',refType:2,content:content,sendName:this.userInfo.name,acceptId:this.articleDetailData.sysCreateAid,acceptName:this.articleDetailData.sysCreateBy}
|
||||
let query={
|
||||
refId:this.articleDetailData.id,
|
||||
sendType:1,
|
||||
title:'系统消息',
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
refType:2,
|
||||
content:content,
|
||||
sendName:this.userInfo.name,
|
||||
acceptId:this.articleDetailData.sysCreateAid,
|
||||
acceptName:this.articleDetailData.sysCreateBy,
|
||||
}
|
||||
apiMessage.save(query).then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
|
||||
@@ -523,7 +523,19 @@ export default {
|
||||
},
|
||||
success(value){
|
||||
let content=this.userInfo.name+'评论了我的案例'+'-'+this.caseDetail.title;
|
||||
let query={refId:this.caseDetail.id,sendType:1,title:'系统消息',refType:3,content:content,sendName:this.userInfo.name,accpetId:this.caseDetail.sysCreateAid,acceptName:this.caseDetail.sysCreateBy}
|
||||
let query={
|
||||
refId:this.caseDetail.id,
|
||||
sendType:1,
|
||||
title:'系统消息',
|
||||
refType:3,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
content:content,
|
||||
sendName:this.userInfo.name,
|
||||
accpetId:this.caseDetail.sysCreateAid,
|
||||
acceptName:this.caseDetail.sysCreateBy,
|
||||
}
|
||||
apiMessage.save(query).then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
</div>
|
||||
-->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane name="" label="全部" v-loading="loading">
|
||||
<template v-for="item in allPageList">
|
||||
<el-tab-pane name="0" label="全部" v-loading="loading">
|
||||
<template v-show="activeName==0" v-for="item in allPageList">
|
||||
<course-list v-if="item.contentType == 1" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
|
||||
<case-list v-if="item.contentType == 3" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
|
||||
<note-list v-if="item.contentType == 6" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></note-list>
|
||||
@@ -26,34 +26,94 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
|
||||
<p class="text">暂时没有动态</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="allPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="allPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="allPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="allPage.count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</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>
|
||||
<course-list v-show="activeName==1" :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>
|
||||
<div class="div-pagination" v-show="cousrePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="cousrePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="cousrePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="cousrePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
<note-list v-show="activeName==6" :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>
|
||||
<div class="div-pagination" v-show="notePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="notePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="notePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="notePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
<case-list v-show="activeName==3" :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>
|
||||
<div class="div-pagination" v-show="casePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="casePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="casePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="casePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
<article-list v-show="activeName==2" :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>
|
||||
<div class="div-pagination" v-show="articlePage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="articlePage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="articlePage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="articlePage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -61,6 +121,18 @@
|
||||
<img class="img" style="width:204px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-put.png`" alt="" srcset="">
|
||||
<p class="text">暂时没有动态</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="qaPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="qaPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="qaPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="qaPage.count">
|
||||
</el-pagination>
|
||||
</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>
|
||||
@@ -68,6 +140,18 @@
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-answer.png`" alt="" srcset="">
|
||||
<p class="text">暂时没有动态</p>
|
||||
</div>
|
||||
<div class="div-pagination" v-show="answerPage.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="answerPage.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="answerPage.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="answerPage.count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- <el-tab-pane name="7" label="关注">
|
||||
@@ -80,18 +164,7 @@
|
||||
</el-tab-pane>
|
||||
-->
|
||||
</el-tabs>
|
||||
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="page.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="page.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="page.count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
<div style="height:200px"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,6 +198,7 @@
|
||||
components:{portalHeader,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList},
|
||||
data(){
|
||||
return{
|
||||
pageId:'',
|
||||
loading:false,
|
||||
loading1:false,
|
||||
loading2:false,
|
||||
@@ -132,25 +206,31 @@
|
||||
loading4:false,
|
||||
loading5:false,
|
||||
loading6:false,
|
||||
pageSize:10,
|
||||
input:'',
|
||||
// loading:0,//加载中
|
||||
activeName:'first',
|
||||
page:{
|
||||
pageIndex:1,
|
||||
pageSize:10,
|
||||
count:0
|
||||
},
|
||||
input:'',
|
||||
activeName:'',
|
||||
pageId:'',
|
||||
activeName:'0',
|
||||
// pageList:[],
|
||||
casePageList:[],
|
||||
casePage:{count:0,pageSize:10, pageIndex:1},
|
||||
|
||||
notePageList:[],
|
||||
notePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
articlePageList:[],
|
||||
articlePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
qaPageList:[],
|
||||
qaPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
answerPageList:[],
|
||||
answerPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
cousrePageList:[],
|
||||
cousrePage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
allPageList:[],
|
||||
allPage:{count:0,pageSize:10,pageIndex:1},
|
||||
|
||||
personal:true,
|
||||
orgData:[],
|
||||
Profess:[],
|
||||
@@ -189,23 +269,48 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
this.page.pageIndex = 1;
|
||||
this.getList();
|
||||
handleSizeChange(val) {
|
||||
let curPageData=this.getPagerData();
|
||||
curPageData.pageIndex=1;
|
||||
curPageData.pageSize=val;
|
||||
this.getList();
|
||||
},
|
||||
getPagerData(){
|
||||
|
||||
if(this.activeName == '0') {
|
||||
return this.allPage;
|
||||
} else if(this.activeName == '1') {
|
||||
return this.cousrePage;
|
||||
} else if(this.activeName == '2') {
|
||||
return this.articlePage;
|
||||
} else if(this.activeName == '3') {
|
||||
return this.casePage;
|
||||
} else if(this.activeName == '4') {
|
||||
return this.qaPage;
|
||||
} else if(this.activeName == '5') {
|
||||
return this.answerPage;
|
||||
} else if(this.activeName == '6') {
|
||||
return this.notePage;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page.pageIndex = val;
|
||||
this.getList();
|
||||
let curPageData=this.getPagerData();
|
||||
curPageData.pageIndex=val;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
let data = {
|
||||
pageIndex:this.page.pageIndex,
|
||||
pageSize:this.page.pageSize,
|
||||
let curPageData=this.getPagerData();
|
||||
let qdata = {
|
||||
pageIndex:curPageData.pageIndex,
|
||||
pageSize:curPageData.pageSize,
|
||||
contentType:this.activeName == 0? '':this.activeName,//内容类型
|
||||
aids:this.followIds // 数组
|
||||
}
|
||||
if(this.activeName == '1') {
|
||||
|
||||
if(this.activeName == '0') {
|
||||
this.loading = true;
|
||||
} else if(this.activeName == '1') {
|
||||
this.loading1 = true;
|
||||
} else if(this.activeName == '2') {
|
||||
this.loading2 = true;
|
||||
@@ -218,9 +323,9 @@
|
||||
} else if(this.activeName == '6') {
|
||||
this.loading6 = true;
|
||||
} else {
|
||||
this.loading = true;
|
||||
this.loading = true;
|
||||
}
|
||||
apiStat.userDynamicfollows(data).then(res=>{
|
||||
apiStat.userDynamicfollows(qdata).then(res=>{
|
||||
this.loading = false;
|
||||
this.loading1 = false;
|
||||
this.loading2 = false;
|
||||
@@ -229,7 +334,7 @@
|
||||
this.loading5 = false;
|
||||
this.loading6 = false;
|
||||
if(res.status == 200) {
|
||||
this.page.count = res.result.count;
|
||||
curPageData.count = res.result.count;
|
||||
if(res.result.count==0){
|
||||
return;
|
||||
}
|
||||
@@ -520,14 +625,46 @@
|
||||
})
|
||||
},
|
||||
handleClick() {
|
||||
this.page.count = 0;
|
||||
this.getList();
|
||||
if(this.activeName == '0') {
|
||||
if(this.allPageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '1') {
|
||||
if(this.cousrePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '2') {
|
||||
if(this.articlePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '3') {
|
||||
if(this.casePageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '4') {
|
||||
if(this.qaPageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '5') {
|
||||
if(this.answerPageList.length>0){
|
||||
return;
|
||||
}
|
||||
} else if(this.activeName == '6') {
|
||||
if(this.notePageList.length>0){
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.div-pagination{
|
||||
text-align: center;
|
||||
margin-top:50px;
|
||||
}
|
||||
.follow-banner{
|
||||
background-color: #0078FC;
|
||||
}
|
||||
|
||||
@@ -449,6 +449,9 @@ export default {
|
||||
let message = {
|
||||
refId: this.detailData.id,
|
||||
title: "系统消息",
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName: this.userInfo.name,
|
||||
acceptName: this.detailData.sysCreateBy,
|
||||
acceptId: this.detailData.sysCreateAid,
|
||||
|
||||
@@ -349,6 +349,9 @@ export default {
|
||||
let message = {
|
||||
refId: this.detailData.id,
|
||||
title: "系统消息",
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName: this.userInfo.name,
|
||||
acceptName: this.detailData.sysCreateBy,
|
||||
acceptId: this.detailData.sysCreateAid,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-radio-group> -->
|
||||
</div>
|
||||
<div>
|
||||
<el-button class="navbut" type="text" @click="isReadChooseList">设置已读</el-button>
|
||||
<el-button style="margin-left: 25px;" :disabled="disabledReadAll" :class="{navbut:!disabledReadAll}" type="text" @click="isReadChooseList">设置已读</el-button>
|
||||
<el-button class="navbut" type="text" @click="delChooseList">删除所选</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,16 +50,14 @@
|
||||
<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>{{ item.title }}</span></a>
|
||||
</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 class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
|
||||
<div 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>
|
||||
@@ -109,6 +107,7 @@ export default {
|
||||
pageSize: 6,
|
||||
isRead: null
|
||||
},
|
||||
disabledReadAll:false,
|
||||
total: 0,
|
||||
checkAll: false,
|
||||
data: [],
|
||||
@@ -144,18 +143,26 @@ export default {
|
||||
this.checkAll = false;
|
||||
this.isIndeterminate = false;
|
||||
}
|
||||
this.disabledReadAll=false;
|
||||
apiMessage.list(this.queryData).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.totalPages = res.result.totalPages;
|
||||
this.total = res.result.count;
|
||||
let allRead=true;
|
||||
res.result.list.forEach(item => {
|
||||
let name = this.filterContent(item.content);
|
||||
let num = name.slice(1,name.length);
|
||||
item.tip = name[0];
|
||||
item.content = num.join('-');
|
||||
item.checked = false;
|
||||
if(!item.isRead){
|
||||
allRead=false;
|
||||
}
|
||||
this.data.push(item);
|
||||
});
|
||||
if(allRead){
|
||||
this.disabledReadAll=true;
|
||||
}
|
||||
if(this.total == 0){this.showMessage = '暂无消息';}
|
||||
this.showMessage = this.total <= 0 ? '暂无消息' : '';
|
||||
} else {
|
||||
@@ -284,20 +291,24 @@ export default {
|
||||
this.$refs.guide.guideCollection = true;
|
||||
},
|
||||
|
||||
|
||||
// 跳转详情事件11
|
||||
returnRouter(item) {
|
||||
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.pageUrl && item.pageUrl.length>10){
|
||||
return 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;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="uc-list" v-loading="loading">
|
||||
<div class="uc-course" v-for="(item,idx) in pageChange" @click="jumpRouter(item)" :key="idx">
|
||||
<div class="uc-course-img" style="width: 260px;height:144px">
|
||||
<div class="uc-course" v-for="(item,idx) in pageChange" :key="idx">
|
||||
<div class="uc-course-img" style="width: 260px;height:144px" @click="jumpRouter(item)">
|
||||
<course-image :course="item"></course-image>
|
||||
<div class="uc-type">
|
||||
<span v-if="item.courseType==10">录播</span>
|
||||
@@ -38,7 +38,7 @@
|
||||
<span v-if="item.courseType==40">学习项目</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uc-course-info">
|
||||
<div class="uc-course-info" @click="jumpRouter(item)">
|
||||
<div class="uc-course-name" style="cursor: pointer;">
|
||||
|
||||
<div style="flex:1;">
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="uc-course-btns">
|
||||
<div style="text-align: right;">
|
||||
<!-- <el-button class="del" @click.stop="delItem(item,idx)" type="text" icon="el-icon-delete" size="mini" title="删除"></el-button> -->
|
||||
<el-dropdown>
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
<svg-icon style="margin-right: 0;font-size:26px;" icon-class="spot"></svg-icon>
|
||||
</span>
|
||||
|
||||
@@ -292,6 +292,7 @@
|
||||
import assess from '@/components/Course/assess';
|
||||
import myNote from '../../components/Course/myNote.vue';
|
||||
import apiFollow from "@/api/phase2/userfollow.js";
|
||||
import apiMessage from '@/api/system/message.js'
|
||||
// import Vue from 'vue';
|
||||
// Vue.forceUpdate();
|
||||
export default {
|
||||
@@ -800,6 +801,25 @@
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
//发送点赞消息
|
||||
let firstTeacher=this.teachers[0];
|
||||
let message={
|
||||
content:this.userInfo.name+'点赞了我的课程-'+this.courseInfo.name,
|
||||
refId:this.courseInfo.id,
|
||||
refType:1,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName:this.userInfo.name,
|
||||
acceptName:firstTeacher.teacherName,
|
||||
acceptId:firstTeacher.teacherId,
|
||||
title:'系统消息',
|
||||
sendType:1,
|
||||
conType:this.courseInfo.type,
|
||||
}
|
||||
apiMessage.save(message).then(res=>{
|
||||
if(res.status!=200){ console.log('发送消息失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('点赞失败,请稍后再试');
|
||||
}
|
||||
|
||||
@@ -167,40 +167,40 @@
|
||||
<div class="box-table">
|
||||
<p class="table-title portal-title-tow"><span></span>学习</p>
|
||||
<el-table :data="tableData" style="">
|
||||
<el-table-column prop="name" label="分类" width="180"></el-table-column>
|
||||
<el-table-column prop="name" label="描述" width="180">
|
||||
<el-table-column prop="name" label="分类" width="180" align="center"></el-table-column>
|
||||
<el-table-column prop="name" label="描述" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p v-for="(rem,index) in scope.row.hear" :key="index">{{rem}}</p>
|
||||
<p style="font-size:12px;color: #999999;" v-if="scope.row.label">{{scope.row.label}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="right" label="经验值/U币">
|
||||
<el-table-column label="经验值/U币" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p style="font-size:16px;color: #333333;font-weight: 600;" v-for="(val,index) in scope.row.value" :key="index">{{val}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="upperlimit" align="right" label="每日上限">
|
||||
<el-table-column prop="upperlimit" label="每日上限" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="box-table">
|
||||
<p class="table-title portal-title-tow"><span></span>知识贡献</p>
|
||||
<el-table :data="tableList" style="">
|
||||
<el-table-column prop="name" label="分类" width="180">
|
||||
<el-table-column prop="name" label="分类" width="180" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="描述" width="180">
|
||||
<el-table-column prop="name" label="描述" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p v-for="(rem,index) in scope.row.hear" :key="index">{{rem}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="right" label="经验值/U币">
|
||||
<el-table-column label="经验值/U币" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p style="font-size:16px;color: #333333;font-weight: 600;" v-for="(val,index) in scope.row.value"
|
||||
:key="index">{{val}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="upperlimit" align="right" label="每日上限">
|
||||
<el-table-column prop="upperlimit" align="center" label="每日上限">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -4,37 +4,37 @@
|
||||
</Remark> -->
|
||||
<div style="padding:10px 0px 12px 22px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="24" style="margin-bottom:20px">
|
||||
<span class="uc-center-page" style="margin-right:90px">我的测评</span>
|
||||
<el-input clearable placeholder="搜索名称" class="uc-input" v-model="keyword"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" class="search-btn" @click="getData()">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh-right" class="search-btn" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" v-for="(item,index) in testList" :key="index">
|
||||
<el-col :span="6" v-for="(item,index) in testList" :key="index">
|
||||
<!-- @click="textdetail(item)" -->
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: center;margin-top: 40px;">
|
||||
<!-- @click="jumpRouter(item)" -->
|
||||
<section>
|
||||
<!-- <section> -->
|
||||
<!-- <div @click="hasPermission(item)">
|
||||
|
||||
</div> -->
|
||||
<a :href="hasPermission(item)" target="_blank">
|
||||
<img :src="getItem(item)" />
|
||||
<h5 class="ceping-tit one-line-ellipsis" v-html="$keywordActiveShow(item.title,keyword)"></h5>
|
||||
<span class="ceping-conent">完成时间:{{item.date}}</span>
|
||||
<img style="width: 150px;height: 200px;" :src="getItem(item)" />
|
||||
<p class="ceping-tit one-line-ellipsis" v-html="$keywordActiveShow(item.title,keyword)"></p>
|
||||
<p class="ceping-conent">完成时间:{{item.date}}</p>
|
||||
</a>
|
||||
</section>
|
||||
<!-- </section> -->
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<div v-if="testList.length > 0 " style="height:150px; text-align: center; margin-top: 10px; " >
|
||||
<div v-if="testList.length > 0 " style="height:150px; text-align: center; margin-top: 50px; " >
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[9, 18, 27, 36]"
|
||||
:page-sizes="[8, 16, 24, 36]"
|
||||
:current-page="page"
|
||||
:page-size="size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -61,7 +61,7 @@
|
||||
testList:'',
|
||||
total:0,
|
||||
chaturl:'',
|
||||
size:9,
|
||||
size:8,
|
||||
page:1,
|
||||
}
|
||||
},
|
||||
@@ -144,13 +144,16 @@
|
||||
}
|
||||
|
||||
.ceping-tit{
|
||||
color: #333;
|
||||
font-size: 17px;
|
||||
line-height: 40px;
|
||||
margin-top: 19px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
.ceping-conent{
|
||||
font-size: #666;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
|
||||
}
|
||||
.fenye{
|
||||
@@ -175,47 +178,47 @@
|
||||
.el-col:nth-of-type(){
|
||||
|
||||
}
|
||||
.el-col:not(:first-child){
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
padding-left: 40px;
|
||||
border-radius: 4px;
|
||||
>div{
|
||||
// width: 85%;
|
||||
padding-bottom:100%;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
// box-shadow: 2px 2px 2px #888888;
|
||||
// box-shadow:0px 0px 2px #888888;
|
||||
border-radius: 4px;
|
||||
section{
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
left: 40%;
|
||||
top: 50%;
|
||||
// width: 96%;
|
||||
// height: 78%;
|
||||
transform: translate(-50%,-50%);
|
||||
// background: #f1f5fc;
|
||||
// marin:0 auto;
|
||||
// padding: 10px;
|
||||
border-box: box-sizing;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
img{
|
||||
width: 194px;
|
||||
height: 109px;
|
||||
}
|
||||
span{
|
||||
// color:#303133;
|
||||
// font-size: 12px;
|
||||
}
|
||||
h5{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// .el-col:not(:first-child){
|
||||
// position: relative;
|
||||
// padding: 20px;
|
||||
// padding-left: 40px;
|
||||
// border-radius: 4px;
|
||||
// >div{
|
||||
// // width: 85%;
|
||||
// padding-bottom:100%;
|
||||
// cursor: pointer;
|
||||
// position: relative;
|
||||
// // box-shadow: 2px 2px 2px #888888;
|
||||
// // box-shadow:0px 0px 2px #888888;
|
||||
// border-radius: 4px;
|
||||
// section{
|
||||
// border-radius: 4px;
|
||||
// position: absolute;
|
||||
// left: 40%;
|
||||
// top: 50%;
|
||||
// // width: 96%;
|
||||
// // height: 78%;
|
||||
// transform: translate(-50%,-50%);
|
||||
// // background: #f1f5fc;
|
||||
// // marin:0 auto;
|
||||
// // padding: 10px;
|
||||
// border-box: box-sizing;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// justify-content: space-between;
|
||||
// img{
|
||||
// width: 194px;
|
||||
// height: 109px;
|
||||
// }
|
||||
// span{
|
||||
// // color:#303133;
|
||||
// // font-size: 12px;
|
||||
// }
|
||||
// h5{
|
||||
// margin: 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
imgContent:[],
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
isShowList:false,
|
||||
isShowTip:'',
|
||||
isShowTip:'',
|
||||
radio: '1',
|
||||
editdata:{
|
||||
content:'',
|
||||
@@ -84,24 +84,44 @@ export default {
|
||||
histdata:[],
|
||||
id:'',
|
||||
timer:null,
|
||||
localStorageKey:'note-local-key',
|
||||
localStorageJson:'',
|
||||
rowNum:16
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.id = this.$route.query.id;
|
||||
this.notedetail();
|
||||
this.timer = setInterval(()=>{
|
||||
this.savedata(1);
|
||||
},30000);
|
||||
|
||||
let screenWidth = window.screen.availWidth;
|
||||
if (screenWidth <= 1440) {
|
||||
this.editContent = 'edit-content-low';
|
||||
this.rowNum = 11;
|
||||
}
|
||||
//检查是事本地存在
|
||||
this.localStorageJson= localStorage.getItem(this.localStorageKey);
|
||||
if(this.localStorageJson){ //存在本地数据
|
||||
this.loadLocalJson();
|
||||
}
|
||||
|
||||
this.timer = setInterval(()=>{this.savedata(1);},30000);
|
||||
},
|
||||
methods:{
|
||||
loadLocalJson(){ //加载本地的数据
|
||||
let $this=this;
|
||||
this.$confirm('您有未保存的笔记,是否加载?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let entity=JSON.parse($this.localStorageJson);
|
||||
$this.editdata = entity;
|
||||
$this.editdata.openTypeBackups = entity.openType;
|
||||
$this.histId = entity.id;
|
||||
}).catch(() => {
|
||||
localStorage.removeItem(this.localStorageKey);
|
||||
});
|
||||
},
|
||||
toCoursePage(){
|
||||
if(this.editdata.type==1){
|
||||
this.$router.push('/course/detail?id='+this.editdata.courseId);
|
||||
@@ -110,9 +130,9 @@ export default {
|
||||
imgDel(index) {
|
||||
this.imgContent.splice(index,1);
|
||||
},
|
||||
timeDel() {
|
||||
this.editdata.playTime = '';
|
||||
},
|
||||
timeDel() {
|
||||
this.editdata.playTime = '';
|
||||
},
|
||||
comeback(){
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
@@ -126,7 +146,6 @@ export default {
|
||||
this.editdata = res.result;
|
||||
this.editdata.openTypeBackups = res.result.openType;
|
||||
this.histId = res.result.id;
|
||||
|
||||
this.hist();
|
||||
})
|
||||
},
|
||||
@@ -170,41 +189,45 @@ export default {
|
||||
},
|
||||
savedata(num){
|
||||
if(this.editdata.openTypeBackups == 1 && this.editdata.openType == 9) {
|
||||
this.$message({
|
||||
message: '仅支持公开笔记转私密笔记!',
|
||||
type: 'warning'
|
||||
});
|
||||
this.$message({ message: '仅支持公开笔记转私密笔记!', type: 'warning' });
|
||||
this.editdata.openType == 1;
|
||||
}
|
||||
if(num == 1) {
|
||||
this.editdata.isAuto = true;
|
||||
|
||||
}
|
||||
if(this.imgContent.length > 0) {
|
||||
this.editdata.content = this.imgContent.join();
|
||||
}
|
||||
apiNote.update(this.editdata).then(res=>{
|
||||
if(res.status == 200) {
|
||||
sessionStorage.setItem('isShowTip','');
|
||||
localStorage.removeItem(this.localStorageKey); //清空本地缓存
|
||||
if(num ==1) {//自动保存
|
||||
this.editdata.sysVersion += 1;
|
||||
this.isShowTip = '笔记自动保存成功';
|
||||
setTimeout(()=>{
|
||||
this.isShowTip = '';
|
||||
},10000*2)
|
||||
setTimeout(()=>{ this.isShowTip = ''; },10000*2)
|
||||
} else {
|
||||
this.notedetail()
|
||||
this.$message({message: '笔记保存成功',type: 'success',center: true});
|
||||
// 跳转到笔记列表
|
||||
//跳转到笔记列表
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}else{
|
||||
if(num ==1){
|
||||
console.log('笔记保存失败:'+res.message);
|
||||
}else{
|
||||
this.$message({message: '笔记保存失败:'+res.message,type: 'error',center: true});
|
||||
}
|
||||
}
|
||||
}).catch(()=>{
|
||||
let saveJsonStr = JSON.stringify(this.editdata);
|
||||
//本地保存
|
||||
localStorage.setItem(this.localStorageKey,saveJsonStr);
|
||||
this.isShowTip = '当前网络异常,内容已离线保存,请尝试连接网络后重新保存!';
|
||||
setTimeout(()=>{ this.isShowTip = ''; },10000 * 2)
|
||||
sessionStorage.setItem('isShowTip',this.editdata.content);
|
||||
//this.$message({message: '当前网络异常,内容已离线保存,请尝试连接网络后重新保存!',type: 'warning',center: true});
|
||||
setTimeout(()=>{ this.isShowTip = ''; },10000 * 2);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -215,8 +238,11 @@ export default {
|
||||
this.timer = null
|
||||
},
|
||||
destroyed(){
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
if(this.timer!=null){
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user