From 1f6595630dd8753d60371c3e813153dc6d1077aa Mon Sep 17 00:00:00 2001 From: xusd Date: Fri, 27 Sep 2024 15:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E9=9D=A2=E6=95=85?= =?UTF-8?q?=E9=9A=9C=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90=E6=94=B9=E5=9B=9E?= =?UTF-8?q?=E5=8E=9F=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../largeScreen/LargeScreenServiceImpl.java | 5 +++ imt-ui/src/views/system/bigscreen/index.vue | 45 ++++++++++--------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/largeScreen/LargeScreenServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/largeScreen/LargeScreenServiceImpl.java index 711e78a..3ffc094 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/largeScreen/LargeScreenServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/largeScreen/LargeScreenServiceImpl.java @@ -76,6 +76,11 @@ public class LargeScreenServiceImpl implements LargeScreenService { if (CollUtil.isEmpty(faultTypeList)) { return Collections.emptyList(); } + //只保留4条 + if (faultTypeList.size() > 4) { + List subList = faultTypeList.subList(4, faultTypeList.size()); + subList.clear(); + } List dtoList = largeScreenMapper.selectFaultCount(); Map dtoMap = dtoList.stream().collect(Collectors.toMap(LargeScreenFaultCountDTO::getFaultValue, LargeScreenFaultCountDTO::getFaultCount)); List list = new ArrayList<>(); diff --git a/imt-ui/src/views/system/bigscreen/index.vue b/imt-ui/src/views/system/bigscreen/index.vue index 9342bf3..4d1ff6d 100644 --- a/imt-ui/src/views/system/bigscreen/index.vue +++ b/imt-ui/src/views/system/bigscreen/index.vue @@ -49,25 +49,27 @@ 故障数据分析
-
- - - - - - - - - - - - - - - + + + + +
+
+
+
+
+ {{ item.faultLabel }} +
+
+ {{ item.faultCount }} +
+
+
+
@@ -272,7 +274,7 @@ export default { }, created() { this.getAlarmCharts(); - this.getFaultChart(); + // this.getFaultChart(); this.getCompanyAndEquipGrowTrend(); this.mapRender(); this.initData(); @@ -294,6 +296,9 @@ export default { getAlarmList().then(res=>{ this.alarmList = res.data }) + getFaultDataList().then(res=>{ + this.faultList = res.data; + }) }, closePanel() { this.showPanel = false;