故障报警优化
This commit is contained in:
parent
071bfa90f7
commit
d73dea42ec
@ -132,6 +132,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'ErrrorMessageBox',
|
||||
data() {
|
||||
@ -167,11 +168,20 @@ export default {
|
||||
personGroup:'故障群/应急群、党群信息群',
|
||||
telephoneNotified:'分公司值班领导、主要领导、党群工作部、线网管控中心负责人、分管领导、应急管理部负责人、应急管理室负责人。视情况经领导同意报集团公司。'
|
||||
}],
|
||||
mapAlarmMessage: new Map([
|
||||
['I', 'I类信息'],
|
||||
['II', 'II类信息'],
|
||||
['III', 'III类信息'],
|
||||
['IV', 'IV类信息'],
|
||||
['TRAIN_DELAY', '列车延误']
|
||||
]),
|
||||
showDecisionMessage:{}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
alarmDetailMessage() {
|
||||
return this.$store.state.socket.simulationAlarmInfo;
|
||||
},
|
||||
@ -181,7 +191,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
alarmDetailMessage() {
|
||||
if (this.alarmDetailMessage.length == 1) { this.showAlarm(); } else { console.log(555555); }
|
||||
if (this.alarmDetailMessage.length == 1) { this.showAlarm(); } else { console.log(this.alarmDetailMessage, 555555); }
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -200,20 +210,21 @@ export default {
|
||||
this.playAlarmMusic();
|
||||
this.showDecisionMessage = this.decisionMessage[0];
|
||||
if (this.alarmDetailMessage.length > 0) {
|
||||
this.showAlarmInfo = this.alarmDetailMessage[0];
|
||||
const description = this.showAlarmInfo.description.substring(this.showAlarmInfo.description.indexOf('晚点') + 2);
|
||||
const index = description.indexOf('分');
|
||||
const minuteData = description.substring(0, index);
|
||||
console.log(minuteData, 222);
|
||||
if (minuteData >= 10 && minuteData < 30) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.alarmDetailMessage[0].deviceCode);
|
||||
this.showAlarmInfo.time = this.alarmDetailMessage[0].time;
|
||||
this.showAlarmInfo.level = this.mapAlarmMessage.get(this.alarmDetailMessage[0].level);
|
||||
this.showAlarmInfo.deviceCode = '列车' + station.serviceNumber + station.tripNumber;
|
||||
this.showAlarmInfo.type = this.mapAlarmMessage.get(this.alarmDetailMessage[0].type);
|
||||
const index = this.alarmDetailMessage[0].description.indexOf('列车');
|
||||
this.showAlarmInfo.description = this.alarmDetailMessage[0].description.slice(0, index) + this.showAlarmInfo.deviceCode + this.alarmDetailMessage[0].description.substring(index + 7);
|
||||
if (this.alarmDetailMessage[0].color === 'O') {
|
||||
document.getElementsByTagName('body')[0].style.setProperty('--bg-color', 'orange');
|
||||
this.showDecisionMessage = this.decisionMessage[1];
|
||||
} else if (minuteData >= 30) {
|
||||
} else if (this.alarmDetailMessage[0].color === 'R') {
|
||||
document.getElementsByTagName('body')[0].style.setProperty('--bg-color', 'red');
|
||||
this.showDecisionMessage = this.decisionMessage[1];
|
||||
}
|
||||
}
|
||||
|
||||
this.showAlarmMessage = !this.showAlarmMessage;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
|
Loading…
Reference in New Issue
Block a user