北京线 指令代码调整

This commit is contained in:
joylink_cuiweidong 2020-02-18 16:55:30 +08:00
parent 7cc0246adf
commit 12198f0c35
5 changed files with 47 additions and 73 deletions

View File

@ -55,8 +55,7 @@ export default {
selected: null,
operation: null,
stationName: '',
signalName: '',
operateName:''
signalName: ''
};
},
computed: {
@ -70,8 +69,7 @@ export default {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
// if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
if (this.operateName == CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value) {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
@ -101,7 +99,6 @@ export default {
}
}
this.operation = operate.operation;
this.operateName = operate.operateName;
}
this.dialogShow = true;
this.$nextTick(function () {
@ -115,8 +112,7 @@ export default {
mouseCancelState(this.selected);
},
commit() {
// if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
if (this.operateName == CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value) {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
@ -141,8 +137,7 @@ export default {
cancelTrainRouteFunc() {
const operate = {
over: true,
operation:this.operation,
// operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
@ -203,7 +198,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -230,8 +230,7 @@ export default {
if (this.row && this.row.canSetting) {
const operate = {
over: true,
// operation: OperationEvent.Signal.arrangementRoute.menu.operation,
operate:this.operation,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: {
routeCode: this.row.code
@ -257,7 +256,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -253,16 +253,13 @@ export default {
},
//
arrangementRoute() {
const command = MenuContextHandler.getCommandByCmdType(CMD.Signal.CMD_SIGNAL_SET_ROUTE);
if (command) {
const operate = {
start: true,
// send: true,
code: this.selected.code,
// type: MapDeviceType.Signal.type,
// label: MapDeviceType.Signal.label,
operation:command.id,
// operation: OperationEvent.Signal.arrangementRoute.menu.operation,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
@ -281,22 +278,13 @@ export default {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
} else {
this.$refs.noticeInfo.doShow({}, '该指令不存在');
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
}
},
//
cancelTrainRoute() {
const command = MenuContextHandler.getCommandByCmdType(CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE);
if (command) {
const operate = {
start: true,
code: this.selected.code,
operation:command.id,
operateName:command.operate,
// operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
@ -307,10 +295,6 @@ export default {
this.$refs.routeControl.doShow(operate, this.selected);
}
});
} else {
this.$refs.noticeInfo.doShow({}, '该指令不存在');
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
}
},
// //
// lock() {

View File

@ -121,10 +121,6 @@ class MenuContextHandler {
return menu;
}
getCommandByCmdType(cmdType) {
return CommandHandler.getDefinition(cmdType);
}
menuBarConvert(menu, mode) {
if (menu) {
if (mode === OperateMode.NORMAL) {