From 1c04fd0bd62a3fbdf80f86c08f60708d4280ff74 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 27 Apr 2022 17:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF=E8=B0=83?= =?UTF-8?q?=E6=95=B423?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/datie_02.js | 15 +- src/jmapNew/constant/deviceRender.js | 11 +- src/jmapNew/constant/deviceType.js | 3 +- src/jmapNew/parser/parser-graph.js | 3 +- .../graph/SaidLamp/EPickOrDepartArrow.js | 32 +- src/jmapNew/shape/graph/SaidLamp/index.js | 8 +- src/jmapNew/shape/graph/SignalButton/index.js | 69 +- src/jmapNew/shape/graph/index.js | 3 +- .../theme/datie_02/menus/menuButton.vue | 1 - .../theme/datie_02/menus/menuButtonCtc.vue | 708 ++++++++++++++++++ src/jmapNew/theme/factory.js | 2 +- src/views/newMap/displayCity/demonMenu.vue | 2 +- src/views/newMap/displayCity/lineBoard.vue | 3 +- src/views/newMap/jlmapNew/index.vue | 3 +- .../indicatorAssociatedInfo/route.vue | 2 +- .../newMapdraft/mapoperate/checkboxDraft.vue | 20 +- .../newMapdraft/mapoperate/controlLamp.vue | 34 +- .../newMap/newMapdraft/mapoperate/index.vue | 2 +- 18 files changed, 869 insertions(+), 52 deletions(-) create mode 100644 src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index 32ac39699..1bb954e28 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -947,7 +947,7 @@ class SkinCode extends defaultStyle { fontFamily:'宋体' } }; - this[deviceType.PickOrDepartArrow] = { + this[deviceType.DepartArrow] = { triangleLength: 15, lineWidth: 8, length: 35, @@ -955,7 +955,18 @@ class SkinCode extends defaultStyle { fill: '#000', stroke: '#fff', fontSize: 11, - defaultText: '接发车', + defaultText: '发车', + defaultColor: '#ccc' + }; + this[deviceType.PickArrow] = { + triangleLength: 15, + lineWidth: 8, + length: 35, + distance: 15, + fill: '#000', + stroke: '#fff', + fontSize: 11, + defaultText: '接车', defaultColor: '#ccc' }; this[deviceType.Occlusion] = { diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index c8cf5434e..e859ef897 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -285,9 +285,14 @@ deviceRender[deviceType.IndicatorLight] = { _type: deviceType.IndicatorLight, zlevel: 1 }; -/** 接发车指示灯 */ -deviceRender[deviceType.PickOrDepartArrow] = { - _type: deviceType.PickOrDepartArrow, +/** 接车指示灯 */ +deviceRender[deviceType.PickArrow] = { + _type: deviceType.PickArrow, + zlevel: 1 +}; +/** 发车指示灯 */ +deviceRender[deviceType.DepartArrow] = { + _type: deviceType.DepartArrow, zlevel: 1 }; /** 区间占用 区间监控 */ diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 88359412a..9904005df 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -51,7 +51,8 @@ const deviceType = { DirectionRod: 'DirectionRod', Responder: 'Responder', SignalButton: 'SignalButton', - PickOrDepartArrow: 'PickOrDepartArrow', + PickArrow: 'PickArrow', + DepartArrow: 'DepartArrow', Occlusion: 'Occlusion', Accident: 'Accident', Recovery: 'Recovery', diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index ba73b2e75..ec111bc16 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -350,7 +350,8 @@ export function updateMapData(state, model) { case deviceType.Axle: updateForList(model, state, 'indicatorLightList'); break; case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break; case deviceType.IndicatorLight: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.PickOrDepartArrow: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.PickArrow: updateForList(model, state, 'indicatorLightList');break; + case deviceType.DepartArrow: updateForList(model, state, 'indicatorLightList'); break; case deviceType.Occlusion: updateForList(model, state, 'indicatorLightList'); break; case deviceType.Accident: updateForList(model, state, 'indicatorLightList'); break; case deviceType.Recovery: updateForList(model, state, 'indicatorLightList'); break; diff --git a/src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js b/src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js index bd62cfe37..3cf04a426 100644 --- a/src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js +++ b/src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js @@ -16,22 +16,22 @@ export default class EPickOrDepartArrow extends Group { this.arrow = new Polygon({ zlevel: this.zlevel, z: this.z, - origin: [model.x + style.PickOrDepartArrow.length / 2, model.y], + origin: [model.x + style[this._subType].length / 2, model.y], rotation: model.right ? Math.PI : 0, shape: { points: [ [model.x, model.y], - [model.x + style.PickOrDepartArrow.triangleLength, model.y - style.PickOrDepartArrow.triangleLength / 2], - [model.x + style.PickOrDepartArrow.triangleLength, model.y - style.PickOrDepartArrow.lineWidth / 2], - [model.x + style.PickOrDepartArrow.length, model.y - style.PickOrDepartArrow.lineWidth / 2], - [model.x + style.PickOrDepartArrow.length, model.y + style.PickOrDepartArrow.lineWidth / 2], - [model.x + style.PickOrDepartArrow.triangleLength, model.y + style.PickOrDepartArrow.lineWidth / 2], - [model.x + style.PickOrDepartArrow.triangleLength, model.y + style.PickOrDepartArrow.triangleLength / 2] + [model.x + style[this._subType].triangleLength, model.y - style[this._subType].triangleLength / 2], + [model.x + style[this._subType].triangleLength, model.y - style[this._subType].lineWidth / 2], + [model.x + style[this._subType].length, model.y - style[this._subType].lineWidth / 2], + [model.x + style[this._subType].length, model.y + style[this._subType].lineWidth / 2], + [model.x + style[this._subType].triangleLength, model.y + style[this._subType].lineWidth / 2], + [model.x + style[this._subType].triangleLength, model.y + style[this._subType].triangleLength / 2] ] }, style: { - fill: style.PickOrDepartArrow.fill, - stroke: style.PickOrDepartArrow.stroke, + fill: style[this._subType].fill, + stroke: style[this._subType].stroke, lineWidth: 1 } }); @@ -39,13 +39,13 @@ export default class EPickOrDepartArrow extends Group { zlevel: this.zlevel, z: this.z, style: { - x: model.x + style.PickOrDepartArrow.length / 2, - y: model.y + style.PickOrDepartArrow.distance, + x: model.x + style[this._subType].length / 2, + y: model.y + style[this._subType].distance, fontWeight: style.textStyle.fontWeight, - fontSize: style.PickOrDepartArrow.fontSize, + fontSize: style[this._subType].fontSize, fontFamily: style.fontFamily, text: model.text, - textFill: style.PickOrDepartArrow.defaultColor, + textFill: style[this._subType].defaultColor, textAlign: style.textStyle.textAlign, textVerticalAlign: style.textStyle.textVerticalAlign } @@ -58,9 +58,9 @@ export default class EPickOrDepartArrow extends Group { if (color) { const style = this.model.style; this.arrow.animateStyle(true) - .when(0, { fill: style.PickOrDepartArrow.fill }) + .when(0, { fill: style[this._subType].fill }) .when(1000, { stroke: color }) - .when(2000, { fill: style.PickOrDepartArrow.fill }) + .when(2000, { fill: style[this._subType].fill }) .start(); } } @@ -68,7 +68,7 @@ export default class EPickOrDepartArrow extends Group { recover() { const style = this.model.style; this.arrow.stopAnimation(false); - this.arrow.setStyle('fill', style.PickOrDepartArrow.fill); + this.arrow.setStyle('fill', style[this._subType].fill); } setControlColor(color) { diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index cf21f5623..268afc445 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -179,7 +179,7 @@ export default class SaidLamp extends Group { _subType: 'IndicatorLight' }); this.add(this.control); - } else if (this._type === 'PickOrDepartArrow') { + } else if (this._type === 'PickArrow'|| this._type === 'DepartArrow') { this.control = new EPickOrDepartArrow({ zlevel: this.zlevel, z: this.z, @@ -188,7 +188,7 @@ export default class SaidLamp extends Group { text: model.name, right: model.right, style: this.style, - _subType: 'PickOrDepartArrow' + _subType: this._type }); this.add(this.control); } @@ -201,7 +201,7 @@ export default class SaidLamp extends Group { this.control && this.control.hide(); } else { // 区段占用,辅助状态,接发车箭头 - const datieType = [deviceType.SectionOccupied, deviceType.AssistStatus, deviceType.PickOrDepartArrow]; + const datieType = [deviceType.SectionOccupied, deviceType.AssistStatus, deviceType.PickArrow ,deviceType.DepartArrow]; if (model._type === deviceType.PowerSupply && model.name.includes('2')) { this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor); this.control && this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1); @@ -213,7 +213,7 @@ export default class SaidLamp extends Group { this.control && this.control.setControlFlashing('#FFFFFF'); } else { let defalutColor; - if (model._type == deviceType.PickOrDepartArrow) { + if (model._type == deviceType.PickArrow || model._type == deviceType.DepartArrow) { defalutColor = this.deviceStyle.fill; } else { defalutColor = this.deviceStyle.lamp.controlColor; diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index c965cde21..dcbac4934 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -71,6 +71,70 @@ export default class SignalButton extends Group { }); this.add(this.rightLine); this.rightLine.hide(); + this.leftBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: model.position.x - 1, + y1: model.position.y - 1, + x2: model.position.x - 1, + y2: model.position.y + 16 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }); + this.add(this.leftBoard); + this.leftBoard.hide(); + this.topBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: model.position.x - 1, + y1: model.position.y - 1, + x2: model.position.x + 16, + y2: model.position.y - 1 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }); + this.add(this.topBoard); + this.topBoard.hide(); + this.rightBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: model.position.x + 16, + y1: model.position.y - 1, + x2: model.position.x + 16, + y2: model.position.y + 16 + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }); + this.add(this.rightBoard); + this.rightBoard.hide(); + this.bottomBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: model.position.x - 1, + y1: model.position.y + 16, + x2: model.position.x + 16, + y2: model.position.y + 16, + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }); + this.add(this.bottomBoard); + this.bottomBoard.hide(); const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION']; if (hasTextList.includes(model.type)) { this.buttonText = new Text({ @@ -132,7 +196,7 @@ export default class SignalButton extends Group { color = '#008000'; } return color; - }// 12 + }// recover() { this.stopAnimation(); this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() }); @@ -140,6 +204,9 @@ export default class SignalButton extends Group { this.leftLine && this.leftLine.hide(); this.rectButton && this.rectButton.show(); this.buttonText && this.buttonText.show(); + // this.leftBoard && this.leftBoard.show(); + // this.rightBoard && this.rightBoard.show(); + // this.top } blockShow() { this.rightLine && this.rightLine.show(); diff --git a/src/jmapNew/shape/graph/index.js b/src/jmapNew/shape/graph/index.js index db2761975..7260b670e 100644 --- a/src/jmapNew/shape/graph/index.js +++ b/src/jmapNew/shape/graph/index.js @@ -77,7 +77,8 @@ mapShape[deviceType.ReturnModeGroup] = SaidLamp; mapShape[deviceType.Axle] = SaidLamp; mapShape[deviceType.SwitchFault] = SaidLamp; mapShape[deviceType.IndicatorLight] = SaidLamp; -mapShape[deviceType.PickOrDepartArrow] = SaidLamp; +mapShape[deviceType.PickArrow] = SaidLamp; +mapShape[deviceType.DepartArrow] = SaidLamp; mapShape[deviceType.Occlusion] = SaidLamp; mapShape[deviceType.Accident] = SaidLamp; mapShape[deviceType.Recovery] = SaidLamp; diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 4eedd1537..b02136118 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -431,7 +431,6 @@ export default { } this.deviceTimeNode = this.$store.state.socket.simulationTimeSync; const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].signalCode || deviceList[0].code);// deviceList[0] 为 SignalButton || Signal - console.log(deviceList, signal, '***************'); if (deviceList.length === 1 && !signal.routeLock) { // 排列进路 处理始端信号机状态 operate.code = deviceList[0].code; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { diff --git a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue new file mode 100644 index 000000000..f9380d6d9 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue @@ -0,0 +1,708 @@ + + + + diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js index 37488ff9d..2135ca150 100644 --- a/src/jmapNew/theme/factory.js +++ b/src/jmapNew/theme/factory.js @@ -90,7 +90,7 @@ class Theme { '13':'all', '14':'ecStation', '15':'all', - '16':'all' + '16':'ecStation' }; } diff --git a/src/views/newMap/displayCity/demonMenu.vue b/src/views/newMap/displayCity/demonMenu.vue index a4066fd7f..a9dee5909 100644 --- a/src/views/newMap/displayCity/demonMenu.vue +++ b/src/views/newMap/displayCity/demonMenu.vue @@ -8,7 +8,7 @@ 经典案例分析 规范学习 - 占线板 + 占线板 -
{{ nor.name }}
+
{{ nor.name || nor.code }}
@@ -119,7 +119,12 @@ export default { type: 'Signal', name: '信号机列表', list: [] - } + }, + { + type: 'SignalButton', + name: '信号按钮列表', + list: [] + } ] }; }, @@ -156,7 +161,9 @@ export default { this.modelList[1].list.push(item); } else if (item._type == 'Signal') { this.modelList[2].list.push(item); - } + } else if (item._type == 'SignalButton') { + this.modelList[3].list.push(item); + } if (item.stationCode == this.seclectDeviceList[0].stationCode) { count++; } @@ -317,7 +324,12 @@ export default { type: 'Signal', name: '信号机列表', list: [] - } + }, + { + type: 'SignalButton', + name: '信号按钮列表', + list: [] + } ]; }, mouseenter(model) { diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 7a55a9660..a97025f0a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -99,7 +99,8 @@ export default { 'Recovery', 'Accident', 'Occlusion', - 'PickOrDepartArrow' + 'PickArrow', + 'DepartArrow' ], noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'], typeList: [ @@ -130,9 +131,10 @@ export default { { name: '复原', value: 'Recovery' }, { name: '事故', value: 'Accident' }, { name: '闭塞', value: 'Occlusion' }, - { name: '接发车箭头', value: 'PickOrDepartArrow' } + { name: '接车箭头', value: 'PickArrow' }, + { name: '发车箭头', value: 'DepartArrow' } ], - hasDirectionList: ['SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow'], + hasDirectionList: ['SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion', 'PickArrow', 'DepartArrow'], directionList: [{label: 'X',value: 'X'},{label: 'XF',value: 'XF'},{label: 'XD',value: 'XD'}, {label:'S',value:'S'},{label:'SF',value:'SF'},{label:'SD',value: 'SD'}], editModel:getModel('ControlLamp'), addModel:getModel('ControlLamp'), @@ -165,7 +167,7 @@ export default { ] }, { prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' }, { prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'}, - { prop: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'PickOrDepartArrow' }, + { prop: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'DepartArrow' && this.editModel.type !== 'PickArrow' }, { prop: 'labelEnum', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.hasDirectionList.includes(this.editModel.type) }, { prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.editModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType }, { prop:'stationCode', label: '所属车站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList} @@ -292,7 +294,8 @@ export default { this.RecoveryList = []; this.AccidentList = []; this.OcclusionList = []; - this.PickOrDepartArrowList = []; + this.DepartArrowList = []; + this.PickArrowList = []; indicatorLightList.forEach(item => { switch (item._type) { case 'AtsControl': @@ -376,8 +379,11 @@ export default { case 'Occlusion': this.OcclusionList.push(item); break; - case 'PickOrDepartArrow': - this.PickOrDepartArrowList.push(item); + case 'PickArrow': + this.PickArrowList.push(item); + break; + case 'DepartArrow': + this.DepartArrowList.push(item); break; } }); @@ -465,8 +471,11 @@ export default { case 'Occlusion': this.selectLists = this.OcclusionList; break; - case 'PickOrDepartArrow': - this.selectLists = this.PickOrDepartArrowList; + case 'PickArrow': + this.selectLists = this.PickArrowList; + break; + case 'DepartArrow': + this.selectLists = this.DepartArrowList; break; default : this.selectLists = this.intersiteControlList; @@ -577,8 +586,11 @@ export default { case 'Occlusion': idPrefix = 'occlusion'; break; - case 'PickOrDepartArrow': - idPrefix = 'podArrow' + case 'PickArrow': + idPrefix = 'pickArrow'; + break; + case 'DepartArrow': + idPrefix = 'departArrow'; break; } return idPrefix; diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 1e91ca690..d93335d52 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -211,7 +211,7 @@ export default { const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', - 'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow']; + 'Recovery', 'Accident', 'Occlusion', 'PickArrow' ,'DepartArrow']; const type = device._type; if (this.selectDevice) { this.enabledTab = this.selectDevice;