大铁线路 剧本调整
This commit is contained in:
parent
4d8fbdf8c8
commit
7328ac596a
@ -121,6 +121,9 @@ export default {
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -165,9 +168,14 @@ export default {
|
||||
'$store.state.scriptRecord.userRole':function (val) {
|
||||
this.userRole = val;
|
||||
},
|
||||
'$store.state.training.roleDeviceCode':function (val) {
|
||||
if (val) {
|
||||
this.setShowStation(val);
|
||||
// '$store.state.training.roleDeviceCode':function (val) {
|
||||
// if (val) {
|
||||
// this.setShowStation(val);
|
||||
// }
|
||||
// },
|
||||
'$store.state.socket.simulationRoleList':function(list) {
|
||||
if (list && list.length) { // 人员变化监控
|
||||
this.checkRoleChange(list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,6 +218,22 @@ export default {
|
||||
changeShowMap() {
|
||||
this.$emit('changeShowMap', false);
|
||||
},
|
||||
|
||||
checkRoleChange(data) {
|
||||
data.forEach(item => {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && item.type == 'STATION_SUPERVISOR') {
|
||||
// this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.deviceCode = item.deviceCode;
|
||||
this.setShowStation(item.deviceCode);
|
||||
// this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||
this.$nextTick(() => {
|
||||
if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const list = [];
|
||||
|
Loading…
Reference in New Issue
Block a user