退出仿真时清除requestList请求栈堆数据

This commit is contained in:
fan 2021-01-28 10:29:38 +08:00
parent 72e25c49f3
commit 9c341fed70
4 changed files with 7 additions and 3 deletions

View File

@ -232,6 +232,9 @@ const menuOperation = {
spliceRequestList: ({ commit }, request) => {
commit('spliceRequestList', request);
},
resetRequestList: ({ commit }) => {
commit('resetRequestList');
},
/** 西安二号线排列进路保存信号机进路数据 */
setRouteSelectStartSignal: ({ commit }, param) => {
commit('setRouteSelectStartSignal', param);

View File

@ -198,7 +198,6 @@ export default {
const trainNumList = this.$store.state.socket.trainPfiNum;
trainNumList.forEach(stationNum=>{
stationNum.deviceType = 'TRAIN';
console.log(stationNum.num, 'inital');
});
this.$store.dispatch('training/updateMapState', trainNumList);
}

View File

@ -220,6 +220,7 @@ export default {
EventBus.$off('viewLoading');
EventBus.$off('viewProgressAt');
this.$store.dispatch('socket/clearSimulationRoleList');
this.$store.dispatch('menuOperation/resetRequestList');
this.$store.dispatch('map/mapClear');
if (this.$jlmap) {
this.$jlmap.dispose();

View File

@ -232,6 +232,7 @@ export default {
await this.$store.dispatch('training/end', null);
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
await this.$store.dispatch('menuOperation/resetRequestList');
Message.closeAll();
},
methods: {
@ -484,7 +485,7 @@ export default {
if (this.$store.state.training.prdType == '04') {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34,"isTraining");
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining');
} else {
const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox',
@ -527,7 +528,7 @@ export default {
this.setShowStation(this.showStation);
},
setShowStation(stationCode) {
const showStation = this.centralizedStationMap[stationCode];
const showStation = this.centralizedStationMap[stationCode];
const nameList = Object.keys(this.$store.state.map.map);
let list = [];
nameList.forEach(item => {