道岔颜色根据正反位显示 && 道岔和区段增加overlap状态显示
This commit is contained in:
parent
a3c264312d
commit
14bd3b7b65
@ -104,6 +104,8 @@ export class LogicSection extends JlGraphic implements ILineGraphic {
|
|||||||
lineColor = SectionConsts.failLockedColor;
|
lineColor = SectionConsts.failLockedColor;
|
||||||
} else if (this.states.blocked) {
|
} else if (this.states.blocked) {
|
||||||
lineColor = SectionConsts.blockedColor;
|
lineColor = SectionConsts.blockedColor;
|
||||||
|
} else if (this.states.overlap) {
|
||||||
|
lineColor = SectionConsts.overlapColor;
|
||||||
}
|
}
|
||||||
if (this.states.cut) {
|
if (this.states.cut) {
|
||||||
this.bindFlashAnimation(this.lineGraphic);
|
this.bindFlashAnimation(this.lineGraphic);
|
||||||
|
@ -59,6 +59,7 @@ export const SectionConsts = {
|
|||||||
lockedColor: '#fff', //锁闭
|
lockedColor: '#fff', //锁闭
|
||||||
failLockedColor: '#954', //故障锁闭
|
failLockedColor: '#954', //故障锁闭
|
||||||
blockedColor: '#606', //封锁
|
blockedColor: '#606', //封锁
|
||||||
|
overlapColor: '#ff0', //overlap
|
||||||
lineWidth: 5,
|
lineWidth: 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ export const TurnoutConsts = {
|
|||||||
cbtcOccupiedColor: '#f49', //通信车占用
|
cbtcOccupiedColor: '#f49', //通信车占用
|
||||||
lockedColor: '#fff', //锁闭
|
lockedColor: '#fff', //锁闭
|
||||||
failLockedColor: '#954', //故障锁闭
|
failLockedColor: '#954', //故障锁闭
|
||||||
|
overlapColor: '#ff0', //overlap
|
||||||
lineWidth: 5,
|
lineWidth: 5,
|
||||||
forkLenth: 20,
|
forkLenth: 20,
|
||||||
labelFontSize: 12,
|
labelFontSize: 12,
|
||||||
@ -114,21 +115,28 @@ export class TurnoutSection extends Graphics {
|
|||||||
|
|
||||||
paint() {
|
paint() {
|
||||||
let pList: IPointData[] = [];
|
let pList: IPointData[] = [];
|
||||||
|
let lineColor = this.turnout.lineColor;
|
||||||
switch (this.port) {
|
switch (this.port) {
|
||||||
case TurnoutPort.A:
|
case TurnoutPort.A:
|
||||||
pList = this.turnout.datas.pointA;
|
pList = this.turnout.datas.pointA;
|
||||||
break;
|
break;
|
||||||
case TurnoutPort.B:
|
case TurnoutPort.B:
|
||||||
pList = this.turnout.datas.pointB;
|
pList = this.turnout.datas.pointB;
|
||||||
|
if (!this.turnout.states.ipSingleSwitchStusNormal) {
|
||||||
|
lineColor = TurnoutConsts.idleColor;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TurnoutPort.C:
|
case TurnoutPort.C:
|
||||||
pList = this.turnout.datas.pointC;
|
pList = this.turnout.datas.pointC;
|
||||||
|
if (!this.turnout.states.ipSingleSwitchStusReverse) {
|
||||||
|
lineColor = TurnoutConsts.idleColor;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const gap = this.port === TurnoutPort.A ? 0 : TurnoutConsts.forkLenth;
|
const gap = this.port === TurnoutPort.A ? 0 : TurnoutConsts.forkLenth;
|
||||||
const start = getForkPoint(gap, pList[0]);
|
const start = getForkPoint(gap, pList[0]);
|
||||||
this.clear()
|
this.clear()
|
||||||
.lineStyle(TurnoutConsts.lineWidth, this.turnout.lineColor)
|
.lineStyle(TurnoutConsts.lineWidth, lineColor)
|
||||||
.moveTo(start.x, start.y);
|
.moveTo(start.x, start.y);
|
||||||
|
|
||||||
pList.forEach((p) => {
|
pList.forEach((p) => {
|
||||||
@ -295,6 +303,8 @@ export class Turnout extends JlGraphic {
|
|||||||
this.lineColor = TurnoutConsts.lockedColor;
|
this.lineColor = TurnoutConsts.lockedColor;
|
||||||
} else if (this.states.ipSingleSwitchStusFailLocked) {
|
} else if (this.states.ipSingleSwitchStusFailLocked) {
|
||||||
this.lineColor = TurnoutConsts.failLockedColor;
|
this.lineColor = TurnoutConsts.failLockedColor;
|
||||||
|
} else if (this.states.ipSingleSwitchStusOverlap) {
|
||||||
|
this.lineColor = TurnoutConsts.overlapColor;
|
||||||
} else {
|
} else {
|
||||||
this.lineColor = TurnoutConsts.idleColor;
|
this.lineColor = TurnoutConsts.idleColor;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user