Commit e641039a authored by zhengke's avatar zhengke

新增消息提示

parent 11c193a4
......@@ -152,6 +152,7 @@
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.closeDialog();
this.MsgBus.$emit('comMsgTips')
} else {
this.Error(res.data.message);
}
......
......@@ -8,17 +8,26 @@
<div class="nav-middle">
<ul class="clearfix" :style="{width:`${allWindowWidth}px`}">
<li v-for="(item,index) in menuList" v-if="item.MenuUrl!='' && index<=maxLength" :class="{active:item.MenuId==chosenIndex}" @click="goUrl(item.MenuUrl,item.MenuId,index)" >
<span class="big_tittle"><i :class="[fontPub,item.icon]" ></i>{{item.MenuName}}</span>
<span class="big_tittle"><i :class="[fontPub,item.icon]" ></i>
{{item.MenuName}}
<span class="MenuConfirm" v-if="item.fatherCount>0">{{item.fatherCount}}</span>
</span>
<div class="hoverNote"></div>
<!--<div :class="{menuList_son:item.ChildMenu.length>=1}" :style="{width:item.ChildMenu.length>=1 ? ((item.ChildMenu.length*160) + 'px') : '0',left: item.ChildMenu.length>1 ? '-50%' : '0'}" @click.stop>-->
<div :class="{menuList_son:item.ChildMenu.length>=1}" :style="{width:item.ChildMenu.length>=1 ? '1300px' : '0',left:'50px'}" @click.stop>
<div class="menuList_son_item" @mousemove.stop @mouseout.stop>
<div v-for="(son, sIndex) in item.ChildMenu" style="width: 150px;margin-right: 20px">
<p class="menuList_son_one_tittle">{{son.MenuName}}</p>
<p class="menuList_son_one_tittle">
{{son.MenuName}}
<span class="MenuConfirm" v-if="son.childCount>0">{{son.childCount}}</span>
</p>
<div v-for="(grand, gIndex) in son.NewChildMenu" class="menuList_tittle_box">
<p v-if="grand.GCode !== '默认'" class="menuList_son_two_tittle">{{grand.GCode}}</p>
<template v-for="(grandSon, gsIndex) in grand.list">
<p @click.stop="goUrl(grandSon.MenuUrl,grandSon.MenuId,gsIndex)" class="menuList_son_three_tittle"><i :class="[fontPub,JSON.parse(grandSon.MenuStyle).icon ? JSON.parse(grandSon.MenuStyle).icon : 'icon-guanli2']" ></i>{{grandSon.MenuName}}</p>
<p @click.stop="goUrl(grandSon.MenuUrl,grandSon.MenuId,gsIndex)" class="menuList_son_three_tittle"><i :class="[fontPub,JSON.parse(grandSon.MenuStyle).icon ? JSON.parse(grandSon.MenuStyle).icon : 'icon-guanli2']" ></i>
{{grandSon.MenuName}}
<span class="MenuConfirm" v-if="grandSon.Count>0">{{grandSon.Count}}</span>
</p>
</template>
</div>
</div>
......@@ -1327,6 +1336,14 @@ export default {
this.MsgBus.$on('openChat',function(obj){
that.lt(obj)
});
//调用初始化信息提示
this.MsgBus.$on('comMsgTips',function(){
that.getNumber();
});
setInterval(function(){
that.getNumber();
},600000)
const permissionNow = Notification.requestPermission();
var hiddenProperty =
"hidden" in document
......@@ -1373,6 +1390,7 @@ export default {
//获取版本
this.getVersion();
this.getMenu();
// this.getNumber();
this.setCheckMenu();
this.getDynamic();
......@@ -3220,8 +3238,46 @@ export default {
x.icon = menuStyle.icon;
x.color = menuStyle.color;
this.menuList.push(x);
}
});
this.getNumber();
},
getNumber(){
this.menuList.forEach(x=>{
x.fatherCount=0;
x.ChildMenu.forEach(y=>{
y.childCount=0;
})
})
this.apipost("sellorder_post_GetMenuInformationList",{},res => {
if (res.data.resultCode == 1) {
let dataList = res.data.data;
dataList.forEach(item=>{
this.menuList.forEach(x=>{
x.ChildMenu.forEach(y=>{
y.NewChildMenu.forEach(z=>{
z.list.forEach(j=>{
if(j.MenuId==item.MenuId){
j.Count = item.Count;
y.childCount +=j.Count;
}
})
})
})
})
})
this.menuList.forEach(x=>{
x.ChildMenu.forEach(y=>{
x.fatherCount+=y.childCount;
})
})
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//设置菜单选中
setCheckMenu() {
......@@ -4278,4 +4334,15 @@ export default {
margin-bottom: 0 !important;
height: 850px;
}
.MenuConfirm{
display: inline-block;
width:15px;
height:15px;
font-size:12px;
text-align: center;
border-radius: 50%;
background-color: #E95252;
color:#fff;
line-height: 15px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment