From 4ebc53b41c0b02b0777434388d5aedeee191c7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Thu, 21 Sep 2023 14:49:41 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Afix=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/group.js | 4 ++-- web/client/src/sections/projectGroup/containers/bigscreen.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 })),