代码调整
This commit is contained in:
parent
ff50a2c4f5
commit
58d151f9ea
@ -26,7 +26,7 @@ import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
// 开关
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
// import MenuContextHandler from '@/scripts/plugin/MenuContextHandler';
|
||||
import MenuContextHandler from '@/scripts/plugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -57,66 +57,77 @@ export default {
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
commandType:Commands.Signal.arrangementRoute,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeCancel'),
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
commandType:Commands.Signal.cancelTrainRoute,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
commandType:Commands.Signal.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
commandType:Commands.Signal.unlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
commandType:Commands.Signal.reopenSignal,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.guideRouteHandle'),
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
commandType:Commands.Signal.guide,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
handler: this.setAutoInterlock,
|
||||
disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
|
||||
commandType:Commands.Signal.setAutoInterlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
handler: this.cancelAutoInterlock,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
|
||||
commandType:Commands.Signal.cancelAutoInterlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
handler: this.setAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
|
||||
commandType:Commands.Signal.setAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
handler: this.cancelAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
|
||||
commandType:Commands.Signal.cancelAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalOff'),
|
||||
handler: this.signalClose,
|
||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
||||
commandType:Commands.Signal.signalClose,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
@ -125,60 +136,70 @@ export default {
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
commandType:Commands.Signal.arrangementRoute,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeCancel'),
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
commandType:Commands.Signal.cancelTrainRoute,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
commandType:Commands.Signal.lock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
commandType:Commands.Signal.unlock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalOff'),
|
||||
handler: this.signalClose,
|
||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
||||
commandType:Commands.Signal.signalClose,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
commandType:Commands.Signal.reopenSignal,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeGuide'),
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
commandType:Commands.Signal.guide,
|
||||
auth: { station: false, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.humanControl'),
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
commandType:Commands.Signal.humanControl,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.atsAutoControl'),
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
commandType:Commands.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.queryRouteControlMode'),
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
commandType:Commands.Signal.detail,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
]
|
||||
@ -187,12 +208,14 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Signal.setStoppage
|
||||
disabledCallback: MenuDisabledState.Signal.setStoppage,
|
||||
commandType:Commands.Signal.setStoppage
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage,
|
||||
commandType:Commands.Signal.cancelStoppage
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -224,8 +247,8 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
// this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
@ -236,8 +259,8 @@ export default {
|
||||
}
|
||||
|
||||
// debugger;
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
this.menu = menuConvert(this.menu);
|
||||
this.menu = MenuContextHandler.covert(this.menu);
|
||||
// this.menu = menuConvert(this.menu);
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
|
@ -57,6 +57,10 @@ class MenuContextHandler {
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
covert() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default new MenuContextHandler();
|
||||
|
Loading…
Reference in New Issue
Block a user