This commit is contained in:
joylink_cuiweidong 2020-08-10 15:55:01 +08:00
commit 76bf1706ab
5 changed files with 26 additions and 40 deletions

View File

@ -334,12 +334,12 @@ class SkinCode extends defaultStyle {
}; };
this[deviceType.Station] = { this[deviceType.Station] = {
// text: { // text: {
// show: true // 公里标名称显示 // show: true // 公里标名称显示
// }, // },
kmPostShow: true, // 公里标显示 kmPostShow: true, // 公里标显示
kilometerPosition: 'up', // 公里标朝向 kilometerPosition: 'up', // 公里标朝向
text: { text: {
borderShow: true, // 车站包围框显示 borderShow: true, // 车站包围框显示
fontSize: 11, // 字体大小 fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离 distance: 5 // 灯跟文字距离

View File

@ -11,11 +11,6 @@ export default class EMouse extends Group {
create() { create() {
if (this.device && this.device.model.visible) { if (this.device && this.device.model.visible) {
const stationTextRect = this.device.stationText.getBoundingRect().clone(); 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({ this.lineBorder = new Rect({
zlevel: this.device.zlevel, zlevel: this.device.zlevel,
z: this.device.z + 1, z: this.device.z + 1,

View File

@ -9,8 +9,6 @@ import ESingleControl from './ESingleControl';
import EArrow from './EArrow'; import EArrow from './EArrow';
import { arrow } from '../utils/ShapePoints'; import { arrow } from '../utils/ShapePoints';
import Rect from 'zrender/src/graphic/shape/Rect'; 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 Text from 'zrender/src/graphic/Text';
import store from '@/store/index_APP_TARGET'; import store from '@/store/index_APP_TARGET';
import Vue from 'vue'; import Vue from 'vue';
@ -51,14 +49,17 @@ export default class Station extends Group {
textFill: model.nameFontColor textFill: model.nameFontColor
}); });
this.add(this.stationText); this.add(this.stationText);
if (style.Station.text.borderShow) { if (style.Station.text.borderShow) { // 哈尔滨线路单独显示
this.stationText.setStyle('textPadding', [2, 6]); this.stationText.attr({
this.stationText.setStyle('textBorderColor', model.nameFontColor); style: {
this.stationText.setStyle('textBorderWidth', 1); textPadding: [2, 6],
textBorderColor: model.nameFontColor,
textBorderWidth: 1
}
});
} }
const path = window.location.href; const path = window.location.href;
if (style.Station.kmPostShow || path.includes('/map/draw')) { if (style.Station.kmPostShow || path.includes('/map/draw')) { // 公里标是否显示
// 公里标是否显示
let direction = 1; let direction = 1;
if (this.style.Station.kilometerPosition == 'up') { if (this.style.Station.kilometerPosition == 'up') {
direction = -1; direction = -1;
@ -101,9 +102,13 @@ export default class Station extends Group {
}); });
this.add(this.subheadText); this.add(this.subheadText);
if (style.Station.text.borderShow) { if (style.Station.text.borderShow) {
this.subheadText.setStyle('textPadding', [2, 6]); this.subheadText.attr({
this.subheadText.setStyle('textBorderColor', model.nameFontColor); style: {
this.subheadText.setStyle('textBorderWidth', 1); textPadding: [2, 6],
textBorderColor: model.nameFontColor,
textBorderWidth: 1
}
});
} }
} }
if (!model.visible) { // 隐藏车站 if (!model.visible) { // 隐藏车站
@ -176,18 +181,11 @@ export default class Station extends Group {
createControlMode() { createControlMode() {
const model = this.model; const model = this.model;
if (!this.style.Station.StationControl.disPlayNone) { if (!this.style.Station.StationControl.disPlayNone) {
if (model.visible && model.createControlMode) { if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
// 紧急站控 this.createEmergencyControl(); // 紧急站控
this.createEmergencyControl(); this.createCenterControl(); // 中控按钮
this.createSubstationControl(); // 站控按钮
// 中控按钮 this.createInterconnectedControl(); // 联锁控
this.createCenterControl();
// 站控按钮
this.createSubstationControl();
// 联锁控
this.createInterconnectedControl();
} }
} }
this.setState(model); this.setState(model);
@ -446,7 +444,6 @@ export default class Station extends Group {
} }
getBoundingRect() { getBoundingRect() {
// if (this.model.visible) {
const rect = this.stationText.getBoundingRect().clone(); const rect = this.stationText.getBoundingRect().clone();
if (this.model.subheadDisplay) { if (this.model.subheadDisplay) {
const subheadText = this.subheadText.getBoundingRect().clone(); const subheadText = this.subheadText.getBoundingRect().clone();
@ -455,9 +452,6 @@ export default class Station extends Group {
} else { } else {
return rect; return rect;
} }
// } else {
// return new BoundingRect(0, 0, 0, 0);
// }
} }
drawSelected(selected) { drawSelected(selected) {

View File

@ -1,4 +1,3 @@
/**/
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import ETime from './ETime'; import ETime from './ETime';
import ELevel from './ELevel'; import ELevel from './ELevel';
@ -42,7 +41,6 @@ class StationStand extends Group {
create() { create() {
const model = this.model; const model = this.model;
const style = this.style; const style = this.style;
// const drict = 1;
/** 列车站台*/ /** 列车站台*/
const standX = model.position.x - model.width / 2; const standX = model.position.x - model.width / 2;

View File

@ -343,8 +343,7 @@ export default {
} else { } else {
this.editModel.chargeStationCodeList = []; this.editModel.chargeStationCodeList = [];
// const arr = this.modifyChargeStation(); // const arr = this.modifyChargeStation();
// const arr1 = this.setStationStand(this.editModel, ''); // list = [...arr];
// list = [...arr, ...arr1];
} }
return list; return list;
}, },