大铁线路 区段添加停车点偏移坐标
This commit is contained in:
parent
4ffda4f614
commit
c34ecffd04
@ -271,6 +271,7 @@ export default {
|
||||
isStandTrack: 'Platform rail:',
|
||||
standTrackName: 'Platform track name:',
|
||||
standTrackNamePosition: 'Platform track name offset:',
|
||||
stopCDPosition:'stopCD offset',
|
||||
relStandCode: 'The platform code:',
|
||||
isReentryTrack: 'Whether to return to orbit:',
|
||||
reentryTrackName: 'Name of reentrant rail:',
|
||||
|
@ -255,6 +255,7 @@ export default {
|
||||
isStandTrack: '是否站台轨:',
|
||||
standTrackName: '站台轨名称:',
|
||||
standTrackNamePosition: '站台轨名称偏移量:',
|
||||
stopCDPosition:'停车倒计时偏移量',
|
||||
relStandCode: '站台编码:',
|
||||
isReentryTrack: '是否折返轨:',
|
||||
reentryTrackName: '折返轨名称:',
|
||||
|
@ -135,7 +135,8 @@ export default class Section extends Group {
|
||||
this.add(this[element]);
|
||||
});
|
||||
|
||||
if (this.style.Section.remainTime && (this.model.standTrack || this.model.reentryTrack || this.model.transferTrack)) {
|
||||
if (this.style.Section.remainTime && this.model.standTrack) {
|
||||
const stopCDPosition = this.model.stopCDPosition || {x:0, y:0};
|
||||
const computedPoints = this.computedPoints;
|
||||
const drict = model.trainPosType != '01' ? 1 : -1;
|
||||
const x = Math.min(computedPoints[0].x, computedPoints[computedPoints.length - 1].x) + Math.abs(computedPoints[computedPoints.length - 1].x - computedPoints[0].x) / 2;
|
||||
@ -146,8 +147,8 @@ export default class Section extends Group {
|
||||
z: this.z,
|
||||
silent: model.silent || false,
|
||||
style: {
|
||||
x: x,
|
||||
y: y - 23 * drict,
|
||||
x: x + stopCDPosition.x,
|
||||
y: y - 23 * drict + stopCDPosition.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: 13,
|
||||
fontFamily:style.fontFamily,
|
||||
@ -163,8 +164,8 @@ export default class Section extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: x - 18,
|
||||
cy: y - 23 * drict,
|
||||
cx: x - 18 + stopCDPosition.x,
|
||||
cy: y - 23 * drict + stopCDPosition.y,
|
||||
r: 6
|
||||
},
|
||||
style: {
|
||||
@ -175,8 +176,11 @@ export default class Section extends Group {
|
||||
});
|
||||
this.add(this.remainTimeText);
|
||||
this.add(this.remainTimeCircle);
|
||||
this.remainTimeText.hide();
|
||||
this.remainTimeCircle.hide();
|
||||
const path = window.location.href;
|
||||
if (!path.includes('/map/draw')) { // 公里标是否显示
|
||||
this.remainTimeText.hide();
|
||||
this.remainTimeCircle.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -592,6 +596,15 @@ export default class Section extends Group {
|
||||
// 分路不良
|
||||
// model.shuntingTypeList.length > 0 &&
|
||||
model.badShunt && this.badShuntStatus();
|
||||
// 停车倒计时
|
||||
if (this.remainTimeText) {
|
||||
if (model.stopCountDown) {
|
||||
this.showRemainTime(model.stopCountDown);
|
||||
} else {
|
||||
this.hideRemainTime();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,14 +189,6 @@ class StationStand extends Group {
|
||||
this.upDetainLamp && this.upDetainLamp.show();
|
||||
this.downDetainLamp && this.downDetainLamp.show();
|
||||
}
|
||||
if (this.style.Section.remainTime) {
|
||||
const section = this.mapDevice[model.standTrackCode];
|
||||
if (model.trainParking && model.remainTime) {
|
||||
section.instance && section.instance.showRemainTime(model.remainTime);
|
||||
} else {
|
||||
section.instance && section.instance.hideRemainTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1054,19 +1054,20 @@ export default {
|
||||
.simulationTellInfo{
|
||||
position: absolute;
|
||||
width: 328px;
|
||||
height: 100px;
|
||||
top: 50px;
|
||||
right:10px;
|
||||
padding: 0px 0px 5px 0px;
|
||||
overflow:auto;
|
||||
right: 10px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
overflow: auto;
|
||||
background: #c3c3c3;
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
}
|
||||
.simulationDeviceInfo{
|
||||
position: absolute;
|
||||
width: 328px;
|
||||
height: 100px;
|
||||
top: 152px;
|
||||
height: 100px;
|
||||
top: 83px;
|
||||
right:10px;
|
||||
padding: 5px;
|
||||
overflow:auto;
|
||||
|
@ -264,6 +264,7 @@ export const translate = {
|
||||
{ key: 'destinationCodePoint', tHeader: '目的地码坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } },
|
||||
{ key: 'standTrackName', tHeader: '站台轨名称', formatter: (val) => { return val || ''; } },
|
||||
{ key: 'standTrackNamePosition', tHeader: '站台轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } },
|
||||
{ key: 'stopCDPosition', tHeader: '停车倒计时偏移量', formatter: (val) => { return val ? JSON.parse(val) : ''; } },
|
||||
{ key: 'transferTrackName', tHeader: '转换轨名称', formatter: (val) => { return val || ''; } },
|
||||
{ key: 'transferTrackNamePosition', tHeader: '转换轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } },
|
||||
{ key: 'isCurve', tHeader: '是否曲线', formatter: (val) => { return val || false; } }
|
||||
|
@ -23,6 +23,7 @@ class Model {
|
||||
this.standTrack = false; // 是否站台轨
|
||||
this.standTrackName = '';
|
||||
this.standTrackNamePosition = { x: 0, y: 0 };
|
||||
this.stopCDPosition = {x: 0, y: 0}; // 停车倒计时偏移量
|
||||
this.reentryTrack = false; // 是否折返轨
|
||||
this.reentryTrackName = '';
|
||||
this.reentryTrackNamePosition = { x: 0, y: 0 };
|
||||
|
@ -167,6 +167,10 @@ export default {
|
||||
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop: 'stopCDPosition', label: this.$t('map.stopCDPosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
||||
{ prop: 'stopCDPosition.x', firstLevel: 'stopCDPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'stopCDPosition.y', firstLevel: 'stopCDPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isReentryTrackShow }, // 是否折返轨
|
||||
{ prop: 'firstTurnBack', label: '是否优先折返:', type: 'checkbox', isHidden: !this.isreentryTrackName },
|
||||
{ prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName }, // 折返轨名称
|
||||
|
Loading…
Reference in New Issue
Block a user