调整西安二号线道岔状态显示
This commit is contained in:
parent
87ca3e5556
commit
6cb2939631
@ -416,10 +416,14 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
offset: {x: 5, y: 6}, // 道岔名称与区段距离
|
||||
rectBorderColor: 'rgba(0,0,0,0)', // 矩形单锁边框颜色
|
||||
rectBorderFillColor: 'rgba(0,0,225,0.7)', // 封锁单锁填充颜色
|
||||
monolock: true, // 单锁显示
|
||||
block: true, // 封锁显示
|
||||
blockColor: 'red' // 封锁颜色
|
||||
blockColor: 'rgba(0,0,0,0)', // 封锁描边颜色
|
||||
blockFillColor: 'rgba(192,192,192,0.7)', // 封锁填充颜色
|
||||
blockMonolockFillColor: 'rgba(0,225,225,0.7)' // 封锁&单锁填充颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2,20 +2,20 @@ import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
/** 名称元素*/
|
||||
export default function ELockRect(model) {
|
||||
const TextName = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height: model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
const TextName = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height: model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
}
|
||||
|
@ -164,12 +164,19 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
createLockRect() {
|
||||
const offsetX = this.model.locateType == '01' ? 3 : 0;
|
||||
let offsetX = this.model.locateType == '01' ? 3 : 0;
|
||||
let offsetY = 0;
|
||||
if (this.style.Switch.rectLock.offset) {
|
||||
const directx = this.triangle.drictx;
|
||||
const directy = this.triangle.dricty;
|
||||
offsetX = directx * this.style.Switch.rectLock.offset.x;
|
||||
offsetY = directy * this.style.Switch.rectLock.offset.y;
|
||||
}
|
||||
this.lockRect = new ELockRect({ // 锁定矩形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2,
|
||||
y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2 + offsetY,
|
||||
width: this.style.Switch.rectLock.rectWidth,
|
||||
lineWidth: 1.8,
|
||||
stroke: this.style.Switch.rectLock.rectBorderColor,
|
||||
@ -178,7 +185,7 @@ export default class Switch extends Group {
|
||||
this.add(this.lockRect);
|
||||
this.lockRect.hide();
|
||||
if (this.style.Switch.arcBlcok) {
|
||||
this.lockArc = new ELockArc({ // 锁定矩形
|
||||
this.lockArc = new ELockArc({ // 锁定矩形 圆形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x,
|
||||
@ -227,13 +234,12 @@ export default class Switch extends Group {
|
||||
this.lockRect.hide(); // 矩形包围框
|
||||
this.lockArc.hide(); // 圆形单锁框
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.sheltertriangle.hide(); // 直角梯形覆盖图形 隐藏
|
||||
// this.sheltertriangle.stopAnimation(false);
|
||||
this.sheltertriangle.hide(); // 直角梯形覆盖图形
|
||||
this.rhomboid.stopAnimation(false);
|
||||
this.releaseBackground.hide();
|
||||
this.setHasTextBorder(0);
|
||||
this.locShelter.hide(); // 定位覆盖图形 隐藏
|
||||
this.relocShelter.hide(); // 反位覆盖图形 隐藏
|
||||
this.locShelter.hide(); // 定位覆盖图形
|
||||
this.relocShelter.hide(); // 反位覆盖图形
|
||||
}
|
||||
|
||||
/** 定位*/
|
||||
@ -311,6 +317,9 @@ export default class Switch extends Group {
|
||||
setMonolock() {
|
||||
if (this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
if (this.style.Switch.rectLock.rectBorderFillColor) {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.rectBorderColor, fill: this.style.Switch.rectLock.rectBorderFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
this.setHasTextBorder(1);
|
||||
@ -363,6 +372,17 @@ export default class Switch extends Group {
|
||||
if (this.style.Switch.rectLock.block) {
|
||||
this.lockRect.show();
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor });
|
||||
if (this.style.Switch.rectLock.blockFillColor) {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
}
|
||||
blockMonolock() {
|
||||
if (this.style.Switch.rectLock.block && this.style.Switch.rectLock.monolock) {
|
||||
if (this.style.Switch.rectLock.blockFillColor && this.style.Switch.rectLock.rectBorderFillColor) {
|
||||
this.lockRect.show();
|
||||
this.lockRect.setStyle({ stroke: 'rgba(0,0,0,0)', fill: this.style.Switch.rectLock.blockMonolockFillColor });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,6 +457,7 @@ export default class Switch extends Group {
|
||||
model.singleLock && this.setMonolock();
|
||||
/** 道岔封锁 */
|
||||
model.blockade && this.block();
|
||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||
/** 区段切除*/
|
||||
// this.setForkAction(); // 道岔挤岔完成
|
||||
model.cutOff && this.setSwitchCutOff();
|
||||
|
@ -2,9 +2,9 @@ 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.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
|
Loading…
Reference in New Issue
Block a user