Commit 13b09625 authored by dcy's avatar dcy

待办流程首页入口

parent 7023b6c6
......@@ -62,3 +62,11 @@ export function getTaskListByProcessInstanceId(processInstanceId) {
method: 'get',
})
}
export function taskTodoCount(){
return request(
{
url:'/bpm/task/todo-count',
method:'get'
}
)
}
......@@ -7,8 +7,11 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<el-badge :value="matterNum !== 0 ? matterNum : '' " class="right-menu-item badge">
<div @click="$router.push('/bpm/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div>
</el-badge>
<el-badge :value="notMessage" class="right-menu-item badge">
<el-badge :value="notMessage !== 0 ? notMessage : '' " class="right-menu-item badge">
<el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unreadMessage" @click="notRead"></el-image>
</el-badge>
......@@ -81,6 +84,7 @@ export default {
},
created() {
this.$store.dispatch('getNotMessage');
this.$store.dispatch('getToDoList');
},
components: {
Breadcrumb,
......@@ -116,7 +120,11 @@ export default {
},
notMessage(){
return this.$store.state.user.notMessage
},
matterNum(){
return this.$store.state.user.matterNum
}
},
methods: {
toggleSideBar() {
......
import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import {getNotReadInternalMessageTotal} from '@/api/system/internalMessage'
import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage'
import {taskTodoCount} from "@/api/bpm/task";
const user = {
state: {
......@@ -11,6 +12,7 @@ const user = {
roles: [],
permissions: [],
notMessage:0,
matterNum:0
},
mutations: {
......@@ -34,6 +36,9 @@ const user = {
},
NOt_MESSAGE:(state, notMessage)=>{
state.notMessage = notMessage;
},
GET_MAATER:(state, matterNum) => {
state.matterNum = matterNum;
}
},
......@@ -163,6 +168,17 @@ const user = {
})
})
},
//获取待办事项
getToDoList({commit}){
return new Promise((resolve,reject) =>{
taskTodoCount().then(r => {
commit('GET_MAATER',r.data)
resolve()
}).catch(err => {
reject(err)
})
})
}
}
}
......
......@@ -154,6 +154,11 @@ export default {
specialDiscount,
warehouseDetails
},
computed:{
matterNum(){
return this.$store.state.user.matterNum
}
},
data() {
return {
// 遮罩层
......@@ -390,11 +395,15 @@ export default {
}
if (pass) {
approveTask(data).then(response => {
let p = this.matterNum
this.$store.commit('GET_MAATER', --p)
this.$modal.msgSuccess("审批通过成功!");
this.getDetail(); // 获得最新详情
});
} else {
rejectTask(data).then(response => {
let p = this.matterNum
this.$store.commit('GET_MAATER', --p)
this.$modal.msgSuccess("审批不通过成功!");
this.getDetail(); // 获得最新详情
});
......@@ -417,6 +426,8 @@ export default {
}
updateTaskAssignee(this.updateAssignee.form).then(response => {
this.$modal.msgSuccess("转派任务成功!");
let p = this.matterNum
this.$store.commit('GET_MAATER', --p)
this.updateAssignee.open = false;
this.getDetail(); // 获得最新详情
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment