代码调整

This commit is contained in:
joylink_cuiweidong 2023-02-07 16:45:34 +08:00
parent 31f0b61e68
commit c81190b284
3 changed files with 66 additions and 4 deletions

View File

@ -113,6 +113,7 @@
<pop-menu ref="popMenu" :menu="menu" />
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<defective-shunting ref="defectiveShunting" @clearOperate="clearOperate" />
</div>
</template>
@ -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,

View File

@ -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);

View File

@ -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',