哈尔滨列车调整
This commit is contained in:
parent
482df0de33
commit
815e4446d4
@ -127,7 +127,7 @@ class SkinCode extends defaultStyle {
|
||||
color: '#3149C3' // 区段边界符颜色
|
||||
},
|
||||
block: {
|
||||
special: true, // 区段特殊显示
|
||||
special: true // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
@ -370,7 +370,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
sectionAction: {
|
||||
flag: true, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b', // 区段显示颜色
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
splice: true, // 哈尔滨特殊显示
|
||||
@ -381,7 +381,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false, // 道岔封锁显示
|
||||
contentRectColor: '#fff', // 道岔封锁名称颜色
|
||||
rhomboidShow: true, // 道岔单独显示
|
||||
rhomboidShow: true // 道岔单独显示
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#fff', // 道岔单锁定位颜色 (红色)
|
||||
@ -514,11 +514,12 @@ class SkinCode extends defaultStyle {
|
||||
textAContent: '警' // textA文本
|
||||
},
|
||||
trainAtrStatus: {
|
||||
trainAtrStatusOffset: { x: 68, y: 9},
|
||||
trainAtrStatusOffset: { x: 74, y: 8},
|
||||
r: 5
|
||||
},
|
||||
travelSigns: {
|
||||
trainTravelSignsOffset: { x:3, y: 3}
|
||||
trainTravelLeftSignsOffset: { x:3, y: 3},
|
||||
trainTravelRightSignsOffset: { x: 62, y: 3}
|
||||
},
|
||||
delayTime: {
|
||||
trainDelayTimeOffset: { x:5, y: 14}
|
||||
@ -573,7 +574,7 @@ class SkinCode extends defaultStyle {
|
||||
fixedCoordinates: true, // 列车车组号等固定坐标
|
||||
trainHeight: 40, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 76, // 列车长度
|
||||
trainWidth: 82, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
nameFontSize: 12, // 字体大小
|
||||
|
@ -5,7 +5,7 @@ import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import BoundingRect from "zrender/src/core/BoundingRect";
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
|
||||
/** 车身*/
|
||||
export default class TrainBody extends Group {
|
||||
@ -100,13 +100,13 @@ export default class TrainBody extends Group {
|
||||
}) : '';
|
||||
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
|
||||
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
|
||||
?(model.directionCode||style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
|
||||
:model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
|
||||
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
|
||||
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
|
||||
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
|
||||
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
|
||||
this.textTrainServer = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z+1,
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.trainServer.trainServerOffset.y),
|
||||
text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length),
|
||||
@ -118,7 +118,7 @@ export default class TrainBody extends Group {
|
||||
});
|
||||
this.textTrainTarget = new ETextName({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z+1,
|
||||
z: this.model.z + 1,
|
||||
x: parseInt(model.point.x + model.style.Train.trainTarget.trainTargetOffset.x),
|
||||
y: parseInt(model.point.y + model.style.Train.trainTarget.trainTargetOffset.y),
|
||||
text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length),
|
||||
@ -130,7 +130,7 @@ export default class TrainBody extends Group {
|
||||
});
|
||||
this.textTrainNumber = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z+1,
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.trainNumber.trainNumberOffset.y),
|
||||
text: targetCode.substring(targetCode.length - 3),
|
||||
@ -145,7 +145,7 @@ export default class TrainBody extends Group {
|
||||
});
|
||||
this.textTrainTargetNumber = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z+1,
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y),
|
||||
text: groupNumber.substring(groupNumber.length - 3),
|
||||
@ -180,12 +180,14 @@ export default class TrainBody extends Group {
|
||||
});
|
||||
// this.add(this.atrStatus);
|
||||
}
|
||||
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
|
||||
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
|
||||
if (style.Train.common.hasTravelSigns) {
|
||||
this.travelSigns = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.travelSigns.trainTravelSignsOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.travelSigns.trainTravelSignsOffset.y),
|
||||
x: parseInt(model.point.x + travelSignsOffsetX),
|
||||
y: parseInt(model.point.y + travelSignsOffsetY),
|
||||
text: this.deviceModel.right ? '>' : '<',
|
||||
textFill: '#00C300',
|
||||
textStroke: style.trainTextColor,
|
||||
@ -259,20 +261,20 @@ export default class TrainBody extends Group {
|
||||
this.trainBodyBox && this.trainBodyBox.setStyle('fill', color);
|
||||
}
|
||||
setTextTrainServerColor(color) {
|
||||
this.textTrainServer&&this.textTrainServer.setStyle('textFill', color);
|
||||
this.textTrainServer&&this.textTrainServer.setStyle('textStroke', color);
|
||||
this.textTrainServer && this.textTrainServer.setStyle('textFill', color);
|
||||
this.textTrainServer && this.textTrainServer.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainTargetColor(color) {
|
||||
this.textTrainTarget&&this.textTrainTarget.setStyle('textFill', color);
|
||||
this.textTrainTarget&&this.textTrainTarget.setStyle('textStroke', color);
|
||||
this.textTrainTarget && this.textTrainTarget.setStyle('textFill', color);
|
||||
this.textTrainTarget && this.textTrainTarget.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainNumberColor(color) {
|
||||
this.textTrainNumber&&this.textTrainNumber.setStyle('textFill', color);
|
||||
this.textTrainNumber&&this.textTrainNumber.setStyle('textStroke', color);
|
||||
this.textTrainNumber && this.textTrainNumber.setStyle('textFill', color);
|
||||
this.textTrainNumber && this.textTrainNumber.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainTargetNumberColor(color) {
|
||||
this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textFill', color);
|
||||
this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textStroke', color);
|
||||
this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle('textFill', color);
|
||||
this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle('textStroke', color);
|
||||
}
|
||||
setHShow(isShow) {
|
||||
if (this.textH) {
|
||||
|
Loading…
Reference in New Issue
Block a user