代码调整

This commit is contained in:
joylink_cuiweidong 2022-12-12 13:17:08 +08:00
parent 835ff2219f
commit 7a3a3db7b4
4 changed files with 28 additions and 10 deletions

View File

@ -10,6 +10,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import HelpAbout from './menuDialog/helpAbout'; import HelpAbout from './menuDialog/helpAbout';
import SetLimitSpeed from './menuDialog/setLimitSpeed'; import SetLimitSpeed from './menuDialog/setLimitSpeed';
import { mapGetters } from 'vuex';
export default { export default {
name: 'DispatchWorkMenuBar', name: 'DispatchWorkMenuBar',
@ -291,9 +292,15 @@ export default {
] ]
}; };
}, },
computed:{
...mapGetters('map', [
'stationList'
])
},
mounted() { mounted() {
this.initMenu(); this.initMenu();
}, },
methods:{ methods:{
initMenu() { initMenu() {
if (this.menuNormal[3]) { if (this.menuNormal[3]) {

View File

@ -64,26 +64,30 @@ export default {
label: '区段激活', label: '区段激活',
handler: this.active, handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE, cmdType: CMD.Section.CMD_SECTION_ACTIVE,
isDisabled: sectionDevice => sectionDevice.cutOff !== 1 isDisabled: sectionDevice => sectionDevice.cutOff !== 1,
isShow: (signal, work) => true
}, },
{ {
label: '区段切除', label: '区段切除',
handler: this.split, handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF, cmdType: CMD.Section.CMD_SECTION_CUT_OFF,
isDisabled: sectionDevice => sectionDevice.cutOff === 1 isDisabled: sectionDevice => sectionDevice.cutOff === 1,
isShow: (signal, work) => true
}, },
{ {
label: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (sectionDevice, work) => false isDisabled: (sectionDevice, work) => false,
isShow: (signal, work) => true
}, },
{ {
label: '全线取消限速', label: '全线取消限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType:CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED, cmdType:CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED,
isDisabled: (sectionDevice, work) => false isDisabled: (sectionDevice, work) => false,
isShow: (signal, work) => true
}, },
{ {
@ -156,6 +160,7 @@ export default {
label: '新建计划车', label: '新建计划车',
handler: this.addPlanTrain, handler: this.addPlanTrain,
cmdType: CMD.Section.CMD_Train_Init_Plan, cmdType: CMD.Section.CMD_Train_Init_Plan,
isDisabled: (sectionDevice, work) => false,
isShow: (sectionDevice, work) => work === 'dispatchWork' isShow: (sectionDevice, work) => work === 'dispatchWork'
}); });
} }

View File

@ -67,7 +67,8 @@ export default {
label: '进路选排', label: '进路选排',
handler: this.arrangementRoute, handler: this.arrangementRoute,
cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE, cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => false isDisabled: (signal, work) => false,
isShow: (signal, work) => true
}, },
{ {
label: '进路取消', label: '进路取消',
@ -80,7 +81,8 @@ export default {
label: '信号重开', label: '信号重开',
handler: this.reopenSignal, handler: this.reopenSignal,
isDisabled: (signal, work) => false, isDisabled: (signal, work) => false,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isShow: (signal, work) => true
}, },
{ {
label: '进路引导', label: '进路引导',
@ -93,13 +95,15 @@ export default {
label: '进路交人工控', label: '进路交人工控',
handler: this.humanControl, handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
isDisabled: (signal, work) => false isDisabled: (signal, work) => false,
isShow: (signal, work) => true
}, },
{ {
label: '进路交自动控', label: '进路交自动控',
handler: this.atsAutoControl, handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
isDisabled: (signal, work) => false isDisabled: (signal, work) => false,
isShow: (signal, work) => true
}, },
{ {
label: '设置联锁自动进路', label: '设置联锁自动进路',
@ -133,7 +137,8 @@ export default {
label: '查询进路状态', label: '查询进路状态',
handler: this.detail, handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL, cmdType: CMD.Signal.CMD_SIGNAL_DETAIL,
isDisabled: (signal, work) => false isDisabled: (signal, work) => false,
isShow: (signal, work) => true
} }
// Local: [ // Local: [
// // { // // {

View File

@ -96,7 +96,8 @@ export default {
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN, cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => { isDisabled: (stand, work) => {
return false; return false;
} },
isShow: (stand, work) => { return true; }
}, },
{ {
label: '强制取消扣车', label: '强制取消扣车',