申请审批完成后待办任务数不刷新问题

This commit is contained in:
unknown 2022-10-18 15:10:01 +08:00
parent a7ac2e8a1e
commit 71041b60f2
2 changed files with 18 additions and 2 deletions

View File

@ -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 }) => {
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<menuList.length;i++){
let menu=menuList[i];
if(menu.id=='1541261628388888578'){//

View File

@ -47,6 +47,13 @@
}}</span>
</template>
</el-table-column>
<el-table-column label="申请人所属部门" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.tAbilityApplicationDTOList[0].unit)
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('process.system')"
header-align="center"
@ -161,7 +168,8 @@ export default {
created () {
bus.$off('competencyApplicationInit')
bus.$on('competencyApplicationInit', () => {
this.getDataList()
this.getDataList();
bus.$emit('updateTaskNum')
})
}
}