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