代码调整
This commit is contained in:
parent
a10ef8fa1b
commit
68f730da24
@ -109,12 +109,12 @@ class Theme {
|
||||
}
|
||||
// 加载行调菜单组件
|
||||
loadDispatchWorkMenuComponent(code) {
|
||||
if (['02', '10', '16'].includes(code)) {
|
||||
if (['02', '10', '11', '16'].includes(code)) {
|
||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
|
||||
}
|
||||
}
|
||||
loadLocalWorkMenuComponent(code) {
|
||||
if (['02', '10', '16'].includes(code)) {
|
||||
if (['02', '10', '11', '16'].includes(code)) {
|
||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
|
||||
}
|
||||
}
|
||||
|
@ -92,26 +92,12 @@ export default {
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.speedUpLimit !== -1;
|
||||
} else {
|
||||
return section.speedUpLimit !== -1;
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.speedUpLimit === -1;
|
||||
} else {
|
||||
return section.speedUpLimit === -1;
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
|
@ -107,10 +107,9 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '引导进路办理',
|
||||
label: this.work === 'localWork' ? '引导进路办理' : '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
@ -120,7 +119,7 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
|
||||
} else {
|
||||
return false;
|
||||
return signal.fleetMode !== 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -132,7 +131,7 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
|
||||
} else {
|
||||
return false;
|
||||
return signal.fleetMode !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -144,7 +143,7 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
|
||||
} else {
|
||||
return false;
|
||||
return signal.ciControl === 1 || !signal.canSetCi;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -156,7 +155,7 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
|
||||
} else {
|
||||
return false;
|
||||
return signal.ciControl !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -174,12 +173,6 @@ export default {
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
},
|
||||
{
|
||||
label: '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
isShow: (signal, work) => work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
|
@ -66,15 +66,25 @@ export default {
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||
isDisabled: stand => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain === 1,
|
||||
isShow: (stand, work) => work === 'localWork'
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: stand => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1,
|
||||
isShow: (stand, work) => work === 'localWork'
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
@ -100,18 +110,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '全线取消扣车',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
@ -122,14 +120,26 @@ export default {
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
isDisabled: stand => stand.allSkip !== 0,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return stand.allSkip !== 0;
|
||||
}
|
||||
},
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
isDisabled: stand => stand.allSkip !== 1 && stand.assignSkip !== 1,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return stand.allSkip !== 1 || stand.assignSkip !== 1;
|
||||
}
|
||||
},
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user