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