diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/alxeEffective.vue b/src/jmapNew/theme/foshan_01/menus/dialog/alxeEffective.vue deleted file mode 100644 index 110d9adf6..000000000 --- a/src/jmapNew/theme/foshan_01/menus/dialog/alxeEffective.vue +++ /dev/null @@ -1,427 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/childDialog/popupAlarm.vue b/src/jmapNew/theme/foshan_01/menus/dialog/childDialog/popupAlarm.vue deleted file mode 100644 index 98cfc9f16..000000000 --- a/src/jmapNew/theme/foshan_01/menus/dialog/childDialog/popupAlarm.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/foshan_01/menus/dialog/sectionControl.vue index 9e1e4176c..751dc54b7 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/sectionControl.vue @@ -22,7 +22,7 @@ - + 激活 @@ -61,7 +61,6 @@ export default { loading: false, selected: null, operation: '', - isShow: false, stationName: '', sectionName: '', radio: '' @@ -78,9 +77,7 @@ export default { return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; }, title() { - if (this.operation == OperationEvent.Section.lock.menu.operation) { - return '区段封锁'; - } else if (this.operation == OperationEvent.Section.split.menu.operation) { + if (this.operation == OperationEvent.Section.split.menu.operation) { return '区段控制'; } else if (this.operation == OperationEvent.Section.active.menu.operation) { return '区段控制'; @@ -114,13 +111,10 @@ export default { } } this.operation = operate.operation || ''; - this.isShow = false; if (this.operation == OperationEvent.Section.split.menu.operation) { this.radio = '2'; - this.isShow = true; } else if (this.operation == OperationEvent.Section.active.menu.operation) { this.radio = '1'; - this.isShow = true; } } this.dialogShow = true; @@ -135,27 +129,14 @@ export default { this.mouseCancelState(this.selected); }, commit() { - if (this.operation == OperationEvent.Section.lock.menu.operation) { - /** 区段封锁*/ - this.lock(); - } else if (this.operation == OperationEvent.Section.split.menu.operation) { - /** 轨道区段切除*/ + if (this.operation == OperationEvent.Section.split.menu.operation) { + /** 轨道区段切除*/ this.split(); } else if (this.operation == OperationEvent.Section.active.menu.operation) { - /** 轨道区段激活*/ + /** 轨道区段激活*/ this.active(); } }, - // 区段封锁 - lock() { - const operate = { - over: true, - operation: this.operation, - cmdType: CMD.Section.CMD_SECTION_BLOCK - }; - - this.sendCommand(operate); - }, // 轨道区段切除 split() { const operate = { diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/sectionUnLock.vue b/src/jmapNew/theme/foshan_01/menus/dialog/sectionUnLock.vue index 730534019..f2771ff5b 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/sectionUnLock.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/sectionUnLock.vue @@ -101,9 +101,7 @@ export default { return this.dialogShow ? OperationEvent.Section.unlock.confirm.domId : ''; }, title() { - if (this.operation == OperationEvent.Section.unlock.menu.operation) { - return '解除封锁'; - } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + if (this.operation == OperationEvent.Section.fault.menu.operation) { return '区故解'; } return ''; @@ -156,9 +154,7 @@ export default { val: this.messageText2 }; - if (this.operation == OperationEvent.Section.unlock.menu.operation) { - operate.operation = OperationEvent.Section.unlock.choose.operation; - } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + if (this.operation == OperationEvent.Section.fault.menu.operation) { operate.operation = OperationEvent.Section.fault.choose.operation; } @@ -176,9 +172,7 @@ export default { operation: '' }; - if (this.operation == OperationEvent.Section.unlock.menu.operation) { - operate.operation = OperationEvent.Section.unlock.confirm1.operation; - } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + if (this.operation == OperationEvent.Section.fault.menu.operation) { operate.operation = OperationEvent.Section.fault.confirm1.operation; } @@ -201,10 +195,7 @@ export default { cmdType: '' }; - if (this.operation == OperationEvent.Section.unlock.menu.operation) { - operate.operation = OperationEvent.Section.unlock.confirm2.operation; - operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK; - } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + if (this.operation == OperationEvent.Section.fault.menu.operation) { operate.operation = OperationEvent.Section.fault.confirm2.operation; operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK; } @@ -226,9 +217,7 @@ export default { operation: '' }; - if (this.operation == OperationEvent.Section.unlock.menu.operation) { - operate.operation = OperationEvent.Section.unlock.confirm.operation; - } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + if (this.operation == OperationEvent.Section.fault.menu.operation) { operate.operation = OperationEvent.Section.fault.confirm.operation; } diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue b/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue index ee131b501..58e3f3af1 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue @@ -22,16 +22,6 @@ - - - - 激活 - - - - 切除 - - @@ -86,7 +76,6 @@ export default { switchName: '', isLock: false, isTurnBlock: false, - isActive: false, turnRadio: '1', lockRadio: '1', activeRadio: '1' @@ -140,7 +129,6 @@ export default { this.operation = operate.operation; this.isLock = false; this.isTurnBlock = false; - this.isActive = false; if (this.operation == OperationEvent.Switch.locate.menu.operation) { this.isTurnBlock = true; this.turnRadio = '1'; @@ -149,12 +137,6 @@ export default { this.turnRadio = '2'; } else if (this.operation == OperationEvent.Switch.lock.menu.operation) { this.isLock = true; - } else if (this.operation == OperationEvent.Switch.split.menu.operation) { - this.isActive = true; - this.activeRadio = '2'; - } else if (this.operation == OperationEvent.Switch.active.menu.operation) { - this.isActive = true; - this.activeRadio = '1'; } } this.dialogShow = true; @@ -181,12 +163,6 @@ export default { } else if (this.operation == OperationEvent.Switch.reverse.menu.operation) { /** 道岔反位*/ this.reverse(); - } else if (this.operation == OperationEvent.Switch.split.menu.operation) { - /** 区段切除*/ - this.split(); - } else if (this.operation == OperationEvent.Switch.active.menu.operation) { - /** 区段激活*/ - this.active(); } }, // 道岔单锁 @@ -229,24 +205,6 @@ export default { this.sendCommand(operate); }, - // 区段切除 - split() { - const operate = { - over: true, - operation: OperationEvent.Switch.split.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF - }; - this.sendCommand(operate); - }, - // 区段激活 - active() { - const operate = { - over: true, - operation: OperationEvent.Switch.active.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_ACTIVE - }; - this.sendCommand(operate); - }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index 8a2e150b6..d04589eec 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -4,7 +4,6 @@ - @@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu'; import SectionControl from './dialog/sectionControl'; import SectionUnLock from './dialog/sectionUnLock'; import SpeedLimitControl from './dialog/speedLimitControl'; -import AlxeEffective from './dialog/alxeEffective'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; @@ -29,7 +27,6 @@ export default { SectionControl, SectionUnLock, SpeedLimitControl, - AlxeEffective, NoticeInfo }, props: { @@ -59,16 +56,6 @@ export default { label: '区段切除跟踪', handler: this.split, cmdType: CMD.Section.CMD_SECTION_CUT_OFF - }, - { - label: '区段封锁', - handler: this.lock, - cmdType: CMD.Section.CMD_SECTION_BLOCK - }, - { - label: '区段解封', - handler: this.unlock, - cmdType: CMD.Section.CMD_SECTION_UNBLOCK } ], Center: [ @@ -81,17 +68,12 @@ export default { label: '区段跟踪切除', handler: this.split, cmdType: CMD.Section.CMD_SECTION_CUT_OFF - }, - { - label: '确认计轴有效', - handler: this.alxeEffective, - cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE - }, - { - label: '设置临时限速', - handler: this.setSpeed, - cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED } + // { + // label: '设置临时限速', + // handler: this.setSpeed, + // cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED + // } ] }, menuForce: [ @@ -205,23 +187,6 @@ export default { } }); }, - // 确认计轴有效 - alxeEffective() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Section.alxeEffective.menu.operation, - param: { - sectionCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.alxeEffective.doShow(operate, this.selected); - } - }); - }, // 区段激活 active() { const operate = { @@ -238,58 +203,24 @@ export default { this.$refs.sectionControl.doShow(operate, this.selected); } }); - }, - // 区段封锁 - lock() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Section.lock.menu.operation, - param: { - sectionCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionControl.doShow(operate, this.selected); - } - }); - }, - // 区段解锁 - unlock() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Section.unlock.menu.operation, - param: { - sectionCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionUnLock.doShow(operate, this.selected); - } - }); - }, - // 设置速度 - setSpeed() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Section.setSpeed.menu.operation, - param: { - sectionCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedLimitControl.doShow(operate, this.selected); - } - }); } + // // 设置速度 + // setSpeed() { + // const operate = { + // start: true, + // code: this.selected.code, + // operation: OperationEvent.Section.setSpeed.menu.operation, + // param: { + // sectionCode: this.selected.code + // } + // }; + // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + // if (valid) { + // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + // this.$refs.speedLimitControl.doShow(operate, this.selected); + // } + // }); + // } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue index 6a2b247a9..e9c1801f0 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue @@ -4,7 +4,6 @@ - @@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu'; import SwitchControl from './dialog/switchControl'; import SwitchUnLock from './dialog/switchUnLock'; import SpeedLimitControl from './dialog/speedLimitControl'; -import AlxeEffective from './dialog/alxeEffective'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; @@ -30,7 +28,6 @@ export default { SwitchControl, SwitchUnLock, SpeedLimitControl, - AlxeEffective, NoticeInfo }, props: { @@ -47,12 +44,12 @@ export default { menuNormal: { Local: [ { - label: '定操', + label: '道岔总定', handler: this.locate, cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN }, { - label: '反操', + label: '道岔总反', handler: this.reverse, cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN }, @@ -67,7 +64,7 @@ export default { cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK }, { - label: '道岔封锁', + label: '道岔封闭', handler: this.block, cmdType: CMD.Switch.CMD_SWITCH_BLOCK }, @@ -76,52 +73,14 @@ export default { handler: this.unblock, cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK } + // 道岔强板 ], Center: [ - { - label: '定操', - handler: this.locate, - cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN - }, - { - label: '反操', - handler: this.reverse, - cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN - }, - { - type: 'separator' - }, - { - label: '区段激活', - handler: this.active, - cmdType: CMD.Switch.CMD_SWITCH_ACTIVE - }, - { - label: '区段切除', - handler: this.split, - cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF - }, - { - type: 'separator' - }, - { - label: '确认计轴有效', - handler: this.alxeEffective, - cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE - }, - { - label: '设置临时限速', - handler: this.setSpeed, - cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED - }, - { - type: 'separator' - }, - { - label: '查看公里标', - handler: this.undeveloped, - cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED - } + // { + // label: '设置临时限速', + // handler: this.setSpeed, + // cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED + // }, ] }, menuForce: [ @@ -329,74 +288,23 @@ export default { } }); }, - // 区段切除 - split() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.split.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } - }); - }, - // 区段激活 - active() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.active.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } - }); - }, // 设置临时限速 - setSpeed() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.setSpeed.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedLimitControl.doShow(operate, this.selected); - } - }); - }, - // 确认计轴有效 - alxeEffective() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.alxeEffective.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.alxeEffective.doShow(operate, this.selected); - } - }); - }, + // setSpeed() { + // const operate = { + // start: true, + // code: this.selected.code, + // operation: OperationEvent.Switch.setSpeed.menu.operation, + // param: { + // switchCode: this.selected.code + // } + // }; + // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + // if (valid) { + // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + // this.$refs.speedLimitControl.doShow(operate, this.selected); + // } + // }); + // }, undeveloped() { this.doClose(); this.$alert('实现中......', '提示', { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 6a2b247a9..61a60cf34 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -22,6 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; +import {menuOperate, commitOperate} from './utils/menuOperate'; export default { name: 'SwitchMenu', @@ -89,7 +90,7 @@ export default { cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN }, { - type: 'separator' + type: 'separator' }, { label: '区段激活', @@ -102,8 +103,8 @@ export default { cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF }, { - type: 'separator' - }, + type: 'separator' + }, { label: '确认计轴有效', handler: this.alxeEffective, @@ -115,7 +116,7 @@ export default { cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED }, { - type: 'separator' + type: 'separator' }, { label: '查看公里标', @@ -229,172 +230,62 @@ export default { }, // 单操到定位 locate() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.locate.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 单操到反位 reverse() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.reverse.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 道岔单锁 lock() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.lock.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 道岔解锁 unlock() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.unlock.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchUnLock.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchUnLock.doShow(data.operate, this.selected); }); }, // 道岔封锁 block() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.block.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 道岔解封 unblock() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.unblock.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchUnLock.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchUnLock.doShow(data.operate, this.selected); }); }, // 区段切除 split() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.split.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 区段激活 active() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.active.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 设置临时限速 setSpeed() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.setSpeed.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedLimitControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.speedLimitControl.doShow(data.operate, this.selected); }); }, // 确认计轴有效 alxeEffective() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.alxeEffective.menu.operation, - param: { - switchCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.alxeEffective.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.alxeEffective.doShow(data.operate, this.selected); }); }, undeveloped() { diff --git a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js index c4b1ed2b2..b7c73bb05 100644 --- a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js @@ -113,53 +113,58 @@ export const menuOperate = { cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE } }, - // Switch:{ - // lock:{ - // // 道岔单锁 - // operation: OperationEvent.Switch.lock.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - // }, - // unlock:{ - // // 道岔解锁 - // operation: OperationEvent.Switch.unlock.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK - // }, - // turnoutForce:{ - // // 道岔强扳 - // operation: OperationEvent.Switch.turnoutForce.menu.operation - // }, - // locate:{ - // // 单操到定位 - // operation: OperationEvent.Switch.locate.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION - // }, - // reverse:{ - // // 单操到反位 - // operation: OperationEvent.Switch.reverse.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION - // }, - // split:{ - // // 区段切除 - // operation: OperationEvent.Switch.split.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF - // }, - // active:{ - // // 区段激活 - // operation: OperationEvent.Switch.active.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_ACTIVE - // }, - // setSpeed:{ - // // 设置临时限速 - // operation: OperationEvent.Switch.setSpeed.menu.operation, - // cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED - // }, - // alxeEffective:{ - // // 确认计轴有效 - // operation: OperationEvent.Switch.alxeEffective.menu.operation, - // cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE - // } - - // }, + Switch:{ + lock:{ + // 道岔单锁 + operation: OperationEvent.Switch.lock.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK + }, + unlock:{ + // 道岔解锁 + operation: OperationEvent.Switch.unlock.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK + }, + block:{ + // 道岔封锁 + operation: OperationEvent.Switch.block.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_BLOCK + }, + unblock:{ + // 道岔解封 + operation: OperationEvent.Switch.unblock.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK + }, + locate:{ + // 单操到定位 + operation: OperationEvent.Switch.locate.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION + }, + reverse:{ + // 单操到反位 + operation: OperationEvent.Switch.reverse.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION + }, + split:{ + // 区段切除 + operation: OperationEvent.Switch.split.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF + }, + active:{ + // 区段激活 + operation: OperationEvent.Switch.active.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_ACTIVE + }, + setSpeed:{ + // 设置临时限速 + operation: OperationEvent.Switch.setSpeed.menu.operation, + cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED + }, + alxeEffective:{ + // 确认计轴有效 + operation: OperationEvent.Switch.alxeEffective.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE + } + }, StationStand:{ setDetainTrain:{ // 设置扣车