From 1af527df5fc74f3652986031fdf954823cdd6893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Wed, 29 Nov 2023 09:51:53 +0800 Subject: [PATCH] feat:fix bugs --- api/app/lib/schedule/workOrder.js | 4 ++-- .../src/sections/projectGroup/containers/bigscreen.jsx | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/app/lib/schedule/workOrder.js b/api/app/lib/schedule/workOrder.js index e271a81..b116129 100644 --- a/api/app/lib/schedule/workOrder.js +++ b/api/app/lib/schedule/workOrder.js @@ -3,7 +3,7 @@ const schedule = require('node-schedule'); const moment = require('moment') const request = require('superagent'); -let isDev = true +let isDev = false module.exports = function (app, opts,ctx) { const workOrder = app.fs.scheduleInit( @@ -15,7 +15,7 @@ module.exports = function (app, opts,ctx) { async()=>{ try{ //前一次执行时间 - console.log('工单数据抽取开始') + console.log('工单数据抽取开始',moment().format('YYYY-MM-DD HH:mm:ss')) const username = "admin" const password = "fs-workflow" let lastExecutionTime = null; diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 6d5352d..65e6138 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -36,7 +36,6 @@ const Bigscreen = (props) => { const [interruptData,setInterruptData]=useState([]) const [avgTmes,setAvgTimes]=useState([])//平均修复时长数组 // const [queryUserId, setQueryUserId] = useState('') - useEffect(() => { @@ -359,8 +358,8 @@ const Bigscreen = (props) => { areaStyle: { color: '#0e9cff26', }, - data: v.online?.map(f => [moment(f.collect_time).format('YYYY-MM-DD HH'), f.rate.toFixed(1)]) || [] - })) || [] + data: v.online.sort((a,b)=>new Date(b.collect_time)-new Date(a.collect_time))?.map(f => [moment(f.collect_time).format('YYYY-MM-DD HH'), f.rate.toFixed(1)]) || [] + })) || [] }} notMerge={true} lazyUpdate={true}