剧本代码调整
This commit is contained in:
parent
9bad1d2eb2
commit
be4da83dcd
File diff suppressed because one or more lines are too long
@ -22,7 +22,7 @@ class CommandHandle {
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
this.definitionMap[definition.simulationRole][definition.operate] = definition;
|
||||
this.scriptDefinitionMap[definition.id] = definition;
|
||||
this.scriptDefinitionMap[definition.operate] = definition;
|
||||
});
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ class CommandHandle {
|
||||
}
|
||||
}
|
||||
|
||||
getScriptDefinition(operationId) {
|
||||
if (operationId) {
|
||||
return this.scriptDefinitionMap[operationId] || null;
|
||||
getScriptDefinition(operationType) {
|
||||
if (operationType) {
|
||||
return this.scriptDefinitionMap[operationType] || null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -362,11 +362,12 @@ export default {
|
||||
position: absolute;
|
||||
width: 260px;
|
||||
padding: 10px;
|
||||
background: #ccc;
|
||||
background: rgb(250, 246, 3);
|
||||
right: 7px;
|
||||
bottom:45px;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
}
|
||||
.scriptTip::after{
|
||||
content: '';
|
||||
@ -375,7 +376,7 @@ export default {
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 8px solid #cccccc;
|
||||
border-top: 8px solid #faf603;
|
||||
right: 16px;
|
||||
bottom: -7px;
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||
// 三维
|
||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
@ -284,6 +285,7 @@ export default {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.questId = Number(resp.data.questId) || 0;
|
||||
}
|
||||
},
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
this.executeCommandName = operateTypeName + '(' + val.cmdType.label + ')';
|
||||
this.commandDataNew.action.operationType = val.cmdType.value;
|
||||
this.commandDataNew.action.operationId = val.operationId;
|
||||
// this.commandDataNew.action.operationId = val.operationId;
|
||||
this.commandDataNew.action.operationParamMap = val.param;
|
||||
this.messageTips2 = '';
|
||||
}
|
||||
@ -376,6 +376,7 @@ export default {
|
||||
this.messageTips2 = '请在右侧的地图中选择操作';
|
||||
return false;
|
||||
} else {
|
||||
debugger;
|
||||
const group = this.group;
|
||||
const data = this.commandDataNew.action;
|
||||
this.adding = true;
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
}
|
||||
case 'Command':
|
||||
{
|
||||
const command = CommandHandler.getScriptDefinition(element.operationId);
|
||||
const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
const operateType = command.operate.split('_')[0];
|
||||
const data = command.operate.toUpperCase();
|
||||
const operateName = CMD[operateType]['CMD_' + data];
|
||||
|
Loading…
Reference in New Issue
Block a user