From 1e61cae6e89f4dd4720306c937c5bf94738542c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com>
Date: Mon, 14 Oct 2024 23:18:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/userbar.vue | 10 +++++++---
src/layout/index.vue | 8 +++++++-
src/style/app.scss | 1 +
src/views/home/console/index.vue | 2 +-
4 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue
index 431be40..1df8ed6 100644
--- a/src/layout/components/userbar.vue
+++ b/src/layout/components/userbar.vue
@@ -13,7 +13,7 @@
-
+
@@ -117,7 +117,8 @@
searchVisible: false,
tasksVisible: false,
msg: false,
- msgList: []
+ msgList: [],
+ unreadMsgNum:[]
}
},
created() {
@@ -199,7 +200,10 @@
},
getWsResult(res){
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) {
diff --git a/src/layout/index.vue b/src/layout/index.vue
index b76b8ab..bdcf784 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -260,6 +260,12 @@
// this.$socketApi.getSock(this.getWsResult);
}
},
+ mounted() {
+
+ },
+ unmounted() {
+ eventBus.$off('sockBack', this.getWsResult);
+ },
watch: {
$route() {
this.showThis()
@@ -293,8 +299,8 @@
}
}
})
- console.log(apiMenu)
tool.data.set('MENU',apiMenu);
+ this.menu = apiMenu;
}
},
openSetting(){
diff --git a/src/style/app.scss b/src/style/app.scss
index 5d129a5..adcfe53 100644
--- a/src/style/app.scss
+++ b/src/style/app.scss
@@ -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 .el-sub-menu__title .menu-tag {right: 35px;top: 5px;}
.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;}
diff --git a/src/views/home/console/index.vue b/src/views/home/console/index.vue
index 03ddc65..df4b7d1 100644
--- a/src/views/home/console/index.vue
+++ b/src/views/home/console/index.vue
@@ -132,7 +132,7 @@ export default {
},
methods:{
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){
this.briefing.forEach(item=>{
res.data.list_count_info && res.data.list_count_info.main_order_count.forEach(em=>{