调整:清除步骤是添加步骤一致校验

This commit is contained in:
fan 2023-01-06 15:17:21 +08:00
parent 31d588bf13
commit aaafb5beec
2 changed files with 6 additions and 4 deletions

View File

@ -78,7 +78,9 @@ const training = {
Handler.judgeIsTextSendOperation();
},
clearStepInfo: (state, stepInfo) => {
state.stepInfo = {};
if (state.stepInfo.id == stepInfo.stepId) {
state.stepInfo = {};
}
},
clearTrainingData: (state) => {
state.teachMode = '';
@ -164,8 +166,8 @@ const training = {
setStepInfo: ({ commit }, stepInfo) => {
commit('setStepInfo', stepInfo);
},
clearStepInfo: ({ commit }) => {
commit('clearStepInfo');
clearStepInfo: ({ commit }, stepInfo) => {
commit('clearStepInfo', stepInfo);
},
clearTrainingData: ({ commit }) => {
commit('clearTrainingData');

View File

@ -181,7 +181,7 @@ function handle(data) {
store.dispatch('trainingNew/setStepInfo', msg);
break;
case 'Simulation_Training_Step_Finish':
store.dispatch('trainingNew/clearStepInfo');
store.dispatch('trainingNew/clearStepInfo', msg);
break;
case 'Simulation_Training_Audio_MATCH_RESULT':
store.dispatch('trainingNew/handleMatchVoice', msg);