From 7f0aea75c8b9d8161c4102044cb142128f4ceb0f Mon Sep 17 00:00:00 2001 From: zhanghan11 Date: Tue, 9 Apr 2024 17:27:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8A=A5=E8=AD=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=92=8C=E6=8A=A5=E8=AD=A6=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IpcDataShowServiceImpl.java | 15 +++++++- tzipc-ui/src/views/ipc/alarmRecord/index.vue | 5 ++- tzipc-ui/src/views/zf/bigscreen/index.vue | 38 ++++++++++++++----- 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataShowServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataShowServiceImpl.java index 039bcce..90de38b 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataShowServiceImpl.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataShowServiceImpl.java @@ -1,6 +1,8 @@ package com.inspur.ipc.service.impl; +import com.inspur.ipc.domain.IpcAlarmRecord; import com.inspur.ipc.domain.IpcQueryParams; +import com.inspur.ipc.service.IIpcAlarmRecordService; import com.inspur.ipc.service.IIpcDataShowService; import com.inspur.ipc.utils.IpcConstant; import com.inspur.system.service.influx.InfluxDBService; @@ -15,6 +17,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.stream.Collectors; /** * 数据展示界面Service业务层处理 @@ -26,7 +29,8 @@ public class IpcDataShowServiceImpl implements IIpcDataShowService { @Autowired private InfluxDBService influxDBService; - + @Autowired + private IIpcAlarmRecordService ipcAlarmRecordService; /** * 展示数据获取 */ @@ -110,6 +114,15 @@ public class IpcDataShowServiceImpl implements IIpcDataShowService { map.put("oip", oip.get(plcIndex)); map.put("od", od.get(plcIndex)); } + // 查询报警数据 + IpcAlarmRecord ipcAlarmRecord = new IpcAlarmRecord(); + ipcAlarmRecord.setPartKey(part); + ipcAlarmRecord.setAlarmStatus("0"); + List list = ipcAlarmRecordService.selectIpcAlarmRecordList(ipcAlarmRecord); + // 颗粒度报警 + map.put("pzAlarmStr", String.join(IpcConstant.DATA_SEPARATOR,list.stream().filter(ipcAlarmRecord1 -> ipcAlarmRecord1.getNameKey().startsWith("pz")).map(IpcAlarmRecord::getAlarmDetail).collect(Collectors.toList()))); + // 其他报警 + map.put("otherAlarmStr", String.join(IpcConstant.DATA_SEPARATOR,list.stream().filter(ipcAlarmRecord1 -> !ipcAlarmRecord1.getNameKey().startsWith("pz")).map(IpcAlarmRecord::getAlarmDetail).collect(Collectors.toList()))); // 根据位置处理 if (part.endsWith(IpcConstant.OPERATION_PROFILE)) { // 操作侧 diff --git a/tzipc-ui/src/views/ipc/alarmRecord/index.vue b/tzipc-ui/src/views/ipc/alarmRecord/index.vue index 397dbbd..44f4d78 100644 --- a/tzipc-ui/src/views/ipc/alarmRecord/index.vue +++ b/tzipc-ui/src/views/ipc/alarmRecord/index.vue @@ -517,9 +517,12 @@ export default { }; }, created() { + if (this.$route.query.partKey) { + this.queryParams.partKey = this.$route.query.partKey; + } this.getMonitorPartList(); this.getPlcMonitorParamsList(); - this.getSensorMonitorParamsList(); + // this.getSensorMonitorParamsList(); this.getList(); }, methods: { diff --git a/tzipc-ui/src/views/zf/bigscreen/index.vue b/tzipc-ui/src/views/zf/bigscreen/index.vue index d9ced00..de2aab3 100644 --- a/tzipc-ui/src/views/zf/bigscreen/index.vue +++ b/tzipc-ui/src/views/zf/bigscreen/index.vue @@ -55,9 +55,9 @@
-
+
{{ ltAlarmStr }}
@@ -75,9 +75,9 @@
-
+
{{ rtAlarmStr }}
@@ -169,9 +169,9 @@
-
+
{{ lbAlarmStr }}
@@ -263,9 +263,9 @@
-
+
{{ rbAlarmStr }}
@@ -372,6 +372,11 @@ export default { title1: "", title2: "", + ltAlarmStr: "", + lbAlarmStr: "", + rtAlarmStr: "", + rbAlarmStr: "", + timer: null, queryParams: ["rtd", "rto"], total: 0, @@ -622,7 +627,7 @@ export default { const { xPlcData, pz4, pz6, pz14, pz21 } = drive; this.initChart4(xPlcData, pz4, pz6, pz14, pz21); - const { ssat, rot, oip, ov, owc } = drive; + const { pzAlarmStr, otherAlarmStr, ssat, rot, oip, ov, owc } = drive; this.initBottomR1(oip); this.initBottomR2(ov); @@ -630,6 +635,9 @@ export default { this.r1 = ssat; this.r2 = rot; + + this.rtAlarmStr = pzAlarmStr; + this.rbAlarmStr = otherAlarmStr; } // 处理操作侧数据 if (operation) { @@ -639,13 +647,16 @@ export default { const { xPlcData, pz4, pz6, pz14, pz21 } = operation; this.initChart3(xPlcData, pz4, pz6, pz14, pz21); - const { owc, ov, oip, rot, ssat } = operation; + const { pzAlarmStr, otherAlarmStr, owc, ov, oip, rot, ssat } = + operation; this.initBottomL1(owc); this.initBottomL2(ov); this.initBottomL3(oip); this.l1 = rot; this.l2 = ssat; + this.ltAlarmStr = pzAlarmStr; + this.lbAlarmStr = otherAlarmStr; } }); }, @@ -1193,6 +1204,13 @@ export default { jumpSensorDataLog() { this.$router.push("/dataLog/sensor"); }, + // 跳转报警记录页面 + jumpAlarmRecord(param) { + this.$router.push({ + path: "/alarm/alarmRecord", + query: { partKey: param }, + }); + }, }, };