Merge branch 'master' of https://git.code.tencent.com/lian-cbtc/jl-client
This commit is contained in:
commit
ac6f3673d4
@ -352,7 +352,7 @@ export default {
|
||||
let resp = {data: {}};
|
||||
resp = await this.getUserRole();
|
||||
if (resp && resp.code == 200) {
|
||||
this.setSimulationPrdType();
|
||||
this.setSimulationPrdType(resp.data.deviceCode);
|
||||
}
|
||||
loadMapDataById(this.mapId, 'simulation');
|
||||
} else {
|
||||
@ -362,6 +362,7 @@ export default {
|
||||
// 设置prdType和role
|
||||
setSimulationPrdType(deviceCode) {
|
||||
// Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
||||
this.showStation = '';
|
||||
switch (this.userRole) {
|
||||
case 'DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '02');
|
||||
@ -375,6 +376,7 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||
this.showStation = deviceCode;
|
||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||
this.jl3dmaintainershow = false;
|
||||
this.drivingShow = false;
|
||||
@ -521,10 +523,11 @@ export default {
|
||||
}
|
||||
},
|
||||
switchStationMode(stationCode) {
|
||||
this.showStation = stationCode;
|
||||
this.showStation = this.centralizedStationMap[stationCode];
|
||||
this.setShowStation(this.showStation);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
@ -532,8 +535,8 @@ export default {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
this.$jlmap.setCenter(stationCode);
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
},
|
||||
setStationList(map) {
|
||||
this.stationList = [];
|
||||
@ -546,7 +549,7 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.stationList.length) {
|
||||
if (this.stationList.length && !this.showStation) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user