Browse Source

中断时长展示

dev
wenlele 1 year ago
parent
commit
b3cccd6e14
  1. 19
      web/client/src/sections/projectGroup/containers/bigscreen.jsx

19
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) => { {InterruptRank?.map((c, index) => {
let title let title
if (c.offline) { if (c.offline) {
if (c.offline >= 1440) title = Math.floor(c.offline / 1440) + "天" if (c.offline >= 1440 && Math.floor(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 && Math.floor(c.offline % 1440 / 60)) {
if (c.offline % 1440 % 60) title = title + 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 <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', height: 40, alignItems: 'center' }}> return <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', height: 40, alignItems: 'center' }}>
<div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}>{c.name}</div> <div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}>{c.name}</div>
<div style={{ textAlign: 'center', width: '33%' }}>{title}</div> <div style={{ textAlign: 'center', width: '33%' }}>{title}</div>

Loading…
Cancel
Save