浙大网新操作调整
This commit is contained in:
parent
a9f18f6d61
commit
1ecab822f4
@ -282,6 +282,7 @@ class SkinCode extends defaultStyle {
|
|||||||
position: -1, // 扣车标识在站台上显示方向
|
position: -1, // 扣车标识在站台上显示方向
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
offset: {x: 8, y: 0}, // 扣车偏移量
|
offset: {x: 8, y: 0}, // 扣车偏移量
|
||||||
|
ibpTrainColor: '#E4EF50', // ibp扣车颜色
|
||||||
centerTrainColor: '#E400E4', // 中心扣车颜色
|
centerTrainColor: '#E400E4', // 中心扣车颜色
|
||||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||||
detainTrainTextColor: '#E4EF50', // 车站扣除颜色
|
detainTrainTextColor: '#E4EF50', // 车站扣除颜色
|
||||||
@ -475,7 +476,10 @@ class SkinCode extends defaultStyle {
|
|||||||
spareColor: '#5b5b5b' // 区段显示颜色
|
spareColor: '#5b5b5b' // 区段显示颜色
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
length: 10 // 道岔单边长度
|
length: 10, // 道岔单边长度
|
||||||
|
graphShow: true, // 图形显示
|
||||||
|
graphInversionColor: '#FFFF00', // 反位颜色
|
||||||
|
graphLocalColor: '#00FF00' // 定位颜色
|
||||||
},
|
},
|
||||||
jointImg: { // 道岔 A B C D四元素属性配置
|
jointImg: { // 道岔 A B C D四元素属性配置
|
||||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||||
|
@ -18,7 +18,19 @@ class EDetainCircle extends Group {
|
|||||||
const x = computedPosition.x + (model.width / 2) * detainD + detainD * style.StationStand.detainCircle.offset.x + detainD * style.StationStand.detainCircle.circleWidth / 2;
|
const x = computedPosition.x + (model.width / 2) * detainD + detainD * style.StationStand.detainCircle.offset.x + detainD * style.StationStand.detainCircle.circleWidth / 2;
|
||||||
const y = computedPosition.y;
|
const y = computedPosition.y;
|
||||||
const radius = style.StationStand.detainCircle.circleWidth / 2;
|
const radius = style.StationStand.detainCircle.circleWidth / 2;
|
||||||
|
this.ibpDetainCircle = new Circle({
|
||||||
|
zlevel: this.model.zlevel,
|
||||||
|
z: this.model.z,
|
||||||
|
shape: {
|
||||||
|
cx: x + detainD * 12,
|
||||||
|
cy: y,
|
||||||
|
r: 3
|
||||||
|
},
|
||||||
|
style:{
|
||||||
|
lineWidth:2,
|
||||||
|
stroke: '#ffff00'
|
||||||
|
}
|
||||||
|
});
|
||||||
this.detainCircle = new Circle({
|
this.detainCircle = new Circle({
|
||||||
zlevel: this.model.zlevel,
|
zlevel: this.model.zlevel,
|
||||||
z: this.model.z,
|
z: this.model.z,
|
||||||
@ -61,6 +73,7 @@ class EDetainCircle extends Group {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.detainCircle);
|
this.add(this.detainCircle);
|
||||||
|
this.add(this.ibpDetainCircle);
|
||||||
this.add(this.line1);
|
this.add(this.line1);
|
||||||
this.add(this.line2);
|
this.add(this.line2);
|
||||||
}
|
}
|
||||||
@ -74,6 +87,7 @@ class EDetainCircle extends Group {
|
|||||||
recover() {
|
recover() {
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
this.detainCircle && this.detainCircle.show();
|
this.detainCircle && this.detainCircle.show();
|
||||||
|
this.ibpDetainCircle && this.ibpDetainCircle.hide();
|
||||||
this.line1 && this.line1.show();
|
this.line1 && this.line1.show();
|
||||||
this.line2 && this.line2.show();
|
this.line2 && this.line2.show();
|
||||||
this.setColor(style.StationStand.detainCircle.defaultColor);
|
this.setColor(style.StationStand.detainCircle.defaultColor);
|
||||||
@ -88,6 +102,8 @@ class EDetainCircle extends Group {
|
|||||||
this.setColor(style.StationStand.detainCircle.centerTrainColor);
|
this.setColor(style.StationStand.detainCircle.centerTrainColor);
|
||||||
} else if (model.centerHoldTrain) {
|
} else if (model.centerHoldTrain) {
|
||||||
this.setColor(style.StationStand.detainCircle.centerTrainColor);
|
this.setColor(style.StationStand.detainCircle.centerTrainColor);
|
||||||
|
} else if (model.ibpHoldTrain) {
|
||||||
|
this.ibpDetainCircle && this.ibpDetainCircle.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -309,12 +309,12 @@ export default class TrainBody extends Group {
|
|||||||
setTrainBorderColor(color) {
|
setTrainBorderColor(color) {
|
||||||
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
|
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
|
||||||
}
|
}
|
||||||
setHShow(isShow) {
|
setHShow(isShow, parking) {
|
||||||
if (this.textH) {
|
if (this.textH) {
|
||||||
isShow ? this.textH.show() : this.textH.hide();
|
isShow ? this.textH.show() : this.textH.hide();
|
||||||
}
|
}
|
||||||
if (this.style.Train.common.HSDASpliceShow) {
|
if (this.style.Train.common.HSDASpliceShow && isShow) {
|
||||||
isShow ? this.trainBodyBox.buckleTrain() : this.trainBodyBox.release();
|
this.trainBodyBox.buckleTrain(parking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setSShow(isShow) {
|
setSShow(isShow) {
|
||||||
@ -551,9 +551,12 @@ export default class TrainBody extends Group {
|
|||||||
trainBodyFault() {
|
trainBodyFault() {
|
||||||
this.trainBodyBox && this.trainBodyBox.trainBodyFault();
|
this.trainBodyBox && this.trainBodyBox.trainBodyFault();
|
||||||
}
|
}
|
||||||
untrainBodyFault() {
|
recoverTrainBoxAnimation() {
|
||||||
this.trainBodyBox && this.trainBodyBox.untrainBodyFault();
|
this.trainBodyBox && this.trainBodyBox.recoverAnimation();
|
||||||
}
|
}
|
||||||
|
// untrainBodyFault() {
|
||||||
|
// this.trainBodyBox && this.trainBodyBox.untrainBodyFault();
|
||||||
|
// }
|
||||||
updateTextPosition(point) {
|
updateTextPosition(point) {
|
||||||
this.mouseEvent.updateTextPosition(point);
|
this.mouseEvent.updateTextPosition(point);
|
||||||
}
|
}
|
||||||
|
@ -38,10 +38,10 @@ export default class TrainBodyBox extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 列车扣车
|
// 列车扣车
|
||||||
buckleTrain() {
|
buckleTrain(parking) {
|
||||||
if (this.trainBodyBox) {
|
if (this.trainBodyBox) {
|
||||||
this.trainBodyBox.setStyle('fill', 'yellow');
|
if (parking) { // 列车停稳状态下开始闪烁
|
||||||
if (!this.model.speed) { // 列车停稳状态下开始闪烁
|
this.trainBodyBox.setStyle('fill', 'yellow');
|
||||||
this.trainBodyBox.animateStyle(true)
|
this.trainBodyBox.animateStyle(true)
|
||||||
.when(0, { fill: this.model.style.backgroundColor })
|
.when(0, { fill: this.model.style.backgroundColor })
|
||||||
.when(1000, { fill: 'yellow' })
|
.when(1000, { fill: 'yellow' })
|
||||||
@ -50,13 +50,13 @@ export default class TrainBodyBox extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 列车放行
|
// // 列车放行
|
||||||
release() {
|
// release() {
|
||||||
if (this.trainBodyBox) {
|
// if (this.trainBodyBox) {
|
||||||
this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor);
|
// this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor);
|
||||||
this.trainBodyBox.stopAnimation(false);
|
// this.trainBodyBox.stopAnimation(false);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 西安二号线 列车停车状态 闪烁红色
|
// 西安二号线 列车停车状态 闪烁红色
|
||||||
trainBodyFault() {
|
trainBodyFault() {
|
||||||
if (this.trainBodyBox) {
|
if (this.trainBodyBox) {
|
||||||
@ -69,8 +69,14 @@ export default class TrainBodyBox extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 西安二号线 列车取消停车状态
|
// // 西安二号线 列车取消停车状态
|
||||||
untrainBodyFault() {
|
// untrainBodyFault() {
|
||||||
|
// if (this.trainBodyBox) {
|
||||||
|
// this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor);
|
||||||
|
// this.trainBodyBox.stopAnimation(false);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
recoverAnimation() {
|
||||||
if (this.trainBodyBox) {
|
if (this.trainBodyBox) {
|
||||||
this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor);
|
this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor);
|
||||||
this.trainBodyBox.stopAnimation(false);
|
this.trainBodyBox.stopAnimation(false);
|
||||||
|
@ -221,7 +221,7 @@ export default class Train extends Group {
|
|||||||
|
|
||||||
// 恢复颜色状态
|
// 恢复颜色状态
|
||||||
recover() {
|
recover() {
|
||||||
this.trainB && this.trainB.setHShow(false);
|
this.trainB && this.trainB.setHShow(false, false);
|
||||||
this.trainB && this.trainB.setSShow(false);
|
this.trainB && this.trainB.setSShow(false);
|
||||||
this.trainB && this.trainB.setDShow(false);
|
this.trainB && this.trainB.setDShow(false);
|
||||||
this.trainB && this.trainB.setAShow(false);
|
this.trainB && this.trainB.setAShow(false);
|
||||||
@ -231,6 +231,7 @@ export default class Train extends Group {
|
|||||||
this.trainL && this.trainL.setArrowShow(false);
|
this.trainL && this.trainL.setArrowShow(false);
|
||||||
this.trainR && this.trainR.setArrowShow(false);
|
this.trainR && this.trainR.setArrowShow(false);
|
||||||
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineColor || this.style.trainSidelineColor);
|
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineColor || this.style.trainSidelineColor);
|
||||||
|
this.trainB && this.trainB.recoverTrainBoxAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置运行方向状态类型
|
// 设置运行方向状态类型
|
||||||
@ -327,11 +328,11 @@ export default class Train extends Group {
|
|||||||
this.trainB && this.trainB.setSoonerOrLater(dt);
|
this.trainB && this.trainB.setSoonerOrLater(dt);
|
||||||
}
|
}
|
||||||
// 设置扣车状态
|
// 设置扣车状态
|
||||||
setHoldStatus(status) {
|
setHoldStatus(status, parking) {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.trainB && this.trainB.setHShow(true);
|
this.trainB && this.trainB.setHShow(true, parking);
|
||||||
} else {
|
} else {
|
||||||
this.trainB && this.trainB.setHShow(false);
|
this.trainB && this.trainB.setHShow(false, parking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +409,7 @@ export default class Train extends Group {
|
|||||||
}
|
}
|
||||||
this.setDoorStatus(model.doorCloseLock);
|
this.setDoorStatus(model.doorCloseLock);
|
||||||
this.setAlarmStatus(model.alarmStatus);
|
this.setAlarmStatus(model.alarmStatus);
|
||||||
this.setHoldStatus(model.hold);
|
this.setHoldStatus(model.hold, model.parking);
|
||||||
this.setJumpStatus(model.jump);
|
this.setJumpStatus(model.jump);
|
||||||
// this.setSoonerOrLater(model.dt);
|
// this.setSoonerOrLater(model.dt);
|
||||||
this.setTrainTypeColor(model.type);
|
this.setTrainTypeColor(model.type);
|
||||||
@ -421,10 +422,8 @@ export default class Train extends Group {
|
|||||||
if (store.state.map.picture == 'largePassengerView') {
|
if (store.state.map.picture == 'largePassengerView') {
|
||||||
this.handlePassagerColor(model.num);
|
this.handlePassagerColor(model.num);
|
||||||
}
|
}
|
||||||
if (style.Train.trainBody.trainBodyFaultFlashColor) {
|
// 西安二号线 列车停车状态 闪烁红色
|
||||||
// 西安二号线 列车停车状态 闪烁红色
|
this.updateTrainBodyFault(model.orderStop);
|
||||||
this.updateTrainBodyFault(model.orderStop);
|
|
||||||
}
|
|
||||||
if (!model.groundCommunicable) {
|
if (!model.groundCommunicable) {
|
||||||
this.trainL && this.trainL.setColor('#f00');
|
this.trainL && this.trainL.setColor('#f00');
|
||||||
this.trainR && this.trainR.setColor('#f00');
|
this.trainR && this.trainR.setColor('#f00');
|
||||||
@ -442,16 +441,9 @@ export default class Train extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateTrainBodyFault(orderStop) {
|
updateTrainBodyFault(orderStop) {
|
||||||
if (orderStop) {
|
// 西安二号线 列车停车状态 闪烁红色
|
||||||
// 西安二号线 列车停车状态 闪烁红色
|
if (this.style.Train.trainBody.trainBodyFaultFlashColor && orderStop && this.trainB) {
|
||||||
if (this.trainB) {
|
this.trainB.trainBodyFault();
|
||||||
this.trainB.trainBodyFault();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 西安二号线 列车取消停车状态
|
|
||||||
if (this.trainB) {
|
|
||||||
this.trainB.untrainBodyFault();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user