From 9ef2ac1287a24c35457d2b66fd72da29713c6722 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 31 Aug 2020 16:37:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/cmdPlugin/CommandHandler.js | 7 ++++++- .../displayNew/scriptDisplay/component/scriptTip.vue | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/scripts/cmdPlugin/CommandHandler.js b/src/scripts/cmdPlugin/CommandHandler.js index f410f1627..648f0dd9b 100644 --- a/src/scripts/cmdPlugin/CommandHandler.js +++ b/src/scripts/cmdPlugin/CommandHandler.js @@ -36,7 +36,12 @@ class CommandHandle { getDefinition(cmdType) { if (cmdType) { const simulationRole = Handler.getSimulationRole(); - return this.definitionMap[simulationRole][cmdType.value] || this.definitionMap.Common[cmdType.value] || null; + if (simulationRole) { + return this.definitionMap[simulationRole][cmdType.value] || this.definitionMap.Common[cmdType.value] || null; + } else { + return this.definitionMap.Common[cmdType.value] || null; + } + } else { return null; } diff --git a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue index cec829274..2800a6d6d 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue +++ b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue @@ -56,7 +56,12 @@ export default { }; this.scriptTipMessage = '请对【' + targetName.label + '】下达【' + CommandList[val.commandInitiateVO.commandType] + '】指令'; } else if (val.type == 'Drive') { - // debugger; + if (val.targetSectionCode) { + const section = this.$store.getters['map/getDeviceByCode'](val.targetSectionCode); + if (section && section.name) { + this.scriptTipMessage = '请把车开到区段' + section.name; + } + } } } }, @@ -99,7 +104,7 @@ export default { transform: translateX(-50%); color: #000; line-height: 180%; - z-index: 10; + z-index: 1501; font-size: 14px; }