ncc报警客户端切换调整&角色变更客户端切换调整

This commit is contained in:
fan 2023-05-15 17:22:45 +08:00
parent 1bdc04fb8e
commit 47f55642e3
3 changed files with 15 additions and 8 deletions

View File

@ -91,6 +91,9 @@ export default {
}, },
watch: { watch: {
'$store.state.socket.simulationOver':function(val) { '$store.state.socket.simulationOver':function(val) {
if (this.$store.state.training.simulationCreator) {
return;
}
this.$alert('您所在仿真已被销毁', '提示', { this.$alert('您所在仿真已被销毁', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
showClose: false, showClose: false,

View File

@ -195,9 +195,11 @@ export default {
} }
}, },
'$store.state.socket.simulationAlarmInfo': function(val) { '$store.state.socket.simulationAlarmInfo': function(val) {
if (val && val.handleMethod === 'NCC' && this.picture === 'nccWork') { (val || []).forEach(alarm => {
this.pictureChangeByType('lineMonitor'); if (alarm && alarm.handleMethod === 'NCC' && this.picture === 'nccWork') {
} this.pictureChangeByType('lineMonitor');
}
});
} }
}, },
mounted() { mounted() {

View File

@ -13,7 +13,7 @@
direction="rtl" direction="rtl"
:before-close="handleClose" :before-close="handleClose"
> >
<div class="my-drawer-body">k <div class="my-drawer-body">
<div class="my-drawer-title">客户端列表</div> <div class="my-drawer-title">客户端列表</div>
<div style="width: 100%;height: calc(100% - 80px);overflow-y: auto;"> <div style="width: 100%;height: calc(100% - 80px);overflow-y: auto;">
<template v-for="terminal in terminalList"> <template v-for="terminal in terminalList">
@ -57,10 +57,12 @@ export default {
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : []; const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
if (!clientIdList || !clientIdList.length) { if (!clientIdList || !clientIdList.length) {
this.initTerminalList(); this.initTerminalList();
if ((!this.$store.state.trainingNew.trainingDetail || !this.$store.state.trainingNew.trainingDetail.client) && !this.$route.query.client) { if (!this.$store.state.trainingNew.trainingDetail || !this.$store.state.trainingNew.trainingDetail.client) {
this.initPictureShow(); if (this.$route.query.client && !this.nowTerminal) {
} else if (!this.$store.state.trainingNew.trainingDetail || !this.$store.state.trainingNew.trainingDetail.client) { this.changeQueryClient();
this.changeQueryClient(); } else {
this.initPictureShow();
}
} }
} else if (!this.terminalList.length) { } else if (!this.terminalList.length) {
this.initTerminalList(); this.initTerminalList();