剧本代码调整

This commit is contained in:
joylink_cuiweidong 2020-08-31 16:37:45 +08:00
parent c76205790a
commit 9ef2ac1287
2 changed files with 13 additions and 3 deletions

View File

@ -36,7 +36,12 @@ class CommandHandle {
getDefinition(cmdType) { getDefinition(cmdType) {
if (cmdType) { if (cmdType) {
const simulationRole = Handler.getSimulationRole(); 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 { } else {
return null; return null;
} }

View File

@ -56,7 +56,12 @@ export default {
}; };
this.scriptTipMessage = '请对【' + targetName.label + '】下达【' + CommandList[val.commandInitiateVO.commandType] + '】指令'; this.scriptTipMessage = '请对【' + targetName.label + '】下达【' + CommandList[val.commandInitiateVO.commandType] + '】指令';
} else if (val.type == 'Drive') { } 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%); transform: translateX(-50%);
color: #000; color: #000;
line-height: 180%; line-height: 180%;
z-index: 10; z-index: 1501;
font-size: 14px; font-size: 14px;
} }
</style> </style>