|
@@ -23,7 +23,7 @@
|
|
|
<div
|
|
|
class="nav-item"
|
|
|
:class="nav.class"
|
|
|
- v-for="(nav, index) in navs"
|
|
|
+ v-for="(nav, index) in computedNaves"
|
|
|
:key="index"
|
|
|
@click="onSelectNav(nav)"
|
|
|
>
|
|
@@ -119,6 +119,11 @@ export default {
|
|
|
icon: 'icon-nav-message',
|
|
|
badge: 0
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '待办',
|
|
|
+ icon: 'icon-daiban',
|
|
|
+ badge: 0
|
|
|
+ },
|
|
|
{
|
|
|
label: '客服',
|
|
|
icon: 'icon-kefu_xian',
|
|
@@ -144,7 +149,8 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('work-bench/navbar', [
|
|
|
- 'messageCount'
|
|
|
+ 'messageCount',
|
|
|
+ 'todoCount'
|
|
|
]),
|
|
|
...mapGetters('work-bench/user', [
|
|
|
'hasExclusiveCustomer',
|
|
@@ -161,7 +167,13 @@ export default {
|
|
|
...mapState('customer', [
|
|
|
'showCustomer',
|
|
|
'customerUrl'
|
|
|
- ])
|
|
|
+ ]),
|
|
|
+ computedNaves () {
|
|
|
+ console.log(this.todoCount)
|
|
|
+ return this.navs.filter(item => {
|
|
|
+ return this.todoCount ? item : item.label !== '待办'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
created () {
|
|
|
// 判断是否配置启用自定义用户信息模块,提供默认配置
|
|
@@ -222,10 +234,12 @@ export default {
|
|
|
async getMessageInfo () {
|
|
|
await this.getMessages()
|
|
|
this.navs.find(v => v.label === '消息中心').badge = this.messageCount > 99 ? '99+' : this.messageCount
|
|
|
+ this.navs.find(v => v.label === '待办').badge = this.todoCount > 99 ? '99+' : this.todoCount
|
|
|
/**
|
|
|
* 对外提供未读消息条数更新事件
|
|
|
*/
|
|
|
this.$BRACE.$emit('update-message-count', this.messageCount)
|
|
|
+ this.$BRACE.$emit('update-todo-count', this.todoCount)
|
|
|
},
|
|
|
/**
|
|
|
* 点击退出登录
|
|
@@ -246,6 +260,10 @@ export default {
|
|
|
this.goSiteHome()
|
|
|
break
|
|
|
}
|
|
|
+ case '待办': {
|
|
|
+ this.goSiteTodo()
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
@@ -314,6 +332,14 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ goSiteTodo () {
|
|
|
+ this.$BRACE.$emit({
|
|
|
+ fKey: 'goSiteTodo',
|
|
|
+ spareFn: (link) => this.$BRACE.methods.open({
|
|
|
+ route: { link }
|
|
|
+ })
|
|
|
+ }, '/swordfish/frontPage/messageCenter/sess/index?type=11')
|
|
|
}
|
|
|
}
|
|
|
}
|