From 71041b60f259653f8da7baa93b27b0b1f08102aa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Oct 2022 15:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=AE=A1=E6=89=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=90=8E=E5=BE=85=E5=8A=9E=E4=BB=BB=E5=8A=A1=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/views/main-sidebar.vue | 10 +++++++++- .../views/modules/myAgent/CompetencyApplication.vue | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/back/src/views/main-sidebar.vue b/back/src/views/main-sidebar.vue index 40f882b0..7a2f1d0e 100644 --- a/back/src/views/main-sidebar.vue +++ b/back/src/views/main-sidebar.vue @@ -37,6 +37,7 @@ import http from '@/utils/request' import SubMenu from "./main-sidebar-sub-menu"; import returnLocationStr from '@/utils/location'; +import bus from '@/views/bus.js' export default { data() { return { @@ -49,12 +50,19 @@ export default { created() { this.getNum() //this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"]; + //更新我的待办得数量 + bus.$off('updateTaskNum') + bus.$on('updateTaskNum', () => { + this.getNum() + }) }, methods: { getNum(){ - http.get('/act/task/myToDoTaskNum').then(({ data: res }) => { + http.get('/act/task/myToDoTaskNum').then(({ data: res }) => { this.numObject=res.data let menuList= window.SITE_CONFIG["menuList"]; + console.log('menuList====>',menuList); + console.log('this.numObject====>',this.numObject); for(var i=0;i + + + { - this.getDataList() + this.getDataList(); + bus.$emit('updateTaskNum') }) } }