调整实训步骤校验

This commit is contained in:
zyy 2020-03-27 14:37:28 +08:00
parent 3a8a3b87d8
commit a95e940255
2 changed files with 13 additions and 8 deletions

View File

@ -52,6 +52,9 @@ class ValidateHandler {
const order = Handler.getOrder();
let valid = false;
if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以
valid = true;
} else {
if (order < steps.length) {
const standard = steps[order];
if (operate && standard &&
@ -61,6 +64,7 @@ class ValidateHandler {
valid = true;
}
}
}
return valid;
}

View File

@ -194,11 +194,12 @@ export default {
'$store.state.map.mapViewLoadedCount': function (val) { //
this.mapBoxP = document.getElementById(this.canvasId).children[0];
this.mapBox = document.getElementsByTagName('canvas');
if (this.trainingId) {
getTrainingStepsDetailNew(this.trainingId, { group: this.group }).then(resp => {
this.trainingObj = resp.data;
this.$store.dispatch('training/setTrainingData', this.trainingObj);
}).catch(error => {
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
});
}
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);