diff --git a/api/app/lib/controllers/project/group.js b/api/app/lib/controllers/project/group.js index 016dd04..4176e53 100644 --- a/api/app/lib/controllers/project/group.js +++ b/api/app/lib/controllers/project/group.js @@ -595,7 +595,7 @@ async function getProjectWorkOrders(){ const {Op, fn, col} = ctx.fs.dc.ORM.sequelize const { projectIds } = ctx.query if(projectIds&&projectIds.length){ - const projectIdsArr=projectIds.map(Number) + const projectIdsArr=projectIds.split(',').map(Number) const res= await models.FormDataTable.findAll({ attributes: [ 'projectId', @@ -638,7 +638,7 @@ async function getWorkOrdersRepairRank(){ const res= await models.FormDataTable.findAll({ where: { projectIds: { - [Op.in]: projectIdsArr, + [Op.in]: projectIds.split(',').map(Number), }, startTime: { [Op.gte]: oneMonthAgo, diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 49dfd0e..e6f3f19 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -139,7 +139,7 @@ const Bigscreen = (props) => { useEffect(() => { if(groupDetail?.pomsProjectIds&&groupDetail?.pomsProjectIds.length){ - const query=groupDetail?.pomsProjectIds.split(',') + const query=groupDetail?.pomsProjectIds+'' 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 })),