北京线 指令代码调整
This commit is contained in:
parent
7cc0246adf
commit
12198f0c35
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -253,64 +253,48 @@ 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,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, routes);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, '该指令不存在');
|
||||
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
|
||||
}
|
||||
const operate = {
|
||||
start: true,
|
||||
// send: true,
|
||||
code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, routes);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
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,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, '该指令不存在');
|
||||
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
|
||||
}
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// // 信号封锁
|
||||
// lock() {
|
||||
|
@ -98,7 +98,7 @@ class Handler {
|
||||
const valid = ValidateHandler.vaildate(this.getTrainingMode(), operation);
|
||||
this.afterValid(operation, valid);
|
||||
rtn.valid = valid;
|
||||
|
||||
|
||||
if (operation.cmdType) {
|
||||
const command = this.getCommand(operation);
|
||||
if (command) {
|
||||
|
@ -121,10 +121,6 @@ class MenuContextHandler {
|
||||
return menu;
|
||||
}
|
||||
|
||||
getCommandByCmdType(cmdType) {
|
||||
return CommandHandler.getDefinition(cmdType);
|
||||
}
|
||||
|
||||
menuBarConvert(menu, mode) {
|
||||
if (menu) {
|
||||
if (mode === OperateMode.NORMAL) {
|
||||
|
Loading…
Reference in New Issue
Block a user