实训调整

This commit is contained in:
fan 2022-09-02 09:45:51 +08:00
parent 663e19e870
commit 0b32f34af2
3 changed files with 10 additions and 2 deletions

View File

@ -440,4 +440,7 @@ export default class SignalButton extends Group {
} }
} }
getAnchorPoint() {} getAnchorPoint() {}
getShapeTipPoint() {
return this.computedPosition;
}
} }

View File

@ -130,7 +130,7 @@ const training = {
flag = (trainingOperate.userOperationType === stepOperation.userOperationType) && flag; flag = (trainingOperate.userOperationType === stepOperation.userOperationType) && flag;
} }
for (const param in stepOperation.params) { for (const param in stepOperation.params) {
flag = (trainingOperate.params[param] === stepOperation.params[param]) && flag; flag = (trainingOperate.param[param] === stepOperation.params[param]) && flag;
} }
if (flag && step.operations.length === (operateIndex + 1 )) { if (flag && step.operations.length === (operateIndex + 1 )) {
commit('stepOverCountChange'); commit('stepOverCountChange');
@ -139,7 +139,11 @@ const training = {
commit('operateOrderIncrease'); commit('operateOrderIncrease');
resolve(); resolve();
} else { } else {
console.error('校验失败;'); const stepList = JSON.parse(state.trainingDetail.stepJson);
const step = stepList.find(item => item.id == state.stepOrder );
const operateIndex = step.operations.findIndex(item => item.id == state.operateOrder);
const stepOperation = step.operations[operateIndex];
console.error('校验失败;', trainingOperate, stepOperation);
reject('校验失败'); reject('校验失败');
} }
}); });

View File

@ -60,6 +60,7 @@ export default {
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;
const stepOrder = this.$store.state.trainingNew.stepOrder; const stepOrder = this.$store.state.trainingNew.stepOrder;
const steps = JSON.parse(trainingDetail.stepJson); const steps = JSON.parse(trainingDetail.stepJson);
console.log(stepOrder, '-----------');
if (steps && steps.length) { if (steps && steps.length) {
const step = steps[stepOrder - 1]; const step = steps[stepOrder - 1];
const distance = 5; const distance = 5;