代码调整
This commit is contained in:
parent
f1ab35ce4b
commit
c8c9ec4b43
@ -2,12 +2,12 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-deplot-button ref="menuDeplotButton" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'"/>
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-deplot-button ref="menuDeplotButton" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
|
@ -23,7 +23,6 @@ import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
@ -48,6 +47,12 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -55,8 +60,7 @@ export default {
|
||||
menu: [],
|
||||
clickNum:0,
|
||||
oldSelected:null,
|
||||
menuNormal: {
|
||||
Local: [
|
||||
menuNormal: [
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
@ -70,12 +74,14 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
|
||||
isDisabled: signal => signal.blockade === 1
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
||||
isDisabled: signal => signal.blockade !== 1
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
@ -90,27 +96,54 @@ export default {
|
||||
{
|
||||
label: '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '引导进路办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||
isDisabled: signal => signal.fleetMode === 1,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
||||
isDisabled: signal => signal.fleetMode === 0,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||
isDisabled: signal => signal.ciControl === 1,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
||||
isDisabled: signal => signal.ciControl !== 0,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '查询进路控制模式',
|
||||
@ -118,79 +151,6 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeCancel'),
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalOff'),
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '引导进路办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
// handler: this.setAutoInterlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
// handler: this.cancelAutoInterlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
// handler: this.setAutoTrigger,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
// handler: this.cancelAutoTrigger,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
// },
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '查询进路控制模式',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
@ -299,7 +259,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.word) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
|
@ -38,12 +38,50 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
menuNormal: [
|
||||
{
|
||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '全站进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '全站进路ATS自排',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuNormal1: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||
@ -55,18 +93,6 @@ export default {
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.powerUnLock'),
|
||||
// handler: this.powerUnLock,
|
||||
// auth: { station: true, center: false }
|
||||
// // cmdType: CMD.Station.
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||
// handler: this.execKeyOperationTest,
|
||||
// auth: { station: true, center: false }
|
||||
// // cmdType: CMD.Station.
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
@ -84,13 +110,6 @@ export default {
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||
// handler: this.execKeyOperationTest,
|
||||
// auth: { station: false, center: true },
|
||||
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
// // cmdType: CMD.Section.
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
|
@ -41,6 +41,12 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user