南京二号线调整

This commit is contained in:
fan 2022-12-28 15:36:57 +08:00
parent edadc872ed
commit e508b60cc2

View File

@ -83,7 +83,7 @@ import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import LogDetail from './menuDialog/logDetail';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { assignUsersPlayRoles } from '@/api/jointSimulation';
export default {
name: 'MenuBar',
components: {
@ -307,8 +307,8 @@ export default {
});
this.colsNum = 24 / this.centralizedStationList1.length;
if (centralizedStationList.length) {
if (this.$store.state.map.showCentralizedStationCode) {
this.stationCode = this.$store.state.map.showCentralizedStationCode;
if (this.centralizedMap[this.$store.state.training.roleDeviceCode]) {
this.stationCode = this.centralizedMap[this.$store.state.training.roleDeviceCode];
} else {
this.stationCode = centralizedStationList[0].code;
}
@ -316,8 +316,13 @@ export default {
},
switchShowStation(stationCode) {
this.stationCode = stationCode;
this.$store.dispatch('map/setShowCentralizedStationNum');
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
const member = this.$store.state.training.memberList.find(member => member.type === 'STATION_SUPERVISOR' && member.deviceCode === stationCode);
const data = [{userId: this.userId, memberId:member.id}];
assignUsersPlayRoles(data, this.$route.query.group).then(() => {
console.log('切换角色!');
}).catch(e => {
this.$message.error('切换车站失败!');
});
},
undeveloped() {
this.doClose();