Browse Source

feat:终端排名不轮播

dev
zhaobing’ 1 year ago
parent
commit
e3ac46ee78
  1. 3
      api/app/lib/controllers/project/group.js
  2. 4
      web/client/src/layout/components/header/index.jsx
  3. 23
      web/client/src/sections/projectGroup/containers/bigscreen.jsx

3
api/app/lib/controllers/project/group.js

@ -104,6 +104,7 @@ async function delGroup (ctx) {
}
async function groupStatistic (ctx) {
console.log('ssssssaqqq',ctx.app.camunda)
try {
const { models } = ctx.fs.dc;
const { userId } = ctx.fs.api
@ -218,7 +219,7 @@ async function groupStatistic (ctx) {
strucCount += strucIdArr_.length
//所有结构物的告警
const ss = alarmRes.filter(p => strucIdArr_.some(q => q.strucId == p.StructureId))
todayAlarms += ss.reduce((p, c) => {
todayAlarms= ss.reduce((p, c) => {
return p + c.alarmCount
}, 0)
//

4
web/client/src/layout/components/header/index.jsx

@ -23,7 +23,6 @@ const Header = (props) => {
const [customProjGroupModalVis, setCustomProjGroupModalVis] = useState(false)
const [customProjGroupDelPopVis, setCustomProjGroupDelPopVis] = useState(false)
const [customProjGroupEditData, setCustomProjGroupEditData] = useState(null)
let userRole = user?.pomsUserInfo?.role
let modalRole = []
if (userRole) {
@ -282,12 +281,13 @@ const Header = (props) => {
footer={
<>
{modalRole.length > 0 ? modalRole.map((item, index) => {
console.log('item1',item)
if (item.hasOwnProperty('items')) {
return (
<Nav.Sub
key={index + 'a'}
itemKey={item.itemKey}
text={item.text}
text={item.text==='工单'?`${item.text}${111}`:item.text}
dropdownStyle={{ color: '#F2F3F5' }}
>
{item.hasOwnProperty('items') && item.items.map((ite, idx) => (

23
web/client/src/sections/projectGroup/containers/bigscreen.jsx

@ -192,7 +192,6 @@ const Bigscreen = (props) => {
clearInterval(timer);
};
}, [proportion]);
return (
<div className='project-group'>
<Header match={match} history={history} {...props} />
@ -448,13 +447,21 @@ const Bigscreen = (props) => {
}
}
}
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%' }}>{title}</div>
<div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#F33B3B', fontWeight: 400 }}>{c.offnum + '/' + c.totnum}</div>
</div>
})}</>} containerStyle={{ position: "relative", height: "85%", }}
divHeight={"100%"} divId={"chart"} />
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' }}>
<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%', fontFamily: 'SourceHanSansCN-Regular', color: '#F33B3B', fontWeight: 400 }}>{c.offnum + '/' + c.totnum}</div>
</div>
})}</> } containerStyle={{ position: "relative", height: "85%", }}
divHeight={"100%"} divId={"interruptchart"}/>
</div>
</div>
</Card>

Loading…
Cancel
Save