实训步骤id调整
This commit is contained in:
parent
011b768adf
commit
50745ec076
@ -174,8 +174,7 @@ class CommandHandle {
|
||||
}
|
||||
if (store.state.trainingNew.trainingSwitch && store.state.trainingNew.trainingDetail.type === 'SCENE') {
|
||||
const stepList = JSON.parse(store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList.find(item => item.id == store.state.trainingNew.stepOrder );
|
||||
console.log(step, stepList, store.state.trainingNew.stepOrder, '********');
|
||||
const step = stepList[store.state.trainingNew.stepOrder - 1];
|
||||
const stepOperation = step.operations[store.state.trainingNew.operateOrder];
|
||||
let flag = true;
|
||||
if (stepOperation.operationType !== id) {
|
||||
|
@ -186,7 +186,7 @@ class Handler {
|
||||
getNewTrainingOperation() {
|
||||
try {
|
||||
const stepList = JSON.parse(store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList.find(item => item.id == store.state.trainingNew.stepOrder );
|
||||
const step = stepList[store.state.trainingNew.stepOrder - 1];
|
||||
const stepOperation = step.operations[store.state.trainingNew.operateOrder];
|
||||
return stepOperation;
|
||||
} catch (e) {
|
||||
|
@ -121,7 +121,7 @@ const training = {
|
||||
},
|
||||
handleCheckNewTrainingResult:({commit, state}, valid) => {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
const step = stepList.find(item => item.id == state.stepOrder );
|
||||
const step = stepList[state.stepOrder - 1];
|
||||
if (valid && step.operations.length === (state.operateOrder + 1 )) {
|
||||
commit('stepOverCountChange');
|
||||
} else if (valid) {
|
||||
|
@ -149,7 +149,9 @@ export default {
|
||||
});
|
||||
},
|
||||
nextStep() {
|
||||
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
|
||||
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList[this.$store.state.trainingNew.stepOrder - 1];
|
||||
endTrainingStep(this.group, step.id).then(resp => {
|
||||
}).catch(() => {
|
||||
this.$message.error('进入下一步实训失败!');
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
<training-jlmap refs="trainingJlmap" />
|
||||
<training-tip ref="trainingTip" />
|
||||
<training-position-tip ref="trainingPositionTip" />
|
||||
<!-- <scene-play-role ref="scenePlayRole" @startTraining="startTraining" />-->
|
||||
<!-- <scene-play-role ref="scenePlayRole" @startTraining="startTraining" />-->
|
||||
<training-menu v-if="trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||
<div class="trainBack">
|
||||
<el-button-group>
|
||||
@ -134,7 +134,9 @@ export default {
|
||||
});
|
||||
},
|
||||
nextStep() {
|
||||
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
|
||||
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList[this.$store.state.trainingNew.stepOrder - 1];
|
||||
endTrainingStep(this.group, step.id).then(resp => {
|
||||
}).catch(() => {
|
||||
this.$message.error('进入下一步实训失败!');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user