剧本编制代码调整
This commit is contained in:
parent
582543dd22
commit
ca7e92f6a1
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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]; // 判断当前模式
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user