调整站台属性增加内外站台属性

This commit is contained in:
joylink_zyy 2020-02-04 11:01:50 +08:00
parent 458e401f38
commit 3490c68e83
7 changed files with 23 additions and 18 deletions

View File

@ -20,8 +20,8 @@ class EDetain extends Group {
this.isNew = true; this.isNew = true;
if (style.StationStand.common.special) { if (style.StationStand.common.special) {
const height = model.right ? 30 : -30; const height = model.inside ? 30 : -30;
const position = model.right ? model.width / 4 : -model.width / 4; const position = model.inside ? model.width / 4 : -model.width / 4;
this.detain = new Text({ this.detain = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,
@ -30,7 +30,7 @@ class EDetain extends Group {
x: model.x + position, x: model.x + position,
y: model.y + height, y: model.y + height,
text: textName, text: textName,
textAlign: model.right ? 'left' : 'right', textAlign: model.inside ? 'left' : 'right',
fontWeight: 'blod', fontWeight: 'blod',
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`, fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
textFill: textName == 'E' ? '#fff' : 'red', textFill: textName == 'E' ? '#fff' : 'red',

View File

@ -19,8 +19,8 @@ class ESafeEmergent extends Group {
this.isNew = true; this.isNew = true;
if (style.StationStand.common.special) { if (style.StationStand.common.special) {
const height = model.right ? model.y + 26 : model.y - 33; const height = model.inside ? model.y + 26 : model.y - 33;
const width = model.right ? model.x + model.width / 8 : model.x - model.width / 8; const width = model.inside ? model.x + model.width / 8 : model.x - model.width / 8;
this.emergent = new Polyline({ this.emergent = new Polyline({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,

View File

@ -44,7 +44,7 @@ class ESafeStand extends Group {
fill: style.StationStand.stand.spareColor fill: style.StationStand.stand.spareColor
} }
}); });
const height = model.right ? 7 : -12; const height = model.inside ? 7 : -12;
this.standText = new Text({ this.standText = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,

View File

@ -16,8 +16,8 @@ class ETrainDepart extends Group {
const style = this.model.style; const style = this.model.style;
this.isNew = true; this.isNew = true;
const cy = model.right ? model.y + 30 : model.y - 30; const cy = model.inside ? model.y + 30 : model.y - 30;
const cx = model.right ? model.x - model.width / 4 - model.width / 8 : model.x + model.width / 4 + model.width / 8; const cx = model.inside ? model.x - model.width / 4 - model.width / 8 : model.x + model.width / 4 + model.width / 8;
this.trainDepart = new Text({ this.trainDepart = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,

View File

@ -13,8 +13,8 @@ class ETrainStop extends Group {
const model = this.model; const model = this.model;
this.isNew = true; this.isNew = true;
const cy = model.right ? model.y + 30 : model.y - 30; const cy = model.inside ? model.y + 30 : model.y - 30;
const cx = model.right ? model.x - model.width / 8 : model.x + model.width / 8; const cx = model.inside ? model.x - model.width / 8 : model.x + model.width / 8;
this.trainStop = new Arc({ this.trainStop = new Arc({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,

View File

@ -43,7 +43,7 @@ class StationStand extends Group {
x: standX, x: standX,
y: standY, y: standY,
name: model.name, name: model.name,
right: model.right, inside: model.inside,
width: model.width, width: model.width,
height: model.height height: model.height
}); });
@ -61,7 +61,7 @@ class StationStand extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 1, z: this.z + 1,
style: style, style: style,
right: model.right, inside: model.inside,
width: model.width, width: model.width,
x: emergentX, x: emergentX,
y: emergentY, y: emergentY,
@ -76,7 +76,7 @@ class StationStand extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 1, z: this.z + 1,
style: style, style: style,
right: model.right, inside: model.inside,
width: model.width, width: model.width,
x: stopX, x: stopX,
y: stopY, y: stopY,
@ -91,7 +91,7 @@ class StationStand extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 1, z: this.z + 1,
style: style, style: style,
right: model.right, inside: model.inside,
width: model.width, width: model.width,
x: departX, x: departX,
y: departY, y: departY,
@ -129,7 +129,7 @@ class StationStand extends Group {
x: detainX, x: detainX,
y: detainY, y: detainY,
width: model.width, width: model.width,
right: model.right, inside: model.inside,
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });

View File

@ -71,6 +71,7 @@ export default {
stationCode: '', // stationCode: '', //
position: { x: 0, y: 0 }, position: { x: 0, y: 0 },
visible: true, // visible: true, //
inside: false, //
right: true, right: true,
standTrackCode: '', standTrackCode: '',
small: false small: false
@ -88,6 +89,7 @@ export default {
standTrackDownCode: '', // standTrackDownCode: '', //
stationstandDirection: '02', // stationstandDirection: '02', //
right: true, right: true,
inside: false, //
small: false small: false
} }
}; };
@ -122,7 +124,8 @@ export default {
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }, { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES }, { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES },
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true } { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' },
] ]
}, },
map: { map: {
@ -184,7 +187,8 @@ export default {
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }, { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS }, { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS },
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
{ prop: 'small', label: '是否小型站台:', type: 'checkbox' } { prop: 'small', label: '是否小型站台:', type: 'checkbox' },
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' }
] ]
}, },
door: { door: {
@ -304,7 +308,8 @@ export default {
}, },
standTrackCode: this.addModel.standTrackCode, standTrackCode: this.addModel.standTrackCode,
right: this.addModel.right, right: this.addModel.right,
small: this.addModel.small small: this.addModel.small,
inside: this.addModel.inside
}; };
this.stationList.forEach(elem => { this.stationList.forEach(elem => {
if (elem.code == this.addModel.stationCode) { if (elem.code == this.addModel.stationCode) {