调整宁波线路 道岔 封锁 单锁状态
This commit is contained in:
parent
f96c8a11ef
commit
41100ac9bf
@ -408,16 +408,18 @@ class SkinCode extends defaultStyle {
|
||||
length: 10 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色)
|
||||
inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色)
|
||||
locationColor: 'lightgreen', // 道岔单锁'定位'颜色 (红色)
|
||||
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (红色)
|
||||
rectShow: false, // 道岔单锁 矩形框是否显示
|
||||
arcShow: true, // 道岔单锁 圆形显示
|
||||
arcBorderColor: 'green', // 圆形单锁框边框颜色
|
||||
locationArcColor: 'green', // 圆形单锁框边框颜色 定位
|
||||
inversionArcColor: '#FFFF00', // 圆形单锁框边框颜色 反位
|
||||
rectWidth: 22, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'ningbo_01', // 默认道岔封锁类型
|
||||
flashingColors: '#D600D5', // 闪烁显示颜色
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
|
@ -2,19 +2,19 @@ import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
/** 名称元素*/
|
||||
export default function ELockRect(model) {
|
||||
const TextName = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
const TextName = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
}
|
||||
|
@ -317,6 +317,8 @@ export default class Switch extends Group {
|
||||
}
|
||||
if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.monolock.locationArcColor });
|
||||
!this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.monolock.inversionArcColor });
|
||||
}
|
||||
if (this.model.normalPosition) {
|
||||
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
|
||||
@ -327,6 +329,33 @@ export default class Switch extends Group {
|
||||
|
||||
/** 封锁 */
|
||||
block() {
|
||||
if (this.style.Switch.block.blockName == 'ningbo_01') {
|
||||
this.recover();
|
||||
this.relocShelter.show();
|
||||
this.relocShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.block.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.sheltertriangle.show(); // 宁波线路挤叉特殊显示
|
||||
this.sheltertriangle.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.block.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.locShelter.show();
|
||||
this.locShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.block.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
}
|
||||
if (this.style.Switch.block.nameBorderShow) {
|
||||
this.setHasTextBorder(1);
|
||||
} else if (this.style.Switch.block.contentRectShow) {
|
||||
@ -397,6 +426,8 @@ export default class Switch extends Group {
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
// model.normalPosition = 0;
|
||||
// model.reversePosition = 1;
|
||||
if (model.normalPosition) {
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
} else if (model.reversePosition) {
|
||||
|
@ -396,7 +396,7 @@ export default {
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$refs.protect.hover('');
|
||||
this.$refs.hostile.setField(field);
|
||||
this.$refs.hostile.setField(this.field);
|
||||
},
|
||||
clearHover() {
|
||||
this.field = '';
|
||||
|
@ -254,7 +254,6 @@ export default {
|
||||
watch: {
|
||||
mapInfo(val) {
|
||||
if (val) {
|
||||
console.log(val);
|
||||
this.addModel.mapId = val.id;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user