diff --git a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue index 3c4892bce..c703bdf1d 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue @@ -113,6 +113,7 @@ + @@ -130,11 +131,12 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo' import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic'; import { EventBus } from '@/scripts/event-bus'; import {UserOperationType} from '../../../../scripts/ConstDic'; - +import DefectiveShunting from './dialog/defectiveShunting.vue'; export default { name: 'MapButtonMenu', components: { // CenterConfig, + DefectiveShunting, PasswordBox, NoticeInfo, PopMenu, diff --git a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue index b97d609fd..b042aff03 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue @@ -25,6 +25,8 @@ import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import RouteCancel from './menuDialog/routeCancel'; +import { UserOperationType } from '@/scripts/ConstDic'; +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { name: 'SwitchMenu', @@ -108,19 +110,22 @@ export default { }, { label: '岔前 分路不良', - handle: '', + handler: this.beforeForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, isDisabled: (section, station, work) => station.controlMode !== 'Local', isShow: (section, work) => work === 'ctcWork' }, { label: '定位 分路不良', - handle: '', + handler: this.locateForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, isDisabled: (section, station, work) => station.controlMode !== 'Local', isShow: (section, work) => work === 'ctcWork' }, { label: '反位 分路不良', - handle: '', + handler: this.reverseForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, isDisabled: (section, station, work) => station.controlMode !== 'Local', isShow: (section, work) => work === 'ctcWork' } @@ -312,6 +317,57 @@ export default { } }); }, + // 岔前 分路不良 + beforeForkDirective() { + const operate = { + over: true, + cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + operation: OperationEvent.Section.defectiveShunting.menu.operation, + userOperationType: UserOperationType.RIGHTCLICK, + param:{ + sectionCode:this.selected.sectionACode, + shuntingTypeList:['SWITCH_FRONT_SHUNTING'] + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + // if (valid) { + // } + }); + }, + // 定位 分路不良 + locateForkDirective() { + const operate = { + over: true, + cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + operation: OperationEvent.Section.defectiveShunting.menu.operation, + userOperationType: UserOperationType.RIGHTCLICK, + param:{ + sectionCode:this.selected.sectionACode, + shuntingTypeList:['FIXED_POSITION_SHUNTING'] + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + // if (valid) { + // } + }); + }, + // 反位 分路不良 + reverseForkDirective() { + const operate = { + over: true, + cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + operation: OperationEvent.Section.defectiveShunting.menu.operation, + userOperationType: UserOperationType.RIGHTCLICK, + param:{ + sectionCode:this.selected.sectionACode, + shuntingTypeList:['REVERSE_POSITION_SHUNTING'] + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + // if (valid) { + // } + }); + }, // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index ba836c800..eece0cf2f 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -2448,6 +2448,10 @@ export const OperationEvent = { shuntingTypeListChange: { operation: '4282', domId: '_Tips-Section-Defective-Shunting-Change' + }, + menu:{ + operation: '4283', + domId: '_Tips-Section-Defective-Shunting-Menu' } // menuButton: { // operation: '428',