Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2022-12-05 18:06:20 +08:00
commit cb2168abd6
4 changed files with 36 additions and 47 deletions

View File

@ -109,12 +109,12 @@ class Theme {
} }
// 加载行调菜单组件 // 加载行调菜单组件
loadDispatchWorkMenuComponent(code) { 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); return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
} }
} }
loadLocalWorkMenuComponent(code) { 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); return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
} }
} }

View File

@ -92,26 +92,12 @@ export default {
label: '设置限速', label: '设置限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, 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' isShow: (section, work) => section.type === '02'
}, },
{ {
label: '取消限速', label: '取消限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, 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' isShow: (section, work) => section.type === '02'
}, },
{ {

View File

@ -107,10 +107,9 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
}, },
{ {
label: '引导进路办理', label: this.work === 'localWork' ? '引导进路办理' : '进路引导',
handler: this.guide, handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
isShow: (signal, work) => work === 'localWork'
}, },
{ {
label: '设置联锁自动进路', label: '设置联锁自动进路',
@ -120,7 +119,7 @@ export default {
if (work === 'localWork') { if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0; return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
} else { } else {
return false; return signal.fleetMode !== 0;
} }
} }
}, },
@ -132,7 +131,7 @@ export default {
if (work === 'localWork') { if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1; return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
} else { } else {
return false; return signal.fleetMode !== 1;
} }
} }
}, },
@ -144,7 +143,7 @@ export default {
if (work === 'localWork') { if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi; return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
} else { } else {
return false; return signal.ciControl === 1 || !signal.canSetCi;
} }
} }
}, },
@ -156,7 +155,7 @@ export default {
if (work === 'localWork') { if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1; return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
} else { } else {
return false; return signal.ciControl !== 1;
} }
} }
}, },
@ -174,12 +173,6 @@ export default {
label: '查询进路状态', label: '查询进路状态',
handler: this.detail, handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isShow: (signal, work) => work === 'dispatchWork'
} }
], ],
menuForce: [ menuForce: [

View File

@ -66,15 +66,25 @@ export default {
label: '设置扣车', label: '设置扣车',
handler: this.setDetainTrain, handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain === 1, isDisabled: (stand, work) => {
isShow: (stand, work) => work === 'localWork' if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0;
} else {
return stand.centerHoldTrain !== 0;
}
}
}, },
{ {
label: '取消扣车', label: '取消扣车',
handler: this.cancelDetainTrain, handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1, isDisabled: (stand, work) => {
isShow: (stand, work) => work === 'localWork' if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1;
} else {
return stand.centerHoldTrain !== 1;
}
}
}, },
{ {
label: '强制取消扣车', 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: '全线取消扣车', label: '全线取消扣车',
handler: this.cancelDetainTrainAll, handler: this.cancelDetainTrainAll,
@ -122,14 +120,26 @@ export default {
label: '设置跳停', label: '设置跳停',
handler: this.setJumpStop, handler: this.setJumpStop,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, 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' isShow: (stand, work) => work === 'dispatchWork'
}, },
{ {
label: '取消跳停', label: '取消跳停',
handler: this.cancelJumpStop, handler: this.cancelJumpStop,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, 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' isShow: (stand, work) => work === 'dispatchWork'
}, },
{ {