传输信号机选中状态
This commit is contained in:
parent
49405666df
commit
daea6e1760
@ -255,7 +255,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
transmission: { // 传输信号机
|
||||
fillColor: '#f00',
|
||||
sideLength: 20
|
||||
sideLength: 20,
|
||||
textColor: '#fff',
|
||||
strokeColor: '#00FFFF'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -339,7 +339,7 @@ class Signal extends Group {
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textFill: style.Signal.transmission.textColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
});
|
||||
@ -356,7 +356,9 @@ class Signal extends Group {
|
||||
]
|
||||
},
|
||||
style: {
|
||||
fill: style.Signal.transmission.fillColor
|
||||
fill: style.Signal.transmission.fillColor,
|
||||
stroke: style.Signal.transmission.strokeColor,
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.transmission);
|
||||
@ -728,7 +730,9 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape || this.model.type === 'TRANSMISSION') return;
|
||||
if (!this.isShowShape || this.model.type === 'TRANSMISSION') {
|
||||
return;
|
||||
}
|
||||
const path = window.location.href;
|
||||
this.recover();
|
||||
|
||||
@ -853,7 +857,11 @@ class Signal extends Group {
|
||||
};
|
||||
}
|
||||
drawSelected(selected) {
|
||||
this.highlight && this.highlight.drawSelected(selected);
|
||||
if (this.model.type === 'TRANSMISSION') {
|
||||
this.transmission && this.transmission.setStyle({ lineWidth: selected ? 2 : 0 });
|
||||
} else {
|
||||
this.highlight && this.highlight.drawSelected(selected);
|
||||
}
|
||||
}
|
||||
|
||||
checkIsDrawMap() {
|
||||
|
@ -244,13 +244,13 @@ export default {
|
||||
'routeList',
|
||||
'stationList',
|
||||
'routeData'
|
||||
]),
|
||||
State2SimulationMap() {
|
||||
return {
|
||||
'01': 'Local', // 现地工作站
|
||||
'02': 'Center' // 中心调度工作站
|
||||
};
|
||||
},
|
||||
]),
|
||||
State2SimulationMap() {
|
||||
return {
|
||||
'01': 'Local', // 现地工作站
|
||||
'02': 'Center' // 中心调度工作站
|
||||
};
|
||||
},
|
||||
commandId() {
|
||||
return OperationEvent.Command.commandHaerbin.confirm.domId;
|
||||
},
|
||||
@ -270,10 +270,10 @@ export default {
|
||||
watch: {
|
||||
'$store.state.menuOperation.setMenuChangeCount': function (val) {
|
||||
if (this.selected._type) {
|
||||
const type = this.State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.modeMatch = true;
|
||||
const type = this.State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.modeMatch = true;
|
||||
if (this.stationContorl.controlMode != type) {
|
||||
this.modeMatch = false;
|
||||
this.modeMatch = false;
|
||||
if (this.$store.state.training.prdType == '02' && this.selected._type == 'Station') {
|
||||
this.selectedObj = this.selected;
|
||||
if (this.selectedObj._type) {
|
||||
@ -452,10 +452,10 @@ export default {
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.switchParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
if (swicth.disabledCb && this.selectedObj) {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
if (swicth.disabledCb && this.selectedObj) {
|
||||
swicth.disabled = swicth.disabledCb(this.selectedObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = {
|
||||
@ -474,9 +474,9 @@ export default {
|
||||
this.oldClickObj = deepAssign({}, this.selectedObj);
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.signalParamList.forEach((singal, index) => {
|
||||
if (singal.disabledCb && this.selectedObj) {
|
||||
if (singal.disabledCb && this.selectedObj) {
|
||||
singal.disabled = singal.disabledCb(this.selectedObj);
|
||||
}
|
||||
}
|
||||
|
||||
this.centralizedStationList[index] = singal;
|
||||
});
|
||||
@ -485,18 +485,18 @@ export default {
|
||||
this.param = {
|
||||
signalCode: this.selectedObj.code
|
||||
};
|
||||
},
|
||||
handleSectionMenu() {
|
||||
},
|
||||
handleSectionMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((section, index) => {
|
||||
this.centralizedStationList[index] = section;
|
||||
if (section.disabledCb && this.selectedObj) {
|
||||
this.centralizedStationList[index] = section;
|
||||
if (section.disabledCb && this.selectedObj) {
|
||||
section.disabled = section.disabledCb(this.selectedObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.pushTempData([this.selectedObj]);
|
||||
@ -530,10 +530,10 @@ export default {
|
||||
handleStationMenu() {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.stationParamList.forEach((station, index) => {
|
||||
this.centralizedStationList[index] = station;
|
||||
if (station.disabledCb && this.selectedObj) {
|
||||
this.centralizedStationList[index] = station;
|
||||
if (station.disabledCb && this.selectedObj) {
|
||||
station.disabled = station.disabledCb(this.selectedObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.pushTempData([this.selectedObj]);
|
||||
@ -547,10 +547,10 @@ export default {
|
||||
}
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.standParamList.forEach((stand, index) => {
|
||||
this.centralizedStationList[index] = stand;
|
||||
if (stand.disabledCb && this.selectedObj) {
|
||||
this.centralizedStationList[index] = stand;
|
||||
if (stand.disabledCb && this.selectedObj) {
|
||||
stand.disabled = stand.disabledCb(this.selectedObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const data = Object.assign(this.selectedObj);
|
||||
@ -847,7 +847,7 @@ export default {
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
|
||||
{ name: '' },
|
||||
@ -871,7 +871,7 @@ export default {
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
|
||||
{ name: '' },
|
||||
@ -920,7 +920,7 @@ export default {
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
|
||||
@ -936,7 +936,7 @@ export default {
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
|
||||
@ -952,7 +952,7 @@ export default {
|
||||
// { name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
];
|
||||
this.stationParamList = [
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode)||!this.modeMatch }
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch }
|
||||
];
|
||||
// [
|
||||
// { name: '' },
|
||||
|
Loading…
Reference in New Issue
Block a user