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