Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2022-10-28 18:17:39 +08:00
commit 93cfeffbc5
2 changed files with 5 additions and 4 deletions

View File

@ -193,9 +193,9 @@ class Handler {
stepOrder = JSON.parse(stepOrder);
let operateOrder = getLocalStorage('operateOrder') || `1`;
operateOrder = JSON.parse(operateOrder);
const step = stepList[stepOrder - 1];
// const index = stepOrder - 1 >= 0 ? stepOrder - 1 : 0;
// const step = stepList[index];
// const step = stepList[stepOrder - 1];
const index = stepOrder - 1 >= 0 ? stepOrder - 1 : 0;
const step = stepList[index];
const stepOperation = step.operations[operateOrder];
return stepOperation;
} catch (e) {

View File

@ -129,7 +129,8 @@ const training = {
},
handleCheckNewTrainingResult:({commit, state}, valid) => {
const stepList = JSON.parse(state.trainingDetail.stepJson);
const step = stepList[state.stepOrder - 1];
const index = state.stepOrder > 0 ? state.stepOrder - 1 : 0;
const step = stepList[index];
if (valid && step.operations.length === (state.operateOrder + 1 )) {
commit('stepOverCountChange');
} else if (valid) {