diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index e963637ca..0d6e14dea 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -436,6 +436,27 @@ class SkinCode extends defaultStyle { grayColor: '#7F7F7F' } } + }; + + this[deviceType.StationTurnBack] = { // 站后折返 + displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) + spliceShow: true, // 西安二号线特殊显示 + lamp: { + fill: '#FFFF00', // 填充色 + radiusR: 6 // 控制灯大小 + }, + text: { + titleTextShow: false, + fontWeight: 580, + fontSize: 12, + distance: 10 + }, + rect: { + fill: 'rgba(0,0,0,0)', + stroke: '#fff', + lineWidth: 2, + padding: 6 + } }; this[deviceType.Switch] = { @@ -625,13 +646,14 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ReturnModeGroup] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) + displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) insideDistance: 2, // 折返模块边框内部距离 outsideDistance: 10, // 折返模块边框之间距离 rectWidth: 20, // 折返模块宽度 lineWidth: 3, // 折返模块线宽 fillColor: 'rgba(0,0,0,0)', // 填充色 - strokeColor: '#9F9C9C' // 线颜色 + strokeColor: '#9F9C9C', // 线颜色 + highlightColor: '#fff' // 高亮颜色 }; this[deviceType.ModeStatusGroup] = { // 车站状态模式 displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) diff --git a/src/jmapNew/shape/StationTurnBack/EFoldbackMode.js b/src/jmapNew/shape/StationTurnBack/EFoldbackMode.js new file mode 100644 index 000000000..417ab14d4 --- /dev/null +++ b/src/jmapNew/shape/StationTurnBack/EFoldbackMode.js @@ -0,0 +1,141 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Line from 'zrender/src/graphic/shape/Line'; + +export default class EFoldbackMode extends Group { + constructor(model) { + super(); + this.model = model; + this.zlevel = model.zlevel; + this._subType = model._subType; + this.z = model.z; + this.onmouseover = model.mouseover; + this.onmouseout = model.mouseout; + this.create(model); + } + create(model) { + const style = model.style; + this.lateralLinePriorityRect = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: model.x, + y: model.y, + width: model.width, + height:model.width + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor, + fill: style.ReturnModeGroup.fillColor + } + }); + this.lateralLinePriority1 = new Line({ + zlevel: model.zlevel, + z: model.z, + shape: { + x1: model.x + model.style.ReturnModeGroup.insideDistance, + y1: model.y + model.style.ReturnModeGroup.insideDistance, + x2: model.x + model.width - style.ReturnModeGroup.insideDistance, + y2: model.y + model.width - style.ReturnModeGroup.insideDistance + }, + style: { + lineWidth: model.style.ReturnModeGroup.lineWidth, + stroke: model.style.ReturnModeGroup.strokeColor + } + }); + this.lateralLinePriority2 = new Line({ + zlevel: model.zlevel, + z: model.z, + shape: { + x1: model.x + model.width - style.ReturnModeGroup.insideDistance, + y1: model.y + style.ReturnModeGroup.insideDistance, + x2: model.x + style.ReturnModeGroup.insideDistance, + y2: model.y + model.width - style.ReturnModeGroup.insideDistance + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor + } + }); + this.add(this.lateralLinePriorityRect); + this.add(this.lateralLinePriority1); + this.add(this.lateralLinePriority2); + this.linearFoldbackRect = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: model.x + model.width + style.ReturnModeGroup.outsideDistance, + y: model.y, + width: model.width, + height:model.width + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor, + fill: style.ReturnModeGroup.fillColor + } + }); + this.linearFoldback = new Line({ + zlevel: model.zlevel, + z: model.z, + shape: { + x1: model.x + model.width + style.ReturnModeGroup.outsideDistance + style.ReturnModeGroup.insideDistance, + y1: model.y + model.width / 2, + x2: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance - style.ReturnModeGroup.insideDistance, + y2: model.y + model.width / 2 + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor + } + }); + this.add(this.linearFoldbackRect); + this.add(this.linearFoldback); + this.lateralLineRect = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2, + y: model.y, + width: model.width, + height:model.width + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor, + fill: style.ReturnModeGroup.fillColor + } + }); + this.lateralLine = new Line({ + zlevel: model.zlevel, + z: model.z, + shape: { + x1: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2 + style.ReturnModeGroup.insideDistance, + y1: model.y + model.width - style.ReturnModeGroup.insideDistance, + x2: model.x + model.width * 3 + style.ReturnModeGroup.outsideDistance * 2 - style.ReturnModeGroup.insideDistance, + y2: model.y + style.ReturnModeGroup.insideDistance + }, + style: { + lineWidth: style.ReturnModeGroup.lineWidth, + stroke: style.ReturnModeGroup.strokeColor + } + }); + this.add(this.lateralLineRect); + this.add(this.lateralLine); + } + + highlightType1(color) { + this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color); + this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color); + this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color); + } + highlightType2(color) { + this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color); + this.linearFoldback && this.linearFoldback.setStyle('stroke', color); + } + highlightType3(color) { + this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color); + this.lateralLine && this.lateralLine.setStyle('stroke', color); + } +} diff --git a/src/jmapNew/shape/StationTurnBack/index.js b/src/jmapNew/shape/StationTurnBack/index.js index 28de520d2..dbc1bc462 100644 --- a/src/jmapNew/shape/StationTurnBack/index.js +++ b/src/jmapNew/shape/StationTurnBack/index.js @@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group'; import Circle from 'zrender/src/graphic/shape/Circle'; import Text from 'zrender/src/graphic/Text'; import Rect from 'zrender/src/graphic/shape/Rect'; +import EFoldbackMode from './EFoldbackMode'; import Vue from 'vue'; export default class StationTurnBack extends Group { @@ -20,9 +21,9 @@ export default class StationTurnBack extends Group { } create() { const model = this.model; - const style = this.style; + const style = this.style; - if (model.show) { + if (model.show && !style.StationTurnBack.spliceShow) { this.control = new Circle({ zlevel: this.zlevel, z: this.z, @@ -94,19 +95,35 @@ export default class StationTurnBack extends Group { this.add(this.controlRect); this.add(this.text); this.add(this.strategyText); - } + } + if (style.StationTurnBack.spliceShow) { + this.control = new EFoldbackMode({ + zlevel: this.zlevel, + z: this.z, + x: model.position.x, + y: model.position.y, + width: style.ReturnModeGroup.rectWidth, + style: style + }); + this.add(this.control); + } } recover() { const path = window.location.href; if (!path.includes('/map/draw')) { - this.strategyText.hide(); - } + this.strategyText && this.strategyText.hide(); + } + this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor); + + // this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor); + this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor); + this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor); } handleStatus(name) { - this.strategyText.show(); - this.strategyText.attr({ + this.strategyText && this.strategyText.show(); + this.strategyText && this.strategyText.attr({ style: { text: name } @@ -125,7 +142,6 @@ export default class StationTurnBack extends Group { } }); } - // console.log(model, '站后折返model'); } setShowMode() { @@ -142,8 +158,6 @@ export default class StationTurnBack extends Group { this.eachChild(item => { item.show(); }); - // this.isShowShape = true; - // this.setState(this.model); } else { this.eachChild(item => { item.hide(); diff --git a/src/views/newMap/newMapdraft/ciConfig.vue b/src/views/newMap/newMapdraft/ciConfig.vue index 833cf244c..4c7e4f1dc 100644 --- a/src/views/newMap/newMapdraft/ciConfig.vue +++ b/src/views/newMap/newMapdraft/ciConfig.vue @@ -85,7 +85,8 @@ export default { overlapOnlyOneSwitch: false, generateCycle: false, routeButton: false, - likeHa1: false, + likeHa1: false, + getNearlySignal: false, overlapSettingByTrigger: false, overlapReleaseTime: 45, routeReleaseTime: 60 @@ -94,7 +95,7 @@ export default { focus: false, booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch', 'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen', - 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'overlapSettingByTrigger', 'generateFls'], + 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls'], selectList: [], numberList: ['overlapReleaseTime', 'routeReleaseTime'], optionsMap: { @@ -119,7 +120,8 @@ export default { routeReleaseTime: '默认进路解锁时间', generateCycle: '是否生成自动折返', routeButton: '是否生成进路结束按钮', - likeHa1: '是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号', + likeHa1: '是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号', + getNearlySignal: '生成进路信号按钮,进路信号按钮是否取最近的一个信号机', overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立', generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔' } diff --git a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue index 8bb68656f..0687b620e 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue @@ -3,13 +3,18 @@
-
-
站后折返数据
+
+ 站后折返数据
- - - + + + + + +