From a95e940255aa4599f2d3572ef3189c008fec95e9 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 27 Mar 2020 14:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/cmdPlugin/ValidateHandler.js | 18 +++++++++++------- src/views/newMap/displayNew/index.vue | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/scripts/cmdPlugin/ValidateHandler.js b/src/scripts/cmdPlugin/ValidateHandler.js index 8451c307b..7a1aeedd8 100644 --- a/src/scripts/cmdPlugin/ValidateHandler.js +++ b/src/scripts/cmdPlugin/ValidateHandler.js @@ -52,13 +52,17 @@ class ValidateHandler { const order = Handler.getOrder(); let valid = false; - if (order < steps.length) { - const standard = steps[order]; - if (operate && standard && - operate.code == standard.code && - operate.operation == standard.operation && - operate.val == standard.val) { - valid = true; + if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以 + valid = true; + } else { + if (order < steps.length) { + const standard = steps[order]; + if (operate && standard && + operate.code == standard.code && + operate.operation == standard.operation && + operate.val == standard.val) { + valid = true; + } } } diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index ce0651584..9c3a83486 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -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);