代码调整
This commit is contained in:
parent
63f5bac82a
commit
ea6ebc0bc3
@ -137,7 +137,8 @@ export default {
|
||||
} else {
|
||||
return signal.fleetMode !== 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
@ -149,7 +150,8 @@ export default {
|
||||
} else {
|
||||
return signal.fleetMode !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
@ -157,11 +159,12 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return signal.ciControl === 1 && !signal.canSetCi;
|
||||
return signal.ciControl === 1 || !signal.canSetCi;
|
||||
} else {
|
||||
return signal.ciControl === 1 && !signal.canSetCi;
|
||||
return signal.ciControl === 1 || !signal.canSetCi;
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
@ -173,7 +176,8 @@ export default {
|
||||
} else {
|
||||
return signal.ciControl !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
@ -181,7 +185,8 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
isDisabled: (signal, work) => {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
@ -189,12 +194,14 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
isDisabled: (signal, work) => {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL,
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
|
@ -101,7 +101,8 @@ export default {
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
@ -113,7 +114,8 @@ export default {
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
}
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
@ -193,8 +195,8 @@ export default {
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
const status = judgeStationControl(this.selected.code, this.selected.stationCode, this.work);
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) || !status : true;
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
|
||||
|
@ -71,9 +71,10 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return stand.stationHoldTrain !== 0;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 0;
|
||||
return stand.stationHoldTrain !== 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
roleDisabled: this.work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
@ -83,26 +84,21 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return stand.stationHoldTrain !== 1;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 1;
|
||||
return stand.stationHoldTrain !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
roleDisabled: this.work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
return false;
|
||||
},
|
||||
isShow: (section, work) => work === 'dispatchWork'
|
||||
isShow: (section, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
|
||||
isDisabled: (stand, work) => {
|
||||
return false;
|
||||
}
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
},
|
||||
{
|
||||
label: '全线取消扣车',
|
||||
@ -121,6 +117,7 @@ export default {
|
||||
return stand.allSkip !== 0;
|
||||
}
|
||||
},
|
||||
roleDisabled: this.work === 'dispatchWork',
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
@ -134,6 +131,7 @@ export default {
|
||||
return stand.allSkip !== 1 && stand.assignSkip !== 1;
|
||||
}
|
||||
},
|
||||
roleDisabled: this.work === 'dispatchWork',
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
@ -202,7 +200,10 @@ export default {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
const status = judgeStationControl(this.selected.stationCode, this.selected.deviceStationCode, this.work);
|
||||
let status = judgeStationControl(this.selected.stationCode, this.selected.deviceStationCode, this.work);
|
||||
if (menuItem.roleDisabled) {
|
||||
status = true;
|
||||
}
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
|
@ -126,17 +126,13 @@ export default {
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
return false;
|
||||
}
|
||||
isShow: (switchDevice, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
return false;
|
||||
}
|
||||
isShow: (switchDevice, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '道岔设置限速',
|
||||
|
Loading…
Reference in New Issue
Block a user