diff --git a/src/jmapNew/shape/Section/EAxle.js b/src/jmapNew/shape/Section/EAxle.js index c7d07decd..492efc9ec 100644 --- a/src/jmapNew/shape/Section/EAxle.js +++ b/src/jmapNew/shape/Section/EAxle.js @@ -257,7 +257,6 @@ export default class EAxle111 extends Group { setStyle(styles) { if (this.model.shape.isSpecial) { - this.isogonInside.setStyle(styles); this.isogonOutside.setStyle(styles); this.line1.setStyle(styles); this.line2.setStyle(styles); diff --git a/src/scripts/cmdPlugin/Handler.js b/src/scripts/cmdPlugin/Handler.js index 1fde94d33..3c6075115 100644 --- a/src/scripts/cmdPlugin/Handler.js +++ b/src/scripts/cmdPlugin/Handler.js @@ -101,7 +101,7 @@ class Handler { const command = this.getCommand(operation); if (command) { // 判断当前是否是剧本 添加动作指令操作 - if (store.state.scriptRecord.isScriptCommand) { + if (store.state.scriptRecord.isScriptCommand && store.state.scriptRecord.bgSet ) { store.dispatch('scriptRecord/updateScriptCommand', {operationId:command.id, cmdType:operation.cmdType, param:command.get()}); resolve(rtn); } else { diff --git a/src/scripts/cmdPlugin/MenuContextHandler.js b/src/scripts/cmdPlugin/MenuContextHandler.js index 3ec7adf69..464a4a8dd 100644 --- a/src/scripts/cmdPlugin/MenuContextHandler.js +++ b/src/scripts/cmdPlugin/MenuContextHandler.js @@ -62,8 +62,7 @@ class MenuContextHandler { const selected = this.getCurrentStateObject(); let menu = []; const control = this.getStationControl(selected); - - if (control) { + if (control && (!store.state.scriptRecord.bgSet || store.state.scriptRecord.isScriptCommand)) { if (this.getPrdType() != '') { const type = State2SimulationMap[this.getPrdType()]; const status = State2ControlMap[control.controlMode]; // 判断当前模式 diff --git a/src/views/scriptManage/scriptRecord/addAction.vue b/src/views/scriptManage/scriptRecord/addAction.vue index 06edacbf2..ed776e389 100644 --- a/src/views/scriptManage/scriptRecord/addAction.vue +++ b/src/views/scriptManage/scriptRecord/addAction.vue @@ -221,11 +221,21 @@ export default { // this.commandDataNew.action.operationId = val.operationId; this.commandDataNew.action.operationParamMap = val.param; this.messageTips2 = ''; + }, + 'commandDataNew.action.memberId':function(val) { + if (val) { + this.$store.dispatch('scriptRecord/updateIsScriptCommand', true); + } else { + this.$store.dispatch('scriptRecord/updateIsScriptCommand', false); + } } }, mounted() { this.initData(); }, + beforeDestroy() { + this.$store.dispatch('scriptRecord/updateIsScriptCommand', false); + }, methods:{ initData() { this.buttonName = this.$t('scriptRecord.addConversitionButton'); @@ -362,10 +372,16 @@ export default { }, changeMember(member) { if (member) { + if (this.isFirstTips) { + this.$message('请在右侧地图上选择操作'); + this.isFirstTips = false; + } this.messageTips1 = ''; this.executeCommandName = ''; this.commandDataNew.action.operationType = ''; this.commandDataNew.action.operationParamMap = {}; + this.$store.dispatch('scriptRecord/updateIsScriptCommand', true); + this.switchMode(member); } }, addCommandActionNew() { @@ -537,6 +553,22 @@ export default { if (!this.drawWay) { this.$refs.command.resetData(); } + }, + switchMode(role) { + let prdType = ''; + const memberInfo = this.memberList.find(member=>{ + return member.id == role; + }); + if (memberInfo) { + if (memberInfo.role == '行值') { + prdType = '01'; + } else if (memberInfo.role == '行调') { + prdType = '02'; + } else if (memberInfo.role == '司机') { + prdType = '04'; + } + } + this.$store.dispatch('training/setPrdType', prdType); } } };