车务终端分散自律亮灯&占线板默认选中

This commit is contained in:
fan 2022-07-18 15:01:35 +08:00
parent 2011f1838c
commit 46ab43aef3
4 changed files with 208 additions and 206 deletions

View File

@ -395,8 +395,8 @@ class SkinCode extends defaultStyle {
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
strokeColor: '#fff',
lineWidth: 1
},
emergencyControl: { // 紧急站控
show: false,
@ -427,81 +427,81 @@ class SkinCode extends defaultStyle {
arrowShow: false,
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc',
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
defaultColor: '#ccc'
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
}
};
@ -853,8 +853,8 @@ class SkinCode extends defaultStyle {
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber'
},
@ -879,21 +879,21 @@ class SkinCode extends defaultStyle {
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'DDD', // 默认目的地码
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
defaultServiceNumber: 'TTT', // 默认服务号(表号)
defaultServerNoColor: '#F00', // 默认服务号状态显示颜色
fontColor: '#F00',
fontColor: '#F00',
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '', // 车次号前缀
// defaultTripNumber: 'DDD', // 默认车次号2
defaultTripNumber: ' ', // 默认车次号
defaultTripNumber: ' ', // 默认车次号
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
@ -905,13 +905,13 @@ class SkinCode extends defaultStyle {
trainHead: {
trainConntWidth: 10, // 列车竖杠的宽度
trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectHeight: 20, // 列车车头矩形高度
directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
trainHeadArrowWidth: 15, // 列车车头三角宽度
trainHeadArrowOffsetX: 0, // 列车车头三角偏移
trainHeadRectOffsetX: 10
trainHeadRectOffsetX: 10
},
common: {
trainHeight: 20, // 列车高度
@ -961,16 +961,16 @@ class SkinCode extends defaultStyle {
{
type: 1,
lineLShow: true,
arrowLShow: false,
arrowLShow: false,
lineRShow: false,
arrowRShow: true
arrowRShow: true
},
{
type: 0,
lineLShow: false,
arrowLShow: true,
arrowLShow: true,
lineRShow: true,
arrowRShow: false
arrowRShow: false
}
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
driveModeStatus: [
@ -1018,125 +1018,125 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.DepartArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#00ff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.PickArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#ffff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff',
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000',
}
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff'
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000'
}
};
}
}

View File

@ -103,10 +103,10 @@ export default class EThreeLamp extends Group {
this.add(this.text);
}
setColor(color) {
// if (color) {
// this.control.setStyle('fill', color);
// }
setColor(color, index) {
if (color && this['control' + index]) {
this['control' + index].setStyle('fill', color);
}
}
setTextColor(color) {

View File

@ -753,6 +753,7 @@ export default class Station extends Group {
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor});
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.lightColor);
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3);
// if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题
@ -825,6 +826,7 @@ export default class Station extends Group {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3);
if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);

View File

@ -465,9 +465,9 @@ export default {
doShow() {
this.dialogVisible = true;
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
if (this.showStationList[0]) {
this.selectStandCode(this.showStationList[0].code);
this.selectStandCode1(this.showStationList[0].code);
if (this.showStationList && this.showStationList.length) {
this.selectStandCode(this.$store.state.map.showCentralizedStationCode);
this.selectStandCode1(this.$store.state.map.showCentralizedStationCode);
}
},
selectStandCode(code) {