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; }