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] = {
// text: {
// show: true // 公里标名称显示
// show: true // 公里标名称显示
// },
kmPostShow: true, // 公里标显示
kilometerPosition: 'up', // 公里标朝向
kmPostShow: true, // 公里标显示
kilometerPosition: 'up', // 公里标朝向
text: {
borderShow: true, // 车站包围框显示
borderShow: true, // 车站包围框显示
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离

View File

@ -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,

View File

@ -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) {

View File

@ -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;

View File

@ -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;
},