西安一号线右键操作代码调整

This commit is contained in:
joylink_cuiweidong 2020-06-19 16:13:21 +08:00
parent 5b5949b23d
commit ee12c33025
2 changed files with 44 additions and 62 deletions

View File

@ -61,10 +61,12 @@ export const menuOperate = {
} }
}, },
Signal:{ Signal:{
// 信号封锁
lock: { lock: {
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}, },
// 信号解封
unlock: { unlock: {
operation: OperationEvent.Signal.unlock.menu.operation, operation: OperationEvent.Signal.unlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
@ -331,20 +333,55 @@ export const menuOperate = {
} }
}, },
LimitControl: { LimitControl: {
// 取消全线临时限速
cancelSpeed: { cancelSpeed: {
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation, operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
} }
}, },
Common: { Common: {
// 设置故障
setFault: { setFault: {
operation: OperationEvent.MixinCommand.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
// 取消故障
cancelFault: { cancelFault: {
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
},
Station:{
// 所有进路交人工控
humanControlALL:{
operation: OperationEvent.Station.humanControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
// 所有进路交ATS自动控
atsAutoControlALL:{
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
// 执行关键操作测试
execKeyOperationTest:{
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
cmdType:CMD.Station.CMD_STATION_KEY_OPERATION_TEST
},
// 上电解锁
powerUnLock:{
operation: OperationEvent.Station.powerUnLock.menu.operation,
cmdType:CMD.Station.CMD_STATION_POWER_ON_UNLOCK
},
// 全站取消联锁自动触发
cancelAutoTrigger:{
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
},
// 全站设置联锁自动触发
setAutoTrigger:{
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
}
} }
}; };

View File

@ -20,6 +20,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
@ -194,98 +195,42 @@ export default {
}, },
// //
setAutoTrigger() { setAutoTrigger() {
const operate = { commitOperate(menuOperate.Station.setAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
// //
cancelAutoTrigger() { cancelAutoTrigger() {
const operate = { commitOperate(menuOperate.Station.cancelAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
// //
powerUnLock() { powerUnLock() {
const operate = { commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected); this.$refs.stationCmdControl.doShow(operate, this.selected);
} }
}).catch(error => {
this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
// //
execKeyOperationTest() { execKeyOperationTest() {
const operate = { commitOperate(menuOperate.Station.execKeyOperationTest, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected); this.$refs.stationCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
humanControlALL() { humanControlALL() {
const operate = { commitOperate(menuOperate.Station.humanControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.humanControlALL.menu.operation,
param:{
stationCode:this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate, this.selected); this.$refs.stationHumanControlAll.doShow(operate, this.selected);
} }
}); });
}, },
// ATS // ATS
atsAutoControlALL() { atsAutoControlALL() {
const operate = { commitOperate(menuOperate.Station.atsAutoControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
param:{
stationCode:this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
} }
}); });