|
@@ -665,7 +665,11 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--通知弹窗-->
|
|
|
- <el-dialog :visible.sync="centerDialogVisible">
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="centerDialogVisible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :show-close="false">
|
|
|
<div style="margin-left: 30px; font-size: 20px">
|
|
|
<h1>{{ noticedata1.noticetitle }}</h1>
|
|
|
</div>
|
|
@@ -2691,17 +2695,22 @@ export default {
|
|
|
} else {
|
|
|
console.log('进入了标记不为0')
|
|
|
this.badgeshow = false
|
|
|
- // if(this.$store.state.index==1){
|
|
|
- // let data={
|
|
|
- // noticetitle:this.noticedata[0].noticetitle,
|
|
|
- // noticecontent:this.noticedata[0].noticecontent,
|
|
|
- // insertusername:this.noticedata[0].insertusername,
|
|
|
- // inserttime:this.noticedata[0].inserttime,
|
|
|
- // noticeid:this.noticedata[0].noticeId
|
|
|
- // }
|
|
|
- // this.noticedata1=data
|
|
|
- // this.centerDialogVisible=true;
|
|
|
- // }
|
|
|
+ let data={
|
|
|
+ noticetitle:this.noticedata[0].noticetitle,
|
|
|
+ noticecontent:this.noticedata[0].noticecontent,
|
|
|
+ insertusername:this.noticedata[0].insertusername,
|
|
|
+ inserttime:this.noticedata[0].inserttime,
|
|
|
+ noticeid:this.noticedata[0].noticeId
|
|
|
+ }
|
|
|
+ //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
|
|
|
+ if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
|
|
|
+ this.noticedata1=data;
|
|
|
+ this.centerDialogVisible=true;
|
|
|
+ window.top.localStorage.setItem('noticeId', data.noticeid)
|
|
|
+ // window.top.localStorage.setItem('noticeTime', new Date().getTime())
|
|
|
+ }else{
|
|
|
+ console.log("暂无新的通知,不展示");
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
console.log('进入了标记值为null的值')
|