调整站台显示问题
This commit is contained in:
parent
2b5ac01556
commit
73b51bd385
@ -222,7 +222,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: { x: 0, y: 0 }, // 站台紧急关闭偏移量
|
||||
offset: { x: 0, y: 0 }, // 站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
@ -247,7 +247,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: { x: -8, y: 22 }, // 运行等级偏移量
|
||||
offset: { x: -8, y: 10 }, // 运行等级偏移量
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
|
@ -220,8 +220,9 @@ class SkinCode extends defaultStyle {
|
||||
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
flicker: true, // 闪烁
|
||||
mergentR: 5, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 15}, // 站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
@ -242,12 +243,13 @@ class SkinCode extends defaultStyle {
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0' // 停站时间字体颜色
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 0},
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
@ -255,7 +257,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
offset: {x: -8, y: 15}, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
}
|
||||
};
|
||||
|
@ -218,7 +218,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 0}, // 站台紧急关闭偏移量
|
||||
offset: {x: 0, y: 3}, // 站台紧急关闭偏移量
|
||||
closeColor: 'red' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
|
@ -84,6 +84,7 @@ deviceState[deviceType.Psd] = {
|
||||
// State03: '03' /** 切除 */
|
||||
// },
|
||||
// /** 屏蔽门开门状态*/
|
||||
screenDoorOpenStatus: 0,
|
||||
// screenDoorOpenStatus: {
|
||||
// Default: '01', /** 关门(缺省值)*/
|
||||
// State01: '01', /** 关门 */
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import deviceType from './deviceType';
|
||||
|
||||
// 所有默认状态在这里都要有 用来转换后台发送的数据状态
|
||||
class Status {
|
||||
@ -60,6 +61,7 @@ class Status {
|
||||
}
|
||||
handlePsd(device) {
|
||||
this.statusObj = {
|
||||
screenDoorOpenStatus: device.screenDoorOpenStatus, // 屏蔽门是否开门
|
||||
fault: device.fault /** 非故障*/
|
||||
};
|
||||
}
|
||||
|
@ -65,14 +65,8 @@ export default class Line2 extends Group {
|
||||
|
||||
setState(model) {
|
||||
/** 设置屏蔽门开关*/
|
||||
// switch (model.screenDoorOpenStatus) {
|
||||
// case '01':
|
||||
// this.closeDoor(); /** 关门*/
|
||||
// break;
|
||||
// case '02':
|
||||
// this.openDoor(); /** 开门*/
|
||||
// break;
|
||||
// }
|
||||
model.screenDoorOpenStatus != 0 && this.openDoor(); /** 开门*/
|
||||
model.screenDoorOpenStatus == 0 && this.closeDoor(); /** 关门*/
|
||||
|
||||
// /** 设置屏蔽门状态*/
|
||||
// switch (model.screenDoorStatus) {
|
||||
|
@ -21,11 +21,12 @@ class ELevel extends Group {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontSize: style.StationStand.stopTime.textFontSize || style.StationStand.common.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'middle'
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -74,6 +74,10 @@ class ESafeEmergent extends Group {
|
||||
this.create();
|
||||
this.emergent.show();
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.emergent;
|
||||
}
|
||||
}
|
||||
|
||||
export default ESafeEmergent;
|
||||
|
@ -25,7 +25,8 @@ class ETime extends Group {
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.stopTime.textColor,
|
||||
textAlign: 'middle'
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -51,9 +51,9 @@ class StationStand extends Group {
|
||||
this.add(this.safeStand);
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
const emergentH = model.right ? 1 : -1;
|
||||
let emergentX = model.position.x + drict * (style.StationStand.standEmergent.offset.x);
|
||||
let emergentY = model.position.y + emergentH * (model.height / 2 + style.StationStand.standEmergent.mergentR);
|
||||
const emergentH = model.inside ? model.right ? 1 : -1 : model.right ? -1 : 1;
|
||||
let emergentX = model.position.x + style.StationStand.standEmergent.offset.x;
|
||||
let emergentY = model.position.y + emergentH * (model.height / 2 + style.StationStand.standEmergent.offset.y);
|
||||
if (style.StationStand.common.special) {
|
||||
emergentX = model.position.x;
|
||||
emergentY = model.position.y;
|
||||
@ -140,9 +140,9 @@ class StationStand extends Group {
|
||||
});
|
||||
|
||||
/** 停站时间*/
|
||||
const timeH = style.StationStand.standEmergent.mergentR;
|
||||
const timeX = model.position.x - (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH;
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -153,9 +153,9 @@ class StationStand extends Group {
|
||||
});
|
||||
|
||||
/** 运行等级*/
|
||||
const levelH = style.StationStand.standEmergent.mergentR;
|
||||
const levelX = model.position.x - (style.StationStand.level.position || drict) * (style.StationStand.level.offset.x - model.width / 2);
|
||||
const levelY = model.position.y + (style.StationStand.level.position || drict) * (style.StationStand.level.offset.y) + drict * levelH;
|
||||
const levelDrict = model.right ? 1 : -1;
|
||||
const levelX = model.position.x - levelDrict * (style.StationStand.level.offset.x - model.width / 2);
|
||||
const levelY = model.position.y + levelDrict * (style.StationStand.level.offset.y);
|
||||
this.level = new ELevel({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -167,11 +167,11 @@ class StationStand extends Group {
|
||||
|
||||
/** 列车停跳 */
|
||||
if (style.StationStand.common.haveJumpShow) {
|
||||
const jumpH = style.StationStand.standEmergent.mergentR;
|
||||
const jumpX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
|
||||
const jumpCX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH;
|
||||
const jumpDirct = model.right ? -1 : 1;
|
||||
const jumpX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
const jumpCX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
this.jump = new EJump({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -180,8 +180,8 @@ class StationStand extends Group {
|
||||
y: jumpY,
|
||||
cx: jumpCX,
|
||||
cy: jumpCY,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
allSkip: model.allSkip,
|
||||
assignSkip: model.assignSkip
|
||||
});
|
||||
@ -240,9 +240,10 @@ class StationStand extends Group {
|
||||
stop() {
|
||||
if (!this.style.StationStand.common.special) {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
|
||||
} else {
|
||||
this.trainStop && this.trainStop.show();
|
||||
this.trainDepart && this.trainDepart.show();
|
||||
}
|
||||
this.trainStop && this.trainStop.show();
|
||||
this.trainDepart && this.trainDepart.show();
|
||||
}
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
@ -251,6 +252,13 @@ class StationStand extends Group {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
||||
}
|
||||
this.emergent && this.emergent.show();
|
||||
if (this.style.StationStand.standEmergent.flicker) {
|
||||
this.emergent.getElement().animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.StationStand.standEmergent.closeColor })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
/** 指定列车跳站*/
|
||||
|
@ -122,7 +122,6 @@ export default class Switch extends Group {
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
|
||||
this.releaseBackground = new Line({ // 区段上遮盖段
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
|
@ -3,12 +3,12 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
|
Loading…
Reference in New Issue
Block a user