佛山有轨电车 信号机代码调整

This commit is contained in:
joylink_cuiweidong 2022-12-07 15:18:44 +08:00
parent 941dd2d24a
commit e5869a3ce0
2 changed files with 104 additions and 114 deletions

View File

@ -51,120 +51,107 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
// {
// label: '',
// handler: this.cancelTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
// },
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
// {
// label: '', //
// handler: this.humanTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
// },
// {
// label: '',
// handler: this.singalPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// },
// {
// label: '',
// handler: this.singalCancelPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// },
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '设置联锁自动进路',
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '取消联锁自动进路',
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
},
{
label: '取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
},
{
label: '查询进路状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
],
Center: [
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
type: 'separator'
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
]
},
menuNormal: [
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isShow: (signalDevice, work) => work === 'dispatchWork'
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isShow: (signalDevice, work) => work === 'localWork'
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '设置联锁自动进路',
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: signalDevice => signalDevice.fleetMode === 1,
isShow: (signalDevice, work) => work === 'localWork'
},
{
label: '取消联锁自动进路',
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: signalDevice => signalDevice.fleetMode !== 1,
isShow: (signalDevice, work) => work === 'localWork'
},
{
label: '设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
isDisabled: signalDevice => signalDevice.ciControl === 1,
isShow: (signalDevice, work) => work === 'localWork'
},
{
label: '取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
isDisabled: signalDevice => signalDevice.ciControl !== 1,
isShow: (signalDevice, work) => work === 'localWork'
},
{
label: '查询进路状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
// Local: [
// // {
// // label: '',
// // handler: this.cancelTrainRoute,
// // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
// // },
//
// // {
// // label: '', //
// // handler: this.humanTrainRoute,
// // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
// // },
// // {
// // label: '',
// // handler: this.singalPassModel,
// // cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// // },
// // {
// // label: '',
// // handler: this.singalCancelPassModel,
// // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// // },
// ],
],
menuForce: [
{
label: '设置故障',
@ -221,7 +208,14 @@ export default {
};
},
initMenu() {
// this.menu = MenuContextHandler.covert(this.menuNormal);
//
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -56,7 +56,6 @@ export default {
return {
menu: [],
menuNormal: [
{
label: '道岔总定',
handler: this.locate,
@ -196,9 +195,6 @@ export default {
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {