Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
4ebc53b41c
  1. 4
      api/app/lib/controllers/project/group.js
  2. 2
      web/client/src/sections/projectGroup/containers/bigscreen.jsx

4
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,

2
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 })),

Loading…
Cancel
Save