iscs消息状态增加非空判断
This commit is contained in:
parent
358c717752
commit
43b8751d55
@ -182,93 +182,93 @@ class Iscs {
|
||||
const code = elem.code;
|
||||
// 义乌项目暂时写死
|
||||
if (elem.deviceType === 'IBP') {
|
||||
if (this.iscsDevice['IscsCircle_20']) {
|
||||
if (this.iscsDevice['IscsCircle_20'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_20'].model.fillColor = elem.upStatus.operate ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_20']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_24']) {
|
||||
if (this.iscsDevice['IscsCircle_24'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_24'].model.fillColor = elem.downStatus.operate ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_24']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_17']) {
|
||||
if (this.iscsDevice['IscsCircle_17'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_17'].model.fillColor = elem.upStatus.openCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_17']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_21']) {
|
||||
if (this.iscsDevice['IscsCircle_21'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_21'].model.fillColor = elem.downStatus.openCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_21']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_18']) {
|
||||
if (this.iscsDevice['IscsCircle_18'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_18'].model.fillColor = elem.upStatus.openSideCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_18']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_22']) {
|
||||
if (this.iscsDevice['IscsCircle_22'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_22'].model.fillColor = elem.downStatus.openSideCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_22']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_19']) {
|
||||
if (this.iscsDevice['IscsCircle_19'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_19'].model.fillColor = elem.upStatus.closeCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_19']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_23']) {
|
||||
if (this.iscsDevice['IscsCircle_23'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_23'].model.fillColor = elem.downStatus.closeCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_23']);
|
||||
}
|
||||
} else if (elem.deviceType === 'PSL') {
|
||||
if (this.iscsDevice['IscsCircle_12']) {
|
||||
if (this.iscsDevice['IscsCircle_12'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_12'].model.fillColor = elem.upStatus.operate ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_12']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_13']) {
|
||||
if (this.iscsDevice['IscsCircle_13'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_13'].model.fillColor = elem.downStatus.operate ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_13']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_9']) {
|
||||
if (this.iscsDevice['IscsCircle_9'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_9'].model.fillColor = elem.upStatus.openCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_9']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_14']) {
|
||||
if (this.iscsDevice['IscsCircle_14'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_14'].model.fillColor = elem.downStatus.openCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_14']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_35']) {
|
||||
if (this.iscsDevice['IscsCircle_35'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_35'].model.fillColor = elem.upStatus.closeCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_35']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_36']) {
|
||||
if (this.iscsDevice['IscsCircle_36'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_36'].model.fillColor = elem.downStatus.closeCommand ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_36']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_37']) {
|
||||
if (this.iscsDevice['IscsCircle_37'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_37'].model.fillColor = elem.upStatus.interlockRelease ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_37']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_38']) {
|
||||
if (this.iscsDevice['IscsCircle_38'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_38'].model.fillColor = elem.downStatus.interlockRelease ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_38']);
|
||||
}
|
||||
} else if (elem.deviceType === 'SAFETY_CIRCLE') {
|
||||
if (this.iscsDevice['IscsCircle_26']) {
|
||||
if (this.iscsDevice['IscsCircle_26'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_26'].model.fillColor = elem.upStatus.pfdcFault ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_26']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_28']) {
|
||||
if (this.iscsDevice['IscsCircle_28'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_28'].model.fillColor = elem.downStatus.pfdcFault ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_28']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_25']) {
|
||||
if (this.iscsDevice['IscsCircle_25'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_25'].model.fillColor = elem.upStatus.busFault ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_25']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_29']) {
|
||||
if (this.iscsDevice['IscsCircle_29'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_29'].model.fillColor = elem.downStatus.busFault ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_29']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_27']) {
|
||||
if (this.iscsDevice['IscsCircle_27'] && elem.upStatus) {
|
||||
this.iscsDevice['IscsCircle_27'].model.fillColor = elem.upStatus.safetyCircle ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_27']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_30']) {
|
||||
if (this.iscsDevice['IscsCircle_30'] && elem.downStatus) {
|
||||
this.iscsDevice['IscsCircle_30'].model.fillColor = elem.downStatus.safetyCircle ? '#0C0' : '#F00';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_30']);
|
||||
}
|
||||
@ -279,11 +279,11 @@ class Iscs {
|
||||
const downPsdCodeList = ['FuzhouPsd_1', 'FuzhouPsd_2', 'FuzhouPsd_3', 'FuzhouPsd_4', 'FuzhouPsd_9', 'FuzhouPsd_10', 'FuzhouPsd_11', 'FuzhouPsd_12',
|
||||
'FuzhouPsd_17', 'FuzhouPsd_18', 'FuzhouPsd_20', 'FuzhouPsd_19', 'FuzhouPsd_21', 'FuzhouPsd_22', 'FuzhouPsd_23', 'FuzhouPsd_24', 'FuzhouPsd_25',
|
||||
'FuzhouPsd_26', 'FuzhouPsd_27', 'FuzhouPsd_28', 'FuzhouPsd_29', 'FuzhouPsd_30', 'FuzhouPsd_31', 'FuzhouPsd_32'];
|
||||
if (this.iscsDevice['IscsCircle_57']) {
|
||||
if (this.iscsDevice['IscsCircle_57'] && elem.downStatus) {
|
||||
elem.downStatus && elem.downStatus.isolationMode ? this.iscsDevice['IscsCircle_57'].model.fillColor = '#00CC00' : this.iscsDevice['IscsCircle_57'].model.fillColor = '#FF0000';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_57']);
|
||||
}
|
||||
if (this.iscsDevice['IscsCircle_58']) {
|
||||
if (this.iscsDevice['IscsCircle_58'] && elem.upStatus) {
|
||||
elem.upStatus && elem.upStatus.isolationMode ? this.iscsDevice['IscsCircle_58'].model.fillColor = '#00CC00' : this.iscsDevice['IscsCircle_58'].model.fillColor = '#FF0000';
|
||||
this.$painter.update(this.iscsDevice['IscsCircle_58']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user