This commit is contained in:
fan 2022-09-30 16:58:53 +08:00
parent d8686ec6af
commit 63674aba5b
2 changed files with 56 additions and 11 deletions

View File

@ -572,6 +572,27 @@ const socket = {
},
setSimulationAlarmInfo: (state, data) => {
state.simulationAlarmInfo = data;
},
setStandPfiNum: (state, data) => {
state.standPfiNum = data;
},
setTrainPfiNum: (state, data) => {
state.trainPfiNum = data;
},
setTrainPfiBL: (state, data) => {
state.trainPfiBL = data;
},
trainingReloadCountIncrease: (state) => {
state.trainingReloadCount++;
},
setSimulationPslStatus: (state, data) => {
state.simulationPslStatus = data;
},
setSimulationPlanChange: (state, data) => {
state.simulationPlanChange = data;
},
setRailCtcStatusMsg: (state, data) => {
state.railCtcStatusMsg = data;
}
},
@ -588,8 +609,8 @@ const socket = {
setSimulationSpeed: ({ commit }, speed) => {
commit('setSimulationSpeed', speed);
},
setStationPfiNum: ({ commit }) => {
commit('setStationPfiNum', null);
setStationPfiNum: ({ commit }, data) => {
commit('setStationPfiNum', data);
},
setEquipmentStatus: ({ commit }, data = []) => {
@ -742,6 +763,30 @@ const socket = {
},
setSimulationAlarmInfo: ({ commit }, data) => {
commit('setSimulationAlarmInfo', data);
},
setStandPfiNum: ({ commit }, data) => {
commit('setStandPfiNum', data);
},
setTrainPfiNum: ({ commit }, data) => {
commit('setTrainPfiNum', data);
},
setTrainPfiBL: ({ commit }, data) => {
commit('setTrainPfiBL', data);
},
setLPFstrategy: ({ commit }, data) => {
commit('setLPFstrategy', data);
},
trainingReloadCountIncrease: ({ commit }) => {
commit('trainingReloadCountIncrease');
},
setSimulationPslStatus: ({ commit }, data) => {
commit('setSimulationPslStatus', data);
},
setSimulationPlanChange: ({ commit }, data) => {
commit('setSimulationPlanChange', data);
},
setRailCtcStatusMsg: ({ commit }, data) => {
commit('setRailCtcStatusMsg', data);
}
}
};

View File

@ -113,19 +113,19 @@ function handle(state, data) {
store.dispatch('socket/setSimulationAlarmInfo', msg);
break;
case 'STATION_PFI_NUM':
state.stationPfiNum = msg;
store.dispatch('socket/setStationPfiNum', msg);
break;
case 'STAND_PFI':
state.standPfiNum = msg;
store.dispatch('socket/setStandPfiNum', msg);
break;
case 'TRAIN_PFI_NUM':
state.trainPfiNum = msg;
store.dispatch('socket/setTrainPfiNum', msg);
break;
case 'TRAIN_PFI_BL':
state.trainPfiBL = msg;
store.dispatch('socket/setTrainPfiBL', msg);
break;
case 'LPF_STRATEGY_RECOMMEND':
state.LPFstrategy = msg;
store.dispatch('socket/setLPFstrategy', msg);
break;
case 'Simulation_Scenes_Reload':
if (msg) {
@ -133,18 +133,18 @@ function handle(state, data) {
} else {
store.dispatch('training/over');
}
state.trainingReloadCount++;
store.dispatch('socket/trainingReloadCountIncrease');
break;
case 'Simulation_PslStatus':
state.simulationPslStatus = msg;
store.dispatch('socket/setSimulationPslStatus', msg);
break;
// 运行图加线/抽线/变化推送消息
case 'Simulation_Trip_Plan_Change':
state.simulationPlanChange = msg;
store.dispatch('socket/setSimulationPlanChange', msg);
break;
// 占线板信息
case 'Simulation_RailCtcStatus':
state.railCtcStatusMsg = msg;
store.dispatch('socket/setRailCtcStatusMsg', msg);
break;
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
state.voiceBroadcastMsgs = [];