|
|
|
@ -40,6 +40,18 @@
|
|
|
|
|
}}
|
|
|
|
|
</span>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
|
|
<el-tooltip :content="unReadComments" effect="dark" v-if="showPrise">
|
|
|
|
|
<el-badge :value="commentNum" class="item" style="margin-right: 10px;">
|
|
|
|
|
<i class="el-icon-bell right-menu-item hover-effect"
|
|
|
|
|
style="line-height: 50px;color:#FF4D4F;font-size: 25px;padding-right: 0px;margin-top: -9px;"
|
|
|
|
|
@click="gotoComment"></i>
|
|
|
|
|
</el-badge>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip :content="unReadComments" effect="dark" v-else>
|
|
|
|
|
<i class="el-icon-bell right-menu-item hover-effect" style="line-height: 50px;color:grey;font-size: 25px;" @click="gotoComment"></i>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
|
|
|
|
|
|
|
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
|
|
|
@ -138,6 +150,7 @@ import SizeSelect from "@/components/SizeSelect";
|
|
|
|
|
import Search from "@/components/HeaderSearch";
|
|
|
|
|
import RuoYiGit from "@/components/RuoYi/Git";
|
|
|
|
|
import RuoYiDoc from "@/components/RuoYi/Doc";
|
|
|
|
|
import { getUnReadComment } from "@/api/visit/visitComment";
|
|
|
|
|
import {
|
|
|
|
|
listNotice,
|
|
|
|
|
getNotice,
|
|
|
|
@ -164,6 +177,9 @@ export default {
|
|
|
|
|
single1: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple1: true,
|
|
|
|
|
showPrise: false,
|
|
|
|
|
unReadComments: '您有0新的未读消息,请点击查看',
|
|
|
|
|
commentNum:0
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -281,6 +297,30 @@ export default {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 获取未读消息数 */
|
|
|
|
|
getUnReadList() {
|
|
|
|
|
console.log("++未读消息查询++");
|
|
|
|
|
getUnReadComment(this.queryParams).then(response => {
|
|
|
|
|
if(response>0){
|
|
|
|
|
this.unReadComments='您有'+response+'新的未读消息,请点击查看';
|
|
|
|
|
this.commentNum = response;
|
|
|
|
|
this.showPrise = true;
|
|
|
|
|
}else{
|
|
|
|
|
this.showPrise = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 跳转到【消息】 */
|
|
|
|
|
gotoComment() {
|
|
|
|
|
alert("301")
|
|
|
|
|
this.showPrise = false;
|
|
|
|
|
},
|
|
|
|
|
//先执行一次
|
|
|
|
|
this.getUnReadList()
|
|
|
|
|
// 实现轮询
|
|
|
|
|
this.timer = setInterval(() => {
|
|
|
|
|
setTimeout(this.getUnReadList(), 30000);
|
|
|
|
|
}, 30000);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|