From b3cccd6e14ef897cea7bafdf2f29148ee6769294 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 1 Sep 2023 19:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E6=96=AD=E6=97=B6=E9=95=BF=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectGroup/containers/bigscreen.jsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index cf98283..781dfc8 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -597,11 +597,22 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou {InterruptRank?.map((c, index) => { let title if (c.offline) { - if (c.offline >= 1440) title = Math.floor(c.offline / 1440) + "天" - if ((c.offline % 1440) >= 60) title = title + Math.floor(c.offline % 1440 / 60) + "时" - if (c.offline % 1440 % 60) title = title + c.offline % 1440 % 60 + "分" + if (c.offline >= 1440 && Math.floor(c.offline / 1440)) title = Math.floor(c.offline / 1440) + "天" + if ((c.offline % 1440) >= 60 && Math.floor(c.offline % 1440 / 60)) { + if (title) { + title = title + Math.floor(c.offline % 1440 / 60) + "时" + } else { + title = Math.floor(c.offline % 1440 / 60) + "时" + } + } + if (c.offline % 1440 % 60) { + if (title) { + title = title + c.offline % 1440 % 60 + "分" + } else { + title = c.offline % 1440 % 60 + "分" + } + } } - return
{c.name}
{title}