大屏报警icon颜色跟随报警等级提交
This commit is contained in:
parent
8c2aa4c303
commit
1af77effbc
@ -249,10 +249,13 @@ public class IpcDataShowServiceImpl implements IIpcDataShowService {
|
||||
// 根据部位区分报警数量
|
||||
List<IpcMonitorField> fieldList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.MONITOR_PART_KEY);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Map<String,Object> dangerMap = new HashMap<>();
|
||||
for (IpcMonitorField field : fieldList) {
|
||||
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("dangerAlarmCount", dangerMap);
|
||||
return dataMap;
|
||||
}
|
||||
}
|
||||
|
@ -118,4 +118,17 @@ public class IpcConstant {
|
||||
* 大屏滚动展示报警条数
|
||||
*/
|
||||
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";
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ export default {
|
||||
position: relative;
|
||||
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);
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
|
@ -38,6 +38,7 @@
|
||||
:class="{ active: currentNav === index }"
|
||||
@click="handleJumpPath(item.path)"
|
||||
>
|
||||
<svg-icon :icon-class="item.meta.icon" />
|
||||
{{ item.meta.title }}</span>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<i class="width-10">R上</i>
|
||||
<i
|
||||
class="el-icon-warning width-10"
|
||||
:class="{'hidden-part' : !isAlarm.rt}"
|
||||
:class="{'hidden-part' : !isAlarm.rt,'danger-color':isDangerAlarm.rt}"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,7 +46,7 @@
|
||||
<i class="width-10">F上</i>
|
||||
<i
|
||||
class="el-icon-warning width-10"
|
||||
:class="{'hidden-part' : !isAlarm.ft}"
|
||||
:class="{'hidden-part' : !isAlarm.ft,'danger-color':isDangerAlarm.ft}"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,7 +61,7 @@
|
||||
<i class="width-10">R下</i>
|
||||
<i
|
||||
class="el-icon-warning width-10"
|
||||
:class="{'hidden-part' : !isAlarm.rb}"
|
||||
:class="{'hidden-part' : !isAlarm.rb,'danger-color':isDangerAlarm.rb}"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -76,7 +76,7 @@
|
||||
<i class="width-10">F下</i>
|
||||
<i
|
||||
class="el-icon-warning width-10"
|
||||
:class="{'hidden-part' : !isAlarm.fb}"
|
||||
:class="{'hidden-part' : !isAlarm.fb,'danger-color':isDangerAlarm.fb}"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -455,6 +455,13 @@ export default {
|
||||
ft: false,
|
||||
fb: false,
|
||||
},
|
||||
// 是否一级报警
|
||||
isDangerAlarm: {
|
||||
rt: false,
|
||||
rb: false,
|
||||
ft: false,
|
||||
fb: false,
|
||||
},
|
||||
xSensorData: [],
|
||||
// 是否显示弹出层
|
||||
// 遮罩层
|
||||
@ -704,6 +711,7 @@ export default {
|
||||
otherOperationAlarmStr,
|
||||
otherDriveAlarmStr,
|
||||
alarmCount,
|
||||
dangerAlarmCount,
|
||||
} = data;
|
||||
// 处理报警数据
|
||||
if (alarmCount) {
|
||||
@ -730,6 +738,30 @@ export default {
|
||||
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.rbAlarmStr = otherDriveAlarmStr;
|
||||
this.ltAlarmStr = pzOperationAlarmStr;
|
||||
@ -1543,6 +1575,9 @@ export default {
|
||||
color: #ffba00;
|
||||
font-size: 2rem;
|
||||
}
|
||||
.danger-color {
|
||||
color: red;
|
||||
}
|
||||
.width-10 {
|
||||
width: 15%;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user