修改代码
This commit is contained in:
parent
ecc5329924
commit
c89f2dec49
@ -76,7 +76,7 @@ deviceState[deviceType.Switch] = {
|
||||
deviceState[deviceType.Signal] = {
|
||||
/** 进路性质类型 */
|
||||
natureType: {
|
||||
Default: '01', /** 列车进路(缺省值)*/
|
||||
Default: '00', /** 无状态(缺省值)*/
|
||||
State01: '01', /** 列车进路 */
|
||||
State02: '02', /** 调车进路 */
|
||||
State03: '03' /** 折返进路 */
|
||||
|
@ -131,10 +131,7 @@ fuzhouSkin[deviceType.Signal] = {
|
||||
signalLampStandardWidth: 1,
|
||||
|
||||
/** 设备距离区段的距离*/
|
||||
signalDistance: 12,
|
||||
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08',
|
||||
signalDistance: 13,
|
||||
|
||||
/** 信号灯按钮边线*/
|
||||
signalButtonDashColor: '#C0C0C0', // '#C0C0C0'
|
||||
@ -152,22 +149,25 @@ fuzhouSkin[deviceType.Signal] = {
|
||||
signalTextGreen: '#00FF00',
|
||||
|
||||
/** 信号灯灯柱颜色*/
|
||||
signalLampStandardColor: '#3149C3',
|
||||
signalLampStandardColor: '#606060',
|
||||
|
||||
/** 信号灯灰色*/
|
||||
signalLampGrayColor: '#51545D',
|
||||
signalLampGrayColor: '#7F7F7F',
|
||||
|
||||
/** 信号灯绿色*/
|
||||
signalLampGreenColor: '#4DD43F',
|
||||
signalLampGreenColor: '#00FF00',
|
||||
|
||||
/** 信号灯黄色*/
|
||||
signalLampYellowColor: '#E4EF50',
|
||||
signalLampYellowColor: '#FFFF00',
|
||||
|
||||
/** 信号灯白色*/
|
||||
signalLampWhiteColor: '#FFFFFF',
|
||||
|
||||
/** 信号灯蓝色*/
|
||||
signalLampBlueColor: '#3E44BE'
|
||||
signalLampBlueColor: '#0000FF',
|
||||
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08'
|
||||
};
|
||||
|
||||
fuzhouSkin[deviceType.Switch] = {
|
||||
@ -181,7 +181,7 @@ fuzhouSkin[deviceType.Switch] = {
|
||||
transparentColor: 'rgba(0,0,0,0)',
|
||||
|
||||
/** 默认字体 大小*/
|
||||
textFontSize: 8.2,
|
||||
textFontSize: 9,
|
||||
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: 'consolas',
|
||||
@ -195,6 +195,9 @@ fuzhouSkin[deviceType.Switch] = {
|
||||
/** 默认名称和设备的距离*/
|
||||
nameDistance: 2,
|
||||
|
||||
/** 区段宽超出宽度*/
|
||||
sectionBeyondWidth: 0,
|
||||
|
||||
/** 区段 宽度*/
|
||||
sectionWidth: 4.4,
|
||||
|
||||
|
@ -941,7 +941,6 @@ export default class Signal extends Group {
|
||||
|
||||
setState(state) {
|
||||
this.recover();
|
||||
|
||||
/** 设置状态 (点灯类型)*/
|
||||
switch (state.status) {
|
||||
case '01': this.close(); break; // 关闭
|
||||
|
@ -33,9 +33,9 @@ export default class Switch extends Group {
|
||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||
this.createSwitch();
|
||||
this.createNameText();
|
||||
// this.craeteSwitchBorder();
|
||||
this.craeteSwitchBorder();
|
||||
this.setState(state);
|
||||
// this.mouseStateRecover();
|
||||
this.mouseStateRecover();
|
||||
}
|
||||
|
||||
/** 道岔实体,不显示,响应鼠标事件*/
|
||||
@ -44,7 +44,7 @@ export default class Switch extends Group {
|
||||
const style = this.style;
|
||||
|
||||
var halfWidth = style.sectionWidth / 2; // 一般宽度
|
||||
var switchWidth = style.sectionWidth + style.sectionBeyondWidth + style.sectionBeyondWidth + 0.8; // 道岔宽度, 增大遮挡宽度0.8
|
||||
var switchWidth = style.sectionWidth + style.sectionBeyondWidth*2 + 0.8; // 道岔宽度, 增大遮挡宽度0.8
|
||||
var swPadding = style.switchLen; // 定位和反位时区段距离岔芯的距离
|
||||
var directx = this.triangle.drictx;
|
||||
var directy = this.triangle.dricty;
|
||||
@ -358,7 +358,7 @@ export default class Switch extends Group {
|
||||
this.releaseBackground.hide();
|
||||
|
||||
this.setHasTextBorder(0);
|
||||
switch (this.model.locateType) {
|
||||
switch (this.state.locateType) {
|
||||
case '01': // 定位
|
||||
this.setTextColor(this.style.switchLocateTextColor);
|
||||
break;
|
||||
@ -445,7 +445,7 @@ export default class Switch extends Group {
|
||||
case '01': // 定位
|
||||
// this.release.show();
|
||||
this.releaseBackground.hide();
|
||||
this.setSectionstate(this.release, 'stroke', this.model.sectionAstatus);
|
||||
this.setSectionState(this.release, 'stroke', this.model.sectionAstatus);
|
||||
// this.release.animateStyle(true)
|
||||
// .when(1000, { stroke: this.style.backgroundColor })
|
||||
// .start();
|
||||
@ -458,59 +458,59 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
setSectionstate(section, style, state) {
|
||||
setSectionState(section, style, state) {
|
||||
if (section) {
|
||||
switch (state) {
|
||||
case '00': break;
|
||||
case '01': /** 空闲*/
|
||||
case '01': /** 空闲*/
|
||||
section.setStyle(style, this.style.sectionSpareColor);
|
||||
break;
|
||||
case '02': /** 通信车占用*/
|
||||
case '02': /** 通信车占用*/
|
||||
section.setStyle(style, this.style.sectionCommunicationOccupiedColor);
|
||||
break;
|
||||
case '03': /** 非通信车占用*/
|
||||
case '03': /** 非通信车占用*/
|
||||
section.setStyle(style, this.style.sectionUnCommunicationOccupiedColor);
|
||||
break;
|
||||
case '04': /** 进路锁闭*/
|
||||
case '04': /** 进路锁闭*/
|
||||
section.setStyle(style, this.style.sectionRouteLockColor);
|
||||
break;
|
||||
case '05': /** 故障锁闭*/
|
||||
case '05': /** 故障锁闭*/
|
||||
section.setStyle(style, this.style.sectionFaultLockColor);
|
||||
break;
|
||||
case '06': /** 封锁*/
|
||||
case '06': /** 封锁*/
|
||||
section.setStyle(style, this.style.sectionBlockColor);
|
||||
break;
|
||||
case '07': /** ATC切除*/
|
||||
case '07': /** ATC切除*/
|
||||
section.setStyle(style, this.style.sectionAtcExcisionColor);
|
||||
break;
|
||||
case '08': /** ATS切除*/
|
||||
case '08': /** ATS切除*/
|
||||
section.setStyle(style, this.style.sectionAtsExcisionColor);
|
||||
section.animateStyle(true)
|
||||
.when(1000, { fill: this.style.backgroundColor })
|
||||
.when(2000, { fill: this.style.sectionAtsExcisionColor })
|
||||
.start();
|
||||
break;
|
||||
case '09': /** 进路延续保护 */
|
||||
case '09': /** 进路延续保护 */
|
||||
section.setStyle(style, this.style.sectionProtectiveLockColor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLocateType(model) {
|
||||
this.setSectionstate(this.reserveSection, 'fill', model.sectionCstatus);
|
||||
switch (model.locateType) {
|
||||
setLocateType(state) {
|
||||
this.setSectionState(this.reserveSection, 'fill', this.model.sectionCstatus);
|
||||
switch (state.locateType) {
|
||||
case '01':
|
||||
this.setLocationAction(); /** 定位*/
|
||||
this.setLocationAction(); /** 定位*/
|
||||
break;
|
||||
case '02':
|
||||
this.setInversionAction(); /** 反位*/
|
||||
this.setInversionAction(); /** 反位*/
|
||||
break;
|
||||
case '03':
|
||||
this.setLossAction(true); /** 失去*/
|
||||
this.setLossAction(true); /** 失去*/
|
||||
break;
|
||||
case '04':
|
||||
this.setForkAction(); /** 挤岔*/
|
||||
this.setForkAction(); /** 挤岔*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -519,16 +519,16 @@ export default class Switch extends Group {
|
||||
this.setLocateType(state);
|
||||
switch (state.status) {
|
||||
case '01':
|
||||
this.spare(); /** 空闲*/
|
||||
this.spare(); /** 空闲*/
|
||||
break;
|
||||
case '10':
|
||||
this.setMonolock(); /** 单锁*/
|
||||
this.setMonolock(); /** 单锁*/
|
||||
break;
|
||||
case '13':
|
||||
this.timeRelease(); /** 延时释放*/
|
||||
this.timeRelease(); /** 延时释放*/
|
||||
break;
|
||||
case '14':
|
||||
this.block(); /** 封锁*/
|
||||
this.block(); /** 封锁*/
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import deviceType from '../config/deviceType';
|
||||
import Link from './Link';
|
||||
import Section from './section';
|
||||
import Section from './Section';
|
||||
import Signal from './Signal';
|
||||
import Switch from './Switch';
|
||||
|
||||
|
@ -441,7 +441,7 @@ export default class Section extends Group {
|
||||
this.setState(state);
|
||||
}
|
||||
|
||||
// this.mouseStateRecover();
|
||||
this.mouseStateRecover();
|
||||
}
|
||||
|
||||
/** 创建区段*/
|
||||
|
Loading…
Reference in New Issue
Block a user