大屏报警icon颜色跟随报警等级提交

This commit is contained in:
zhanghan11 2024-04-22 09:54:38 +08:00
parent 8c2aa4c303
commit 1af77effbc
5 changed files with 57 additions and 5 deletions

View File

@ -249,10 +249,13 @@ public class IpcDataShowServiceImpl implements IIpcDataShowService {
// 根据部位区分报警数量 // 根据部位区分报警数量
List<IpcMonitorField> fieldList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.MONITOR_PART_KEY); List<IpcMonitorField> fieldList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.MONITOR_PART_KEY);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
Map<String,Object> dangerMap = new HashMap<>();
for (IpcMonitorField field : fieldList) { for (IpcMonitorField field : fieldList) {
map.put(field.getFieldValue(), list.stream().anyMatch(ipcAlarmRecord1 -> ipcAlarmRecord1.getPartKey().equals(field.getFieldValue()))); map.put(field.getFieldValue(), list.stream().anyMatch(ipcAlarmRecord1 -> ipcAlarmRecord1.getPartKey().equals(field.getFieldValue())));
dangerMap.put(field.getFieldValue(), list.stream().anyMatch(ipcAlarmRecord1 -> ipcAlarmRecord1.getPartKey().equals(field.getFieldValue()) && IpcConstant.ALARM_LEVEL1.equals(ipcAlarmRecord1.getAlarmLevel())));
} }
dataMap.put("alarmCount", map); dataMap.put("alarmCount", map);
dataMap.put("dangerAlarmCount", dangerMap);
return dataMap; return dataMap;
} }
} }

View File

@ -118,4 +118,17 @@ public class IpcConstant {
* 大屏滚动展示报警条数 * 大屏滚动展示报警条数
*/ */
public static final Long BIGSCREEN_ALARM_RECORD_NUM_10 = 10L; public static final Long BIGSCREEN_ALARM_RECORD_NUM_10 = 10L;
/**
* 报警等级-一级
*/
public static final String ALARM_LEVEL1 = "1";
/**
* 报警等级-二级
*/
public static final String ALARM_LEVEL2 = "2";
/**
* 报警等级-三级
*/
public static final String ALARM_LEVEL3 = "3";
} }

View File

@ -327,7 +327,7 @@ export default {
position: relative; position: relative;
display: inline-block; display: inline-block;
} }
.vertical .org-chart-node-label .org-chart-node-label-inner { .org-chart-node-label .org-chart-node-label-inner {
// box-shadow: 0 1px 10px rgba(31, 35, 41, 0.08); // box-shadow: 0 1px 10px rgba(31, 35, 41, 0.08);
display: inline-block; display: inline-block;
padding: 10px; padding: 10px;

View File

@ -38,6 +38,7 @@
:class="{ active: currentNav === index }" :class="{ active: currentNav === index }"
@click="handleJumpPath(item.path)" @click="handleJumpPath(item.path)"
> >
<svg-icon :icon-class="item.meta.icon" />
{{ item.meta.title }}</span> {{ item.meta.title }}</span>
</template> </template>
</div> </div>

View File

@ -31,7 +31,7 @@
<i class="width-10">R上</i> <i class="width-10">R上</i>
<i <i
class="el-icon-warning width-10" class="el-icon-warning width-10"
:class="{'hidden-part' : !isAlarm.rt}" :class="{'hidden-part' : !isAlarm.rt,'danger-color':isDangerAlarm.rt}"
></i> ></i>
</div> </div>
</div> </div>
@ -46,7 +46,7 @@
<i class="width-10">F上</i> <i class="width-10">F上</i>
<i <i
class="el-icon-warning width-10" class="el-icon-warning width-10"
:class="{'hidden-part' : !isAlarm.ft}" :class="{'hidden-part' : !isAlarm.ft,'danger-color':isDangerAlarm.ft}"
></i> ></i>
</div> </div>
</div> </div>
@ -61,7 +61,7 @@
<i class="width-10">R下</i> <i class="width-10">R下</i>
<i <i
class="el-icon-warning width-10" class="el-icon-warning width-10"
:class="{'hidden-part' : !isAlarm.rb}" :class="{'hidden-part' : !isAlarm.rb,'danger-color':isDangerAlarm.rb}"
></i> ></i>
</div> </div>
</div> </div>
@ -76,7 +76,7 @@
<i class="width-10">F下</i> <i class="width-10">F下</i>
<i <i
class="el-icon-warning width-10" class="el-icon-warning width-10"
:class="{'hidden-part' : !isAlarm.fb}" :class="{'hidden-part' : !isAlarm.fb,'danger-color':isDangerAlarm.fb}"
></i> ></i>
</div> </div>
</div> </div>
@ -455,6 +455,13 @@ export default {
ft: false, ft: false,
fb: false, fb: false,
}, },
//
isDangerAlarm: {
rt: false,
rb: false,
ft: false,
fb: false,
},
xSensorData: [], xSensorData: [],
// //
// //
@ -704,6 +711,7 @@ export default {
otherOperationAlarmStr, otherOperationAlarmStr,
otherDriveAlarmStr, otherDriveAlarmStr,
alarmCount, alarmCount,
dangerAlarmCount,
} = data; } = data;
// //
if (alarmCount) { if (alarmCount) {
@ -730,6 +738,30 @@ export default {
this.isAlarm.fb = false; this.isAlarm.fb = false;
} }
} }
//
if (dangerAlarmCount) {
const { rtd, rto, rbd, rbo, ftd, fto, fbd, fbo } = dangerAlarmCount;
if (rtd || rto) {
this.isDangerAlarm.rt = true;
} else {
this.isDangerAlarm.rt = false;
}
if (rbd || rbo) {
this.isDangerAlarm.rb = true;
} else {
this.isDangerAlarm.rb = false;
}
if (ftd || fto) {
this.isDangerAlarm.ft = true;
} else {
this.isDangerAlarm.ft = false;
}
if (fbd || fbo) {
this.isDangerAlarm.fb = true;
} else {
this.isDangerAlarm.fb = false;
}
}
this.rtAlarmStr = pzDriveAlarmStr; this.rtAlarmStr = pzDriveAlarmStr;
this.rbAlarmStr = otherDriveAlarmStr; this.rbAlarmStr = otherDriveAlarmStr;
this.ltAlarmStr = pzOperationAlarmStr; this.ltAlarmStr = pzOperationAlarmStr;
@ -1543,6 +1575,9 @@ export default {
color: #ffba00; color: #ffba00;
font-size: 2rem; font-size: 2rem;
} }
.danger-color {
color: red;
}
.width-10 { .width-10 {
width: 15%; width: 15%;
} }