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

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)) {
return Collections.emptyList();
}
//只保留4条
if (faultTypeList.size() > 4) {
List<DictDataDO> subList = faultTypeList.subList(4, faultTypeList.size());
subList.clear();
}
List<LargeScreenFaultCountDTO> dtoList = largeScreenMapper.selectFaultCount();
Map<String, Integer> dtoMap = dtoList.stream().collect(Collectors.toMap(LargeScreenFaultCountDTO::getFaultValue, LargeScreenFaultCountDTO::getFaultCount));
List<LargeScreenFaultDataListVO> list = new ArrayList<>();

View File

@ -49,25 +49,27 @@
<span class="title-font">故障数据分析</span>
</div>
<div class="item-content">
<div
ref="faultChart"
style="height:100%;margin-left: -100px"
></div>
<!-- <div class="fault-icon"></div>-->
<!-- <div class="fault-content">-->
<!-- <div-->
<!-- v-for="(item, index) in faultList"-->
<!-- :key="index"-->
<!-- class="fault-item"-->
<!-- >-->
<!-- <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-->
<!-- ref="faultChart"-->
<!-- style="height:100%;margin-left: -100px"-->
<!-- ></div>-->
<div class="item-content fault-data">
<div class="fault-icon"></div>
<div class="fault-content">
<div
v-for="(item, index) in faultList"
:key="index"
class="fault-item"
>
<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>
@ -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;