From 9aef723b3f8370076be61dc75ce2c669eba74f8a Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 15 Jan 2021 16:44:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=EF=BC=9A=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=8C=BA=E6=AE=B5=E4=BF=AE=E6=94=B9=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E9=80=BB=E8=BE=91=E5=8C=BA=E6=AE=B5=E8=B5=B7=E7=BB=88?= =?UTF-8?q?=E7=82=B9=E5=9D=90=E6=A0=87=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E9=80=BB=E8=BE=91=E5=8C=BA=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9D=90=E6=A0=87=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9B=B8=E9=82=BB=E7=89=A9=E7=90=86=E5=8C=BA=E6=AE=B5=E5=9D=90?= =?UTF-8?q?=E6=A0=87=E5=87=BA=E7=8E=B0=E9=97=AE=E9=A2=98=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9A=20=E5=A2=9E=E5=8A=A0=E7=BA=BF=E8=B7=AF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=9A=E4=BF=A1=E5=8F=B7=E5=B0=81=E9=94=81?= =?UTF-8?q?=E4=B8=8B=E8=BF=9B=E8=B7=AF=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8A=9E=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 8 ++-- .../newMapdraft/mapoperate/section/index.vue | 37 +++++++++++++------ src/views/system/configLine/config.vue | 7 ++-- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 8afe9e979..ebd4696c8 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -116,18 +116,18 @@ class SkinCode extends defaultStyle { speedLimitName: { z: 10, leftName: true, // 左侧限速值是否展示 - rightName: false, // 右侧限速值是否展示 + rightName: false, // 右侧限速值是否展示 nameBackgroundIsRect: true, // 限速值背景是否为矩形 nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度 nameBackgroundBorderColor: '#C00808', // 限速值背景边框颜色 limitValueDistance: 18, - kilometerFontSize: 0, // 公里标大小 - nameAlone: true, // 只显示一个限速名称 + kilometerFontSize: 0, // 公里标大小 + nameAlone: true, // 只显示一个限速名称 nameNumberFontSize: 11, // 限速值大小 nameNumberColor: '#C00808', // 限速值颜色 nameBackground: '#000', // 限速名称背景颜色 drogueWidth: 15, // 浮标宽度 - drogueHeight: 12, // 浮标高度 + drogueHeight: 12 // 浮标高度 }, separator: { z: 3, // 分割符层级 diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index c3c3a5130..9b8be643b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -624,12 +624,17 @@ export default { } if (model.parentCode == copySection.code) { // 物理区段 + debugger; let lengthFact = copySection.logicSectionCodeList.filter(code => model.code != code).reduce((pre, code) => { const length = this.$store.getters['map/getDeviceByCode'](code).lengthFact; return pre + Number(length); }, 0); lengthFact += model.lengthFact; copySection.lengthFact = Number(lengthFact.toFixed(3)); // 自动获取 物理区段的 实际长度 是由逻辑区段相加 + const logicSectionCodeList = copySection.logicSectionCodeList; + const last = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCodeList[logicSectionCodeList.length - 1])); + last.logicSectionEndOffset = copySection.lengthFact; + models.push(last); if (copySection.lengthFact > 5) { copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5; copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5; @@ -648,20 +653,22 @@ export default { } }); pointModel.forEach(item => { - const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x); - if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) { - if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) { - item.points[item.points.length - 1].x = model.points[0].x; - item.points[item.points.length - 1].y = model.points[0].y; + if (!item.parentCode || item.parentCode == model.parentCode) { + const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x); + if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) { + if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) { + item.points[item.points.length - 1].x = model.points[0].x; + item.points[item.points.length - 1].y = model.points[0].y; + } } - } - if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], item.points[0])) { - if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) { - item.points[0].x = model.points[model.points.length - 1].x; - item.points[0].y = model.points[model.points.length - 1].y; + if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], item.points[0])) { + if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) { + item.points[0].x = model.points[model.points.length - 1].x; + item.points[0].y = model.points[model.points.length - 1].y; + } } + models.push(item); } - models.push(item); }); if (!model.parentCode) { @@ -707,7 +714,13 @@ export default { model.lengthFact = length.toFixed(3); } model.logicSectionStartOffset = startOffset; - model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000; + const lastData = Object.keys(sectionMap); + const temp = lastData[lastData.length - 1]; + if (temp == startPoint) { + model.logicSectionEndOffset = section.lengthFact; + } else { + model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000; + } !sectionMap[startPoint].deepFlag && models.push(model); startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000; startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y; diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index 1cc8ec3c8..dc51bbbcf 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -77,9 +77,9 @@ export default { height: 800, roadData: [], focus: false, - booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'], + booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail', 'signalBlockRouteSettable'], selectList: ['runMode'], - generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'], + generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail', 'signalBlockRouteSettable'], rangeList: ['noParkingSM', 'parkingSM'], speedList: ['rmAtpSpeed', 'urmAtpSpeed'], numberList: [], @@ -106,7 +106,8 @@ export default { standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机', atsAutoHandleManualFrontTurnBack:'ATS是否自动处理人工设置的站前折返自动更新车次', doNotSetRouteWhenSectionOccupied: '当进路的区段占用时不排列进路', - routeSettingNoFail:'进路办理不失败' + routeSettingNoFail:'进路办理不失败', + signalBlockRouteSettable:'信号封锁下进路是否可以办理' } }; }, From 45869c536255acb3edc256786a1757a36a8317ae Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 15 Jan 2021 16:59:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=9C=BA=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Signal/ESigPost.js | 4 ++-- src/jmapNew/shape/Signal/index.js | 1 + src/utils/baseUrl.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jmapNew/shape/Signal/ESigPost.js b/src/jmapNew/shape/Signal/ESigPost.js index c1687b88c..278b3fc7c 100644 --- a/src/jmapNew/shape/Signal/ESigPost.js +++ b/src/jmapNew/shape/Signal/ESigPost.js @@ -29,7 +29,7 @@ class ESigPost extends Group { _subType: 'SignalLamp', _val: '3', zlevel: model.zlevel, - z: model.z, + z: model.z + 1, shape: { points: verPoints }, @@ -44,7 +44,7 @@ class ESigPost extends Group { _subType: 'SignalLamp', _val: '3', zlevel: model.zlevel, - z: model.z, + z: model.z + 1, shape: { points: verPoints }, diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 36e35b41f..77ccde688 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -431,6 +431,7 @@ class Signal extends Group { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); } } + this.sigPost.setHorColor(this.style.Signal.post.openHorColor); } } // 列车进路 diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 51ddbe296..768654966 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://api.joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 - // BASE_API = 'http://192.168.8.129:9000'; // 旭强 + BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.119:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; From f61df9b1e8a7b0d429f2877c66d97a7bfeb4caa2 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 15 Jan 2021 17:17:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=B2=94=E5=BF=83=E7=8A=B6=E6=80=81=20?= =?UTF-8?q?=E7=BB=98=E5=9B=BE=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 7 ++++- src/jmapNew/shape/Section/ELines.js | 28 +++++++++++++++++++ src/jmapNew/shape/Section/EMouse.js | 2 -- src/jmapNew/shape/Section/index.js | 21 +++++++++----- .../newMapdraft/mapoperate/section/index.vue | 1 - 5 files changed, 48 insertions(+), 11 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index aad24a098..51f977979 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -144,8 +144,13 @@ class SkinCode extends defaultStyle { display: false // 列车实时位置显示 }, cross:{ // 岔心 + speedOffset:{ + x:0, + y:50 + }, centerSquare:{ - defaultColor:'#000' + defaultColor:'#000', + blockColor:'#00F' }, crossSection:{ fillColor:'#ff0', diff --git a/src/jmapNew/shape/Section/ELines.js b/src/jmapNew/shape/Section/ELines.js index fa7ceb92c..af662373e 100644 --- a/src/jmapNew/shape/Section/ELines.js +++ b/src/jmapNew/shape/Section/ELines.js @@ -141,9 +141,27 @@ export default class ELines extends Group { } }); + this.crossSpeedText = new Text({ + zlevel: this.zlevel, + z: this.z + 8, + style: { + x: result.x + style.Section.cross.speedOffset.x, + y: result.y + style.Section.cross.speedOffset.y, + fontWeight: style.Section.cross.text.fontWeight, + fontSize: style.Section.cross.text.fontSize, + fontFamily: style.Section.cross.text.fontFamily || style.fontFamily, + text: '', + textFill:style.Section.cross.text.fontColor, + textAlign: style.Section.cross.text.textAlign, + textPosition: style.Section.cross.text.textPosition, + textVerticalAlign: style.Section.cross.text.textVerticalAlign + } + }); + this.add(this.crossSection); this.add(this.centerSquare); this.add(this.crossText); + this.add(this.crossSpeedText); } createLine() { @@ -359,6 +377,16 @@ export default class ELines extends Group { this.crossSection && this.crossSection.setStyle({lineWidth:0, fill:this.model.style.Section.cross.crossSection.fillColor}); } + setCrossBlock() { + this.centerSquare && this.centerSquare.setStyle({fill:this.model.style.Section.cross.centerSquare.blockColor}); + } + setCrossUnBlock() { + this.centerSquare && this.centerSquare.setStyle({fill:this.model.style.Section.cross.centerSquare.defaultColor}); + } + setCrossSpeedUpperLimit(speedLimit) { + this.crossSpeedText && this.crossSpeedText.setStyle({text:speedLimit}); + } + setZleve(lev) { this.section && this.section.attr('z', lev); } diff --git a/src/jmapNew/shape/Section/EMouse.js b/src/jmapNew/shape/Section/EMouse.js index 3ec99a1e4..0cc1470f0 100644 --- a/src/jmapNew/shape/Section/EMouse.js +++ b/src/jmapNew/shape/Section/EMouse.js @@ -129,8 +129,6 @@ class EMouse extends Group { this.add(this.lineBorder); this.lineBorder.hide(); } - } else if (this.device.crossSection) { - debugger; } } diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 3eb66aa24..ceb7c15e6 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -86,12 +86,14 @@ export default class Section extends Group { /** 设置区段恢复默认状态*/ recover() { if (this.line) { + this.line.setCrossUnBlock(); this.line.stopAnimation(true); this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段 this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width }); + this.line.setCrossSpeedUpperLimit(''); } this.name && this.name.recover(); this.speedLimit && this.speedLimit.hide(); @@ -180,6 +182,9 @@ export default class Section extends Group { lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); } + if (this.style.Section.cross && this.model.type == '04') { + this.line.setCrossBlock(); + } if (this.style.Section.block && this.style.Section.block.blockGlint && this.line) { this.line.animateStyle(true, [ { time: 1000, styles: { stroke: this.style.backgroundColor } }, @@ -246,13 +251,15 @@ export default class Section extends Group { setSpeedUpperLimit(speedUpLimit) { if (this.style.Section.line.speedLimitColor) { // 宁波三号线 独有 this.line.setStyle({stroke: this.style.Section.line.speedLimitColor}); - } else if (this.style.Section.speedLimitName.nameAlone && this.model.type == '03') { // 南京2,道岔区段只显示一个名称 - const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode]; - if (switchModel && switchModel.sectionACode == this._code) { - this.speedLimit && this.speedLimit.show(); - this.speedLimitName && this.speedLimitName.show(speedUpLimit); - } - } else { + } else if (this.style.Section.speedLimitName.nameAlone && this.model.type == '03') { // 南京2,道岔区段只显示一个名称 + const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode]; + if (switchModel && switchModel.sectionACode == this._code) { + this.speedLimit && this.speedLimit.show(); + this.speedLimitName && this.speedLimitName.show(speedUpLimit); + } + } else if (this.style.Section.cross && this.model.type == '04') { + this.line.setCrossSpeedUpperLimit(speedUpLimit); + } else { this.speedLimit && this.speedLimit.show(); this.speedLimitName && this.speedLimitName.show(speedUpLimit); } diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 9b8be643b..73250087f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -624,7 +624,6 @@ export default { } if (model.parentCode == copySection.code) { // 物理区段 - debugger; let lengthFact = copySection.logicSectionCodeList.filter(code => model.code != code).reduce((pre, code) => { const length = this.$store.getters['map/getDeviceByCode'](code).lengthFact; return pre + Number(length);