|
|
@ -135,24 +135,24 @@ const Bigscreen = (props) => { |
|
|
|
} |
|
|
|
}, [mockData]) |
|
|
|
|
|
|
|
|
|
|
|
console.log('xxx1',actions) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if(groupDetail?.pomsProjectIds&&groupDetail?.pomsProjectIds.length){ |
|
|
|
const query=groupDetail?.pomsProjectIds+'' |
|
|
|
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query}).then(res=>{ |
|
|
|
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query})).then(res=>{ |
|
|
|
if(res.success){ |
|
|
|
setProportion([...res.payload.data?.slice(0, 3)?.map(v => ({ name: pomsProjectBasicAll.find(item=>item.valiue===v.projectId)?.label, value: v.count })), |
|
|
|
{ value: res.payload.data&&res.payload.data.length>3?res.payload.data?.slice(3)?.reduce((p,c)=>{ |
|
|
|
return p+c |
|
|
|
},0):0, name: '其它' }]) |
|
|
|
} |
|
|
|
})) |
|
|
|
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query}).then(res=>{ |
|
|
|
}) |
|
|
|
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query})).then(res=>{ |
|
|
|
if(res.success){ |
|
|
|
setGroupProject(res.payload.data?.slice(0, 10).map(v => ({name:v.formname,duration:v?.endTime.diff(v?.startTime,'hours') })) || []) |
|
|
|
} |
|
|
|
})) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
},[groupDetail]) |
|
|
|