|
@@ -20,19 +20,34 @@ export async function queryTodo(query) {
|
|
|
params: query
|
|
params: query
|
|
|
});
|
|
});
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
- console.log(res)
|
|
|
|
|
- console.log(res.data.data.planNum)
|
|
|
|
|
|
|
+ // console.log(res)
|
|
|
|
|
+ // console.log(res.data.data.planNum)
|
|
|
store.dispatch('user/setMenuBadge', {
|
|
store.dispatch('user/setMenuBadge', {
|
|
|
path: '/inspectionPlan',
|
|
path: '/inspectionPlan',
|
|
|
value: res.data.data.planNum || 0,
|
|
value: res.data.data.planNum || 0,
|
|
|
color: 'danger'
|
|
color: 'danger'
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
store.dispatch('user/setMenuBadge', {
|
|
store.dispatch('user/setMenuBadge', {
|
|
|
path: '/inspectionWork',
|
|
path: '/inspectionWork',
|
|
|
value: res.data.data.workOrderNum || 0,
|
|
value: res.data.data.workOrderNum || 0,
|
|
|
color: 'danger'
|
|
color: 'danger'
|
|
|
});
|
|
});
|
|
|
|
|
+ store.dispatch('user/setMenuBadge', {
|
|
|
|
|
+ path: '/inspectionProjectTask',
|
|
|
|
|
+ value: res.data.data.taskNum || 0,
|
|
|
|
|
+ color: 'danger'
|
|
|
|
|
+ });
|
|
|
|
|
+ store.dispatch('user/setMenuBadge', {
|
|
|
|
|
+ path: '/inspectionProjectRequest',
|
|
|
|
|
+ value: res.data.data.askFavorNum || 0,
|
|
|
|
|
+ color: 'danger'
|
|
|
|
|
+ });
|
|
|
|
|
+ store.dispatch('user/setMenuBadge', {
|
|
|
|
|
+ path: '/inspectionProjectEntrusted',
|
|
|
|
|
+ value: res.data.data.trusteeNum || 0,
|
|
|
|
|
+ color: 'danger'
|
|
|
|
|
+ });
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
|
}
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
return Promise.reject(new Error(res.data.message));
|