调整:实训步骤记录增加数据校验
This commit is contained in:
parent
176068f6c8
commit
5c53092511
@ -115,6 +115,9 @@ const training = {
|
|||||||
state.examSwitch = flag;
|
state.examSwitch = flag;
|
||||||
},
|
},
|
||||||
handleStepRecord: (state, { type, stepOperation }) => {
|
handleStepRecord: (state, { type, stepOperation }) => {
|
||||||
|
if (!state.stepRecord.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const step = state.stepRecord[state.stepRecord.length - 1];
|
const step = state.stepRecord[state.stepRecord.length - 1];
|
||||||
if (!step.clientOperations.length || step.clientOperations[step.clientOperations.length - 1].id !== stepOperation.id) {
|
if (!step.clientOperations.length || step.clientOperations[step.clientOperations.length - 1].id !== stepOperation.id) {
|
||||||
step.clientOperations.push({ id: stepOperation.id });
|
step.clientOperations.push({ id: stepOperation.id });
|
||||||
|
Loading…
Reference in New Issue
Block a user