From 7d5605d170d66eaf6015fe3f9f4fd31b5197a1be Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 24 Apr 2020 18:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E4=BA=8C=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=20=E7=BB=98=E5=9B=BE=20=E7=AB=99=E5=8F=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=AD=9B=E9=80=89=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/xian_02.js | 4 ++ .../shape/StationStand/EPatternFilter.js | 57 +++++++++++++++++++ src/jmapNew/shape/StationStand/index.js | 17 ++++++ .../xian_02/menus/dialog/stationControl.vue | 3 +- .../xian_02/menus/dialog/turnBackControl.vue | 4 +- 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 src/jmapNew/shape/StationStand/EPatternFilter.js diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 557291bed..676cfe35e 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -253,6 +253,10 @@ class SkinCode extends defaultStyle { defaultColor:'#808080', // 西安二号线特殊样式(默认颜色) special:true // 西安二号线特殊样式 }, + patternFilter:{ // 模式筛选标识 + defaultColor:'#808080', // 默认颜色, + offset:{x:25, y:15} // 相对于站台边缘的偏移 + }, reentry: {}, // 站台折返策略 detainCar: { // 扣车 position: -1, // 扣车标识在站台上显示方向 diff --git a/src/jmapNew/shape/StationStand/EPatternFilter.js b/src/jmapNew/shape/StationStand/EPatternFilter.js new file mode 100644 index 000000000..a6f1b6e70 --- /dev/null +++ b/src/jmapNew/shape/StationStand/EPatternFilter.js @@ -0,0 +1,57 @@ +import Group from 'zrender/src/container/Group'; +import Polygon from 'zrender/src/graphic/shape/Polygon'; + +class EPatternFilter extends Group { + constructor(model) { + super(); + this.model = model; + this.create(); + } + + create() { + const model = this.model; + const style = this.model.style; + const startX = (model.width / 2 + style.StationStand.patternFilter.offset.x); + const startY = model.y + (model.height / 2 + style.StationStand.patternFilter.offset.y) * model.direction + (1 + model.direction) / 2 * 14; + this.patternFilter1 = new Polygon({ + zlevel: model.zlevel, + z: model.z, + shape: { + points:[ + [model.x - startX, startY], + [model.x - startX, startY - 14], + [model.x - startX - 14, startY - 14], + [model.x - startX - 14 - 10 * 0.866, startY - 7], + [model.x - startX - 14, startY] + ] + }, + style: { + fill: style.StationStand.patternFilter.defaultColor + } + }); + this.patternFilter2 = new Polygon({ + zlevel: model.zlevel, + z: model.z, + shape: { + points:[ + [model.x + startX, startY], + [model.x + startX, startY - 14], + [model.x + startX + 14, startY - 14], + [model.x + startX + 14 + 10 * 0.866, startY - 7], + [model.x + startX + 14, startY] + ] + }, + style: { + fill: style.StationStand.patternFilter.defaultColor + } + }); + this.add(this.patternFilter1); + this.add(this.patternFilter2); + } + + setColor(color) { + this.patternFilter1.setStyle('fill', color); + } +} + +export default EPatternFilter; diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index a9cd55baa..2e85b968d 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -13,6 +13,7 @@ import ETrainStop from './ETrainStop'; import ETrainDepart from './ETrainDepart'; import EControl from '../element/EControl'; import EDetainCircle from './EDetainCircle'; +import EPatternFilter from './EPatternFilter'; import {isShowThePrdType} from '../../utils/handlePath'; class StationStand extends Group { @@ -60,6 +61,22 @@ class StationStand extends Group { }); this.add(this.safeStand); + // 模式筛选标识(西安二号线特殊的情况) + if (style.StationStand.patternFilter) { + const direction = model.right ? 1 : -1; + this.patternFilter = new EPatternFilter({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: model.position.x, + y: model.position.y, + width: model.width, + height:model.height, + direction:direction + }); + this.add(this.patternFilter); + } + /** 站台紧急关闭*/ const emergentOffset = model.inside ? style.StationStand.standEmergent.insideOffset : style.StationStand.standEmergent.outsideOffset; const emergentH = model.right ? 1 : -1; diff --git a/src/jmapNew/theme/xian_02/menus/dialog/stationControl.vue b/src/jmapNew/theme/xian_02/menus/dialog/stationControl.vue index 161c4ea9a..b2233e491 100644 --- a/src/jmapNew/theme/xian_02/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/xian_02/menus/dialog/stationControl.vue @@ -64,7 +64,8 @@ export default { row: null, operation: '', stationLists: [], - disabledAll: false + disabledAll: false, + checked2: false }; }, computed: { diff --git a/src/jmapNew/theme/xian_02/menus/dialog/turnBackControl.vue b/src/jmapNew/theme/xian_02/menus/dialog/turnBackControl.vue index d5207e778..37c1a36cb 100644 --- a/src/jmapNew/theme/xian_02/menus/dialog/turnBackControl.vue +++ b/src/jmapNew/theme/xian_02/menus/dialog/turnBackControl.vue @@ -24,10 +24,10 @@ - 设置 + 设置 - 取消 + 取消