From e3ac46ee78a93a730a7c55679797035682893a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Thu, 7 Sep 2023 11:38:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat=EF=BC=9A=E7=BB=88=E7=AB=AF=E6=8E=92?= =?UTF-8?q?=E5=90=8D=E4=B8=8D=E8=BD=AE=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/group.js | 3 ++- .../src/layout/components/header/index.jsx | 4 ++-- .../projectGroup/containers/bigscreen.jsx | 23 ++++++++++++------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/api/app/lib/controllers/project/group.js b/api/app/lib/controllers/project/group.js index 24bda85..1de3be8 100644 --- a/api/app/lib/controllers/project/group.js +++ b/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) // diff --git a/web/client/src/layout/components/header/index.jsx b/web/client/src/layout/components/header/index.jsx index 5859ed6..d01f168 100644 --- a/web/client/src/layout/components/header/index.jsx +++ b/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 ( {item.hasOwnProperty('items') && item.items.map((ite, idx) => ( diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 273d386..7b41dec 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -192,7 +192,6 @@ const Bigscreen = (props) => { clearInterval(timer); }; }, [proportion]); - return (
@@ -448,13 +447,21 @@ const Bigscreen = (props) => { } } } - return
-
{c.name}
-
{title}
-
{c.offnum + '/' + c.totnum}
-
- })}} 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
+
{c.name}
+
{title}
+
{c.offnum + '/' + c.totnum}
+
+ })} } containerStyle={{ position: "relative", height: "85%", }} + divHeight={"100%"} divId={"interruptchart"}/>
From acbd97d1cd8ea98ccad490afad13de6b436e8b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Thu, 7 Sep 2023 11:44:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=E4=B8=AD=E6=96=AD=E6=8E=92=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E8=BD=AE=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/projectGroup/containers/bigscreen.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 7b41dec..b70cddf 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -447,13 +447,7 @@ const Bigscreen = (props) => { } } } - if (c.offline % 1440 % 60) { - if (title) { - title = title + c.offline % 1440 % 60 + "分" - } else { - title = c.offline % 1440 % 60 + "分" - } - } + return
{c.name}
From e3d4e5d166088b371348cded4f128d656a1d2a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Thu, 7 Sep 2023 11:49:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat=EF=BC=9A=E4=BF=AE=E6=94=B9className?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectGroup/containers/bigscreen.jsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index b70cddf..68e7180 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -380,31 +380,31 @@ const Bigscreen = (props) => { {alarmData && alarmData.length > 0 ? (
-
超阈值个数
+
超阈值个数
-
手动恢复个数
+
手动恢复个数
{alarmData?.map((item, index) => { return (
-
+
{index === 0 ? : index === 1 ? : index === 2 ? : index > 2 ? {index + 1} : '' }
-
{item.name?.length > 5 ? {item.name.substring(0, 5) + '...'} : item.name}
-
+
{item.name?.length > 5 ? {item.name.substring(0, 5) + '...'} : item.name}
+
{item.dealAlarmCount} -
0 ? ((item.dealAlarmCount / biggest) * 100 + '%') : 0), height: '100%', zIndex: 2 }}>
+
0 ? ((item.dealAlarmCount / biggest) * 100 + '%') : 0), height: '100%', zIndex: 2 }}>
{item.alarmCount} -
0 ? ((item.alarmCount / biggest) * 100 + '%') : 0), height: '100%', zIndex: 2 }}>
+
0 ? ((item.alarmCount / biggest) * 100 + '%') : 0), height: '100%', zIndex: 2 }}>
) @@ -412,7 +412,7 @@ const Bigscreen = (props) => { divHeight={"100%"} divId={"chart"} />
-
+
{xData?.map(item => { return
{item}
})}