From 7ce6cf6e8a2f116c2a593bd11297576a2c2cf710 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 8 Dec 2020 18:41:18 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8C=BA=E6=AE=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/newMapdraft/mapoperate/section/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index fa47a6fcc..3cc9ff847 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -429,7 +429,7 @@ export default { this.handleInit(); this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); - this.oldPoint = selected.points; + this.oldPoint = JSON.parse(JSON.stringify(selected.points)); this.oldLeftSectionCode = selected.leftSectionCode; this.oldRightSectionCode = selected.rightSectionCode; if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) { @@ -540,7 +540,8 @@ export default { copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站 if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) { copySection.points[0] = model.points[0]; - } else if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], copySection.points[copySection.points.length - 1])) { + } + if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], copySection.points[copySection.points.length - 1])) { copySection.points[copySection.points.length - 1] = model.points[model.points.length - 1]; } models.push(copySection); @@ -653,6 +654,9 @@ export default { !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; + if (model.points[model.points.length - 1].x == model.points[0].x && model.points[model.points.length - 1].y == model.points[0].y) { + return models; + } } } return models; From a9b94c8e5d93ba9b03fd6a51202aef03974f54c2 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 8 Dec 2020 18:43:55 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=9B=BD=E8=B5=9B=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F&?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E5=99=A8=E6=8F=90=E7=A4=BA=E7=99=BB=E5=87=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D&=E5=AE=81=E6=B3=A2=E4=B8=89=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 7 +- .../shape/StationStand/detain/EDetainRect.js | 63 ++++++++++---- .../menus/menuDialog/allocateTime.vue | 54 +++++++++--- .../menuDialog/initializeSwitchBlock.vue | 81 +++++++++++++++-- .../menus/menuDialog/standControl.vue | 15 +++- .../menus/menuDialog/standDetail.vue | 36 ++++++-- .../menus/menuDialog/standDetain.vue | 50 +++++++++-- .../menus/menuDialog/switchBlock.vue | 67 +++++++++++++-- .../menus/menuDialog/switchCommand.vue | 86 +++++++++++++++---- src/utils/request.js | 17 ++-- src/views/login/index.vue | 2 +- 11 files changed, 382 insertions(+), 96 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 02fc2e07c..40c63a6ac 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -414,8 +414,9 @@ class SkinCode extends defaultStyle { position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 offset: { x: -8, y: 10 }, // 扣车偏移量 - centerTrainColor: '#00FF00', // 中心扣车颜色 - andCenterTrainColor: '#00FF00', // 车站+中心扣车颜色 + centerTrainColor: ['#FFFF00', '#0000FF'], // 中心扣车颜色 + localTrainColor: ['#FFFF00', '#0000FF'], // 车站扣车颜色 + andCenterTrainColor: ['#FFFF00', '#0000FF'], // 车站+中心扣车颜色 detainTrainTextColor: '#FFFF00', // 车站扣除文字颜色 spareStrokeColor: '#000000', // 扣车描边颜色 lineWidth: 3, // 扣车线宽 @@ -566,7 +567,7 @@ class SkinCode extends defaultStyle { this[deviceType.ZcControl] = { // 是否显示 - visible: true, + visible: false, text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/shape/StationStand/detain/EDetainRect.js b/src/jmapNew/shape/StationStand/detain/EDetainRect.js index 103add84e..068ce9e38 100644 --- a/src/jmapNew/shape/StationStand/detain/EDetainRect.js +++ b/src/jmapNew/shape/StationStand/detain/EDetainRect.js @@ -15,22 +15,27 @@ class EDetainCircle extends Group { const standX = model.position.x - model.width / 2; const standY = model.position.y - model.height / 2; - let y; + let y1; + let y2; if (model.right && model.inside) { - y = standY + model.height / 2; + y1 = standY + model.height / 2; + y2 = standY; } else if (model.right && !model.inside) { - y = standY; + y1 = standY; + y2 = standY + model.height / 2; } else if (!model.right && model.inside) { - y = standY; + y1 = standY; + y2 = standY + model.height / 2; } else if (!model.right && !model.inside) { - y = standY + model.height / 2; + y1 = standY + model.height / 2; + y2 = standY; } - this.detainRect = new Rect({ + this.detainRectTop = new Rect({ zlevel: this.model.zlevel, z: this.model.z + 1, shape: { x: standX, - y: y, + y: y1, width: model.width, height: model.height / 2 }, @@ -40,18 +45,38 @@ class EDetainCircle extends Group { fill: '#000' } }); - this.add(this.detainRect); - this.detainRect.hide(); + this.detainRectBottom = new Rect({ + zlevel: this.model.zlevel, + z: this.model.z + 1, + shape: { + x: standX, + y: y2, + width: model.width, + height: model.height / 2 + }, + style: { + lineWidth: style.StationStand.detainRect.lineWidth || 0, + stroke: style.StationStand.detainRect.spareStrokeColor, + fill: '#000' + } + }); + this.add(this.detainRectTop); + this.add(this.detainRectBottom); + this.detainRectTop.hide(); + this.detainRectBottom.hide(); } - setColor(color) { - this.detainRect.setStyle('stroke', color); + setColor(color1, color2) { + this.detainRectTop.setStyle('fill', color1); + this.detainRectBottom.setStyle('fill', color2); } setShow() { - this.detainRect.show(); + this.detainRectTop.show(); + this.detainRectBottom.show(); } setHide() { - this.detainRect.hide(); + this.detainRectTop.hide(); + this.detainRectBottom.hide(); } recover() { this.setHide(); @@ -61,14 +86,14 @@ class EDetainCircle extends Group { const style = this.model.style; /** 设置扣车*/ if (model.stationHoldTrain && model.centerHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.centerTrainColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.centerTrainColor); } else if (model.stationHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.detainTrainTextColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.localTrainColor); } else if (model.centerHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.centerTrainColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.centerTrainColor); } } } diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue index af55e9e1e..558c8172c 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue @@ -1,13 +1,23 @@