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