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 1/2] =?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); From 0ee148437b6e9878ba6f4e68a9d0e59939d94545 Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 15 Jan 2021 17:23:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=94=E7=AD=94?= =?UTF-8?q?=E5=99=A8=20=E5=88=9B=E5=BB=BA=E6=97=B6=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=BF=A1=E5=8F=B7=E6=9C=BA=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +- .../mapoperate/responder/index.vue | 24 +++++++---- .../mapoperate/responder/responderBatch.vue | 42 ++++++++++++------- .../mapoperate/responder/responderCreate.vue | 24 ++++++++--- .../mapoperate/responder/responderModel.vue | 9 ++-- .../newMapdraft/mapoperate/responder/utils.js | 6 +-- 6 files changed, 71 insertions(+), 38 deletions(-) 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'; diff --git a/src/views/newMap/newMapdraft/mapoperate/responder/index.vue b/src/views/newMap/newMapdraft/mapoperate/responder/index.vue index 40ba35cc3..cb5bc7c86 100644 --- a/src/views/newMap/newMapdraft/mapoperate/responder/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/responder/index.vue @@ -125,7 +125,18 @@ export default { this.$emit('deviceSelect', ''); } else { this.$message.error('请选择物理区段'); - } + } + + } else if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'RelModelSignalCode'.toUpperCase()) { + this.$refs.respModel.setModelProp(selected, 'signalCode'); + this.activeName = 'first'; + this.field = ''; + this.$emit('deviceSelect', ''); + } else if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'RelSignalCode'.toUpperCase()) { + this.$refs.respCreate.setModelProp(selected, 'signalCode'); + this.activeName = 'second'; + this.field = ''; + this.$emit('deviceSelect', ''); } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'RelSectionCode'.toUpperCase()) { if (['01', '03'].includes(selected.type)) { this.$refs.respCreate.setModelProp(selected, 'sectionCode'); @@ -135,14 +146,13 @@ export default { } else { this.$message.error('请选择物理区段'); } - } else if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'RelModelSignalCode'.toUpperCase()) { - this.$refs.respModel.setModelProp(selected, 'signalCode'); - this.activeName = 'first'; + } else if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'RelBatchSignalCode'.toUpperCase()) { + this.$refs.respBatch.setModelProp(selected, 'signalCode'); + this.activeName = 'third'; this.field = ''; - this.$emit('deviceSelect', ''); - } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'RelBatchSectionCode'.toUpperCase()) { + } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'RelBatchSectionCode'.toUpperCase()) { if (['01', '03'].includes(selected.type)) { - this.$refs.respBatch.setModelProp(selected, 'code'); + this.$refs.respBatch.setModelProp(selected, 'sectionCode'); this.activeName = 'third'; this.field = ''; this.$emit('deviceSelect', ''); diff --git a/src/views/newMap/newMapdraft/mapoperate/responder/responderBatch.vue b/src/views/newMap/newMapdraft/mapoperate/responder/responderBatch.vue index d96800041..4c5cdeb90 100644 --- a/src/views/newMap/newMapdraft/mapoperate/responder/responderBatch.vue +++ b/src/views/newMap/newMapdraft/mapoperate/responder/responderBatch.vue @@ -1,9 +1,9 @@