From fda63a7ca69b326f138d8ccb1e4032f97db5ce70 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 10 Aug 2020 13:01:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=9A=E4=BD=99=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/haerbin_01.js | 8 ++-- src/jmapNew/shape/Station/EMouse.js | 5 -- src/jmapNew/shape/Station/index.js | 48 ++++++++----------- src/jmapNew/shape/StationStand/index.js | 2 - .../newMap/newMapdraft/mapoperate/station.vue | 3 +- 5 files changed, 26 insertions(+), 40 deletions(-) diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 0a3c0c3a3..d03db930f 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -334,12 +334,12 @@ class SkinCode extends defaultStyle { }; this[deviceType.Station] = { // text: { - // show: true // 公里标名称显示 + // show: true // 公里标名称显示 // }, - kmPostShow: true, // 公里标显示 - kilometerPosition: 'up', // 公里标朝向 + kmPostShow: true, // 公里标显示 + kilometerPosition: 'up', // 公里标朝向 text: { - borderShow: true, // 车站包围框显示 + borderShow: true, // 车站包围框显示 fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 diff --git a/src/jmapNew/shape/Station/EMouse.js b/src/jmapNew/shape/Station/EMouse.js index 75fd5e802..508a7e46b 100644 --- a/src/jmapNew/shape/Station/EMouse.js +++ b/src/jmapNew/shape/Station/EMouse.js @@ -11,11 +11,6 @@ export default class EMouse extends Group { create() { if (this.device && this.device.model.visible) { const stationTextRect = this.device.stationText.getBoundingRect().clone(); - // const path = window.location.href; - // if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) { - // const mileageTextRect = this.device.mileageText.getBoundingRect(); - // stationTextRect.union(mileageTextRect); - // } this.lineBorder = new Rect({ zlevel: this.device.zlevel, z: this.device.z + 1, diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 2194698c1..2fd2fbd8f 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -9,8 +9,6 @@ import ESingleControl from './ESingleControl'; import EArrow from './EArrow'; import { arrow } from '../utils/ShapePoints'; import Rect from 'zrender/src/graphic/shape/Rect'; -// import BoundingRect from 'zrender/src/core/BoundingRect'; -// import {isShowThePrdType} from '../../utils/handlePath'; import Text from 'zrender/src/graphic/Text'; import store from '@/store/index_APP_TARGET'; import Vue from 'vue'; @@ -51,14 +49,17 @@ export default class Station extends Group { textFill: model.nameFontColor }); this.add(this.stationText); - if (style.Station.text.borderShow) { - this.stationText.setStyle('textPadding', [2, 6]); - this.stationText.setStyle('textBorderColor', model.nameFontColor); - this.stationText.setStyle('textBorderWidth', 1); + if (style.Station.text.borderShow) { // 哈尔滨线路单独显示 + this.stationText.attr({ + style: { + textPadding: [2, 6], + textBorderColor: model.nameFontColor, + textBorderWidth: 1 + } + }); } const path = window.location.href; - if (style.Station.kmPostShow || path.includes('/map/draw')) { - // 公里标是否显示 + if (style.Station.kmPostShow || path.includes('/map/draw')) { // 公里标是否显示 let direction = 1; if (this.style.Station.kilometerPosition == 'up') { direction = -1; @@ -101,9 +102,13 @@ export default class Station extends Group { }); this.add(this.subheadText); if (style.Station.text.borderShow) { - this.subheadText.setStyle('textPadding', [2, 6]); - this.subheadText.setStyle('textBorderColor', model.nameFontColor); - this.subheadText.setStyle('textBorderWidth', 1); + this.subheadText.attr({ + style: { + textPadding: [2, 6], + textBorderColor: model.nameFontColor, + textBorderWidth: 1 + } + }); } } if (!model.visible) { // 隐藏车站 @@ -176,18 +181,11 @@ export default class Station extends Group { createControlMode() { const model = this.model; if (!this.style.Station.StationControl.disPlayNone) { - if (model.visible && model.createControlMode) { - // 紧急站控 - this.createEmergencyControl(); - - // 中控按钮 - this.createCenterControl(); - - // 站控按钮 - this.createSubstationControl(); - - // 联锁控 - this.createInterconnectedControl(); + if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 + this.createEmergencyControl(); // 紧急站控 + this.createCenterControl(); // 中控按钮 + this.createSubstationControl(); // 站控按钮 + this.createInterconnectedControl(); // 联锁控 } } this.setState(model); @@ -446,7 +444,6 @@ export default class Station extends Group { } getBoundingRect() { - // if (this.model.visible) { const rect = this.stationText.getBoundingRect().clone(); if (this.model.subheadDisplay) { const subheadText = this.subheadText.getBoundingRect().clone(); @@ -455,9 +452,6 @@ export default class Station extends Group { } else { return rect; } - // } else { - // return new BoundingRect(0, 0, 0, 0); - // } } drawSelected(selected) { diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 5fac74880..c7826cd3c 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -1,4 +1,3 @@ -/**/ import Group from 'zrender/src/container/Group'; import ETime from './ETime'; import ELevel from './ELevel'; @@ -42,7 +41,6 @@ class StationStand extends Group { create() { const model = this.model; const style = this.style; - // const drict = 1; /** 列车站台*/ const standX = model.position.x - model.width / 2; diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue index 947a1f800..cca6a3da1 100644 --- a/src/views/newMap/newMapdraft/mapoperate/station.vue +++ b/src/views/newMap/newMapdraft/mapoperate/station.vue @@ -343,8 +343,7 @@ export default { } else { this.editModel.chargeStationCodeList = []; // const arr = this.modifyChargeStation(); - // const arr1 = this.setStationStand(this.editModel, ''); - // list = [...arr, ...arr1]; + // list = [...arr]; } return list; },