优化消息
This commit is contained in:
parent
ffd4ad1549
commit
1e61cae6e8
@ -13,7 +13,7 @@
|
|||||||
<el-icon><sc-icon-Refresh /></el-icon>
|
<el-icon><sc-icon-Refresh /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="msg panel-item" @click="showMsg">
|
<div class="msg panel-item" @click="showMsg">
|
||||||
<el-badge :hidden="msgList.length==0" :value="msgList.length" class="badge" type="danger">
|
<el-badge :hidden="unreadMsgNum.length==0" :value="unreadMsgNum.length" class="badge" type="danger">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<!-- <el-icon-chat-dot-round />-->
|
<!-- <el-icon-chat-dot-round />-->
|
||||||
<sc-icon-Bell />
|
<sc-icon-Bell />
|
||||||
@ -117,7 +117,8 @@
|
|||||||
searchVisible: false,
|
searchVisible: false,
|
||||||
tasksVisible: false,
|
tasksVisible: false,
|
||||||
msg: false,
|
msg: false,
|
||||||
msgList: []
|
msgList: [],
|
||||||
|
unreadMsgNum:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -199,7 +200,10 @@
|
|||||||
},
|
},
|
||||||
getWsResult(res){
|
getWsResult(res){
|
||||||
if(res.data && res.data.type == 22){
|
if(res.data && res.data.type == 22){
|
||||||
this.msgList = res.data.list_backlog_info;
|
if(res.data.list_backlog_info && res.data.list_backlog_info.length>0){
|
||||||
|
this.msgList = res.data.list_backlog_info;
|
||||||
|
this.unreadMsgNum = res.data.list_backlog_info.map(item=>!item.read_status).filter(em=>em);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async msgClick(em) {
|
async msgClick(em) {
|
||||||
|
|||||||
@ -260,6 +260,12 @@
|
|||||||
// this.$socketApi.getSock(this.getWsResult);
|
// this.$socketApi.getSock(this.getWsResult);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
unmounted() {
|
||||||
|
eventBus.$off('sockBack', this.getWsResult);
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route() {
|
$route() {
|
||||||
this.showThis()
|
this.showThis()
|
||||||
@ -293,8 +299,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(apiMenu)
|
|
||||||
tool.data.set('MENU',apiMenu);
|
tool.data.set('MENU',apiMenu);
|
||||||
|
this.menu = apiMenu;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openSetting(){
|
openSetting(){
|
||||||
|
|||||||
@ -71,6 +71,7 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo
|
|||||||
.el-menu .menu-tag {position: absolute;height: 18px;line-height: 18px;background: var(--el-color-danger);font-size: 12px;color: #fff;right: 20px;border-radius:18px;padding:0 6px;}
|
.el-menu .menu-tag {position: absolute;height: 18px;line-height: 18px;background: var(--el-color-danger);font-size: 12px;color: #fff;right: 20px;border-radius:18px;padding:0 6px;}
|
||||||
.el-menu .el-sub-menu__title .menu-tag {right: 35px;top: 5px;}
|
.el-menu .el-sub-menu__title .menu-tag {right: 35px;top: 5px;}
|
||||||
.el-menu--horizontal > li .menu-tag {display: none;}
|
.el-menu--horizontal > li .menu-tag {display: none;}
|
||||||
|
.aminui-side.isCollapse .el-menu > li .menu-tag{display: inline-block;width: auto;height: 18px;line-height: 18px;padding: 0 6px;visibility: initial;right: 15px;top: 2px;}
|
||||||
|
|
||||||
/* 右侧内容 */
|
/* 右侧内容 */
|
||||||
.aminui-body {flex: 1;display: flex;flex-flow: column;}
|
.aminui-body {flex: 1;display: flex;flex-flow: column;}
|
||||||
|
|||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getWsResult(res){
|
getWsResult(res){
|
||||||
if(res.data && (res.data.type == 21 || res.data.type == 22)){
|
if(res.data && (res.data.type == 21)){
|
||||||
if(res.data.type == 21){
|
if(res.data.type == 21){
|
||||||
this.briefing.forEach(item=>{
|
this.briefing.forEach(item=>{
|
||||||
res.data.list_count_info && res.data.list_count_info.main_order_count.forEach(em=>{
|
res.data.list_count_info && res.data.list_count_info.main_order_count.forEach(em=>{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user