大屏页面故障数据分析改回原版本

This commit is contained in:
xusd 2024-09-27 15:20:32 +08:00
parent 711e5b5675
commit 1f6595630d
2 changed files with 30 additions and 20 deletions

View File

@ -76,6 +76,11 @@ public class LargeScreenServiceImpl implements LargeScreenService {
if (CollUtil.isEmpty(faultTypeList)) { if (CollUtil.isEmpty(faultTypeList)) {
return Collections.emptyList(); return Collections.emptyList();
} }
//只保留4条
if (faultTypeList.size() > 4) {
List<DictDataDO> subList = faultTypeList.subList(4, faultTypeList.size());
subList.clear();
}
List<LargeScreenFaultCountDTO> dtoList = largeScreenMapper.selectFaultCount(); List<LargeScreenFaultCountDTO> dtoList = largeScreenMapper.selectFaultCount();
Map<String, Integer> dtoMap = dtoList.stream().collect(Collectors.toMap(LargeScreenFaultCountDTO::getFaultValue, LargeScreenFaultCountDTO::getFaultCount)); Map<String, Integer> dtoMap = dtoList.stream().collect(Collectors.toMap(LargeScreenFaultCountDTO::getFaultValue, LargeScreenFaultCountDTO::getFaultCount));
List<LargeScreenFaultDataListVO> list = new ArrayList<>(); List<LargeScreenFaultDataListVO> list = new ArrayList<>();

View File

@ -49,25 +49,27 @@
<span class="title-font">故障数据分析</span> <span class="title-font">故障数据分析</span>
</div> </div>
<div class="item-content"> <div class="item-content">
<div
ref="faultChart"
style="height:100%;margin-left: -100px"
></div>
<!-- <div class="fault-icon"></div>-->
<!-- <div class="fault-content">-->
<!-- <div--> <!-- <div-->
<!-- v-for="(item, index) in faultList"--> <!-- ref="faultChart"-->
<!-- :key="index"--> <!-- style="height:100%;margin-left: -100px"-->
<!-- class="fault-item"--> <!-- ></div>-->
<!-- >--> <div class="item-content fault-data">
<!-- <div :class="changeMark(index)">--> <div class="fault-icon"></div>
<!-- <span style="font-size:14px;font-weight:600;margin-left:11px">{{ item.faultLabel }}</span>--> <div class="fault-content">
<!-- </div>--> <div
<!-- <div class="fault-num">--> v-for="(item, index) in faultList"
<!-- <span style="font-family:'BIAOTI';font-size:24px"> {{ item.faultCount }}</span>--> :key="index"
<!-- </div>--> class="fault-item"
<!-- </div>--> >
<!-- </div>--> <div :class="changeMark(index)">
<span style="font-size:14px;font-weight:600;margin-left:11px">{{ item.faultLabel }}</span>
</div>
<div class="fault-num">
<span style="font-family:'BIAOTI';font-size:24px"> {{ item.faultCount }}</span>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -272,7 +274,7 @@ export default {
}, },
created() { created() {
this.getAlarmCharts(); this.getAlarmCharts();
this.getFaultChart(); // this.getFaultChart();
this.getCompanyAndEquipGrowTrend(); this.getCompanyAndEquipGrowTrend();
this.mapRender(); this.mapRender();
this.initData(); this.initData();
@ -294,6 +296,9 @@ export default {
getAlarmList().then(res=>{ getAlarmList().then(res=>{
this.alarmList = res.data this.alarmList = res.data
}) })
getFaultDataList().then(res=>{
this.faultList = res.data;
})
}, },
closePanel() { closePanel() {
this.showPanel = false; this.showPanel = false;