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;