赛总指示调整
This commit is contained in:
parent
4bfa9c78b8
commit
6142c2e90e
@ -35,7 +35,7 @@ export default {
|
|||||||
TrainOperation,
|
TrainOperation,
|
||||||
SwitchControl,
|
SwitchControl,
|
||||||
SignalControl,
|
SignalControl,
|
||||||
OperationPlanDetail
|
OperationPlanDetail
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -232,7 +232,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
trainControlShow() {
|
trainControlShow() {
|
||||||
this.$refs.trainOperation.doShow();
|
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
||||||
|
if (station && station.controlMode === 'Local') {
|
||||||
|
this.$refs.trainOperation.doShow();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
if (this.$store.state.training.simulationCreator) {
|
if (this.$store.state.training.simulationCreator) {
|
||||||
|
@ -55,12 +55,18 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: [
|
menuNormal: [
|
||||||
|
// {
|
||||||
|
// label: 'Increase the number of trips',
|
||||||
|
// handler: this.addSpare,
|
||||||
|
// cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
|
||||||
|
// isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||||
|
// isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
label: 'Increase the number of trips',
|
label: 'Add Train',
|
||||||
handler: this.addSpare,
|
handler: this.loadSpare,
|
||||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
|
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN,
|
||||||
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
isDisabled: (section, station, work) => station.controlMode !== 'Local' && work === 'localWork'
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Bad split',
|
label: 'Bad split',
|
||||||
@ -87,11 +93,6 @@ export default {
|
|||||||
label: 'Cancel faults',
|
label: 'Cancel faults',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Add Train',
|
|
||||||
handler: this.loadSpare,
|
|
||||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -128,7 +129,7 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
|
||||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
|
@ -58,22 +58,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: [
|
menuNormal: [
|
||||||
{
|
|
||||||
label: 'Change of train number',
|
|
||||||
handler: this.modifyTripNumber,
|
|
||||||
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Remove train number',
|
label: 'Remove train number',
|
||||||
handler: this.removeTripNumber,
|
handler: this.removeTripNumber,
|
||||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
|
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
|
||||||
isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
|
isDisabled: (section, station, work) => station.controlMode !== 'Local' && work === 'localWork',
|
||||||
},
|
isShow: (train, work) => work === 'localWork' || work === 'dispatchWork'
|
||||||
{
|
|
||||||
label: 'Change end',
|
|
||||||
handler: this.turnDirection,
|
|
||||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
|
|
||||||
isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuForce: [
|
menuForce: [
|
||||||
@ -150,7 +140,15 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.menuOperation.selected': function (val) {
|
'$store.state.menuOperation.selected': function (val) {
|
||||||
if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') {
|
if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') {
|
||||||
this.$refs.trainOperation.doShow(val);
|
if (this.work === 'localWork') {
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
||||||
|
if (station && station.controlMode === 'Local') {
|
||||||
|
this.$refs.trainOperation.doShow(val);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$refs.trainOperation.doShow(val);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -158,7 +156,7 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
|
||||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
|
Loading…
Reference in New Issue
Block a user