Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
7cc0246adf
@ -55,8 +55,8 @@ export default {
|
|||||||
selected: null,
|
selected: null,
|
||||||
operation: null,
|
operation: null,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: '',
|
||||||
|
operateName:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -70,7 +70,8 @@ export default {
|
|||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
// if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
if (this.operateName == CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value) {
|
||||||
return '取消列车进路';
|
return '取消列车进路';
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
@ -100,6 +101,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
|
this.operateName = operate.operateName;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -113,7 +115,8 @@ export default {
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
// if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
if (this.operateName == CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value) {
|
||||||
/** 取消列车进路*/
|
/** 取消列车进路*/
|
||||||
this.cancelTrainRoute();
|
this.cancelTrainRoute();
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
@ -138,10 +141,10 @@ export default {
|
|||||||
cancelTrainRouteFunc() {
|
cancelTrainRouteFunc() {
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation:this.operation,
|
||||||
|
// operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -230,7 +230,8 @@ export default {
|
|||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
// operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
|
operate:this.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||||
param: {
|
param: {
|
||||||
routeCode: this.row.code
|
routeCode: this.row.code
|
||||||
|
@ -253,18 +253,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置进路
|
// 设置进路
|
||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
|
const command = MenuContextHandler.getCommandByCmdType(CMD.Signal.CMD_SIGNAL_SET_ROUTE);
|
||||||
|
if (command) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
// send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
// type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
// label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation:command.id,
|
||||||
|
// operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -274,18 +276,27 @@ export default {
|
|||||||
routes.push(elem);
|
routes.push(elem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$refs.routeSelection.doShow(operate.operation, this.selected, routes);
|
this.$refs.routeSelection.doShow(operate, this.selected, routes);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$refs.noticeInfo.doShow({}, '该指令不存在');
|
||||||
|
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
|
const command = MenuContextHandler.getCommandByCmdType(CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE);
|
||||||
|
if (command) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation:command.id,
|
||||||
|
operateName:command.operate,
|
||||||
|
// operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
}
|
}
|
||||||
@ -296,6 +307,10 @@ export default {
|
|||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$refs.noticeInfo.doShow({}, '该指令不存在');
|
||||||
|
console.error('该指令不存在,可能是指令字典里面没有该指令,可能是指令每句里面没有该指令');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// // 信号封锁
|
// // 信号封锁
|
||||||
// lock() {
|
// lock() {
|
||||||
|
@ -121,6 +121,10 @@ class MenuContextHandler {
|
|||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCommandByCmdType(cmdType) {
|
||||||
|
return CommandHandler.getDefinition(cmdType);
|
||||||
|
}
|
||||||
|
|
||||||
menuBarConvert(menu, mode) {
|
menuBarConvert(menu, mode) {
|
||||||
if (menu) {
|
if (menu) {
|
||||||
if (mode === OperateMode.NORMAL) {
|
if (mode === OperateMode.NORMAL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user