From daea6e1760f7bd40c86d648525270070d70497d7 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 19 Jan 2021 13:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A0=E8=BE=93=E4=BF=A1=E5=8F=B7=E6=9C=BA?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 4 +- src/jmapNew/shape/Signal/index.js | 16 +++-- .../theme/nanjing_02/menus/menuButton.vue | 62 +++++++++---------- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 37bd6152b..a909850fb 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -255,7 +255,9 @@ class SkinCode extends defaultStyle { }, transmission: { // 传输信号机 fillColor: '#f00', - sideLength: 20 + sideLength: 20, + textColor: '#fff', + strokeColor: '#00FFFF' } }; diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 6c4a026b7..1b660cd7a 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -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() { diff --git a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue index 485c0a1e5..ab252d07c 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue @@ -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: '' },