Commit e641039a authored by zhengke's avatar zhengke

新增消息提示

parent 11c193a4
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.closeDialog(); this.closeDialog();
this.MsgBus.$emit('comMsgTips')
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -8,17 +8,26 @@ ...@@ -8,17 +8,26 @@
<div class="nav-middle"> <div class="nav-middle">
<ul class="clearfix" :style="{width:`${allWindowWidth}px`}"> <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)" > <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="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 ? ((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.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 class="menuList_son_item" @mousemove.stop @mouseout.stop>
<div v-for="(son, sIndex) in item.ChildMenu" style="width: 150px;margin-right: 20px"> <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"> <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> <p v-if="grand.GCode !== '默认'" class="menuList_son_two_tittle">{{grand.GCode}}</p>
<template v-for="(grandSon, gsIndex) in grand.list"> <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> </template>
</div> </div>
</div> </div>
...@@ -1327,6 +1336,14 @@ export default { ...@@ -1327,6 +1336,14 @@ export default {
this.MsgBus.$on('openChat',function(obj){ this.MsgBus.$on('openChat',function(obj){
that.lt(obj) that.lt(obj)
}); });
//调用初始化信息提示
this.MsgBus.$on('comMsgTips',function(){
that.getNumber();
});
setInterval(function(){
that.getNumber();
},600000)
const permissionNow = Notification.requestPermission(); const permissionNow = Notification.requestPermission();
var hiddenProperty = var hiddenProperty =
"hidden" in document "hidden" in document
...@@ -1373,6 +1390,7 @@ export default { ...@@ -1373,6 +1390,7 @@ export default {
//获取版本 //获取版本
this.getVersion(); this.getVersion();
this.getMenu(); this.getMenu();
// this.getNumber();
this.setCheckMenu(); this.setCheckMenu();
this.getDynamic(); this.getDynamic();
...@@ -3220,8 +3238,46 @@ export default { ...@@ -3220,8 +3238,46 @@ export default {
x.icon = menuStyle.icon; x.icon = menuStyle.icon;
x.color = menuStyle.color; x.color = menuStyle.color;
this.menuList.push(x); 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() { setCheckMenu() {
...@@ -4278,4 +4334,15 @@ export default { ...@@ -4278,4 +4334,15 @@ export default {
margin-bottom: 0 !important; margin-bottom: 0 !important;
height: 850px; 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> </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