Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
dd7f4d2aeb
@ -144,8 +144,13 @@ class SkinCode extends defaultStyle {
|
||||
display: false // 列车实时位置显示
|
||||
},
|
||||
cross:{ // 岔心
|
||||
speedOffset:{
|
||||
x:0,
|
||||
y:50
|
||||
},
|
||||
centerSquare:{
|
||||
defaultColor:'#000'
|
||||
defaultColor:'#000',
|
||||
blockColor:'#00F'
|
||||
},
|
||||
crossSection:{
|
||||
fillColor:'#ff0',
|
||||
|
@ -141,9 +141,27 @@ export default class ELines extends Group {
|
||||
}
|
||||
});
|
||||
|
||||
this.crossSpeedText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 8,
|
||||
style: {
|
||||
x: result.x + style.Section.cross.speedOffset.x,
|
||||
y: result.y + style.Section.cross.speedOffset.y,
|
||||
fontWeight: style.Section.cross.text.fontWeight,
|
||||
fontSize: style.Section.cross.text.fontSize,
|
||||
fontFamily: style.Section.cross.text.fontFamily || style.fontFamily,
|
||||
text: '',
|
||||
textFill:style.Section.cross.text.fontColor,
|
||||
textAlign: style.Section.cross.text.textAlign,
|
||||
textPosition: style.Section.cross.text.textPosition,
|
||||
textVerticalAlign: style.Section.cross.text.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.crossSection);
|
||||
this.add(this.centerSquare);
|
||||
this.add(this.crossText);
|
||||
this.add(this.crossSpeedText);
|
||||
}
|
||||
|
||||
createLine() {
|
||||
@ -359,6 +377,16 @@ export default class ELines extends Group {
|
||||
this.crossSection && this.crossSection.setStyle({lineWidth:0, fill:this.model.style.Section.cross.crossSection.fillColor});
|
||||
}
|
||||
|
||||
setCrossBlock() {
|
||||
this.centerSquare && this.centerSquare.setStyle({fill:this.model.style.Section.cross.centerSquare.blockColor});
|
||||
}
|
||||
setCrossUnBlock() {
|
||||
this.centerSquare && this.centerSquare.setStyle({fill:this.model.style.Section.cross.centerSquare.defaultColor});
|
||||
}
|
||||
setCrossSpeedUpperLimit(speedLimit) {
|
||||
this.crossSpeedText && this.crossSpeedText.setStyle({text:speedLimit});
|
||||
}
|
||||
|
||||
setZleve(lev) {
|
||||
this.section && this.section.attr('z', lev);
|
||||
}
|
||||
|
@ -129,8 +129,6 @@ class EMouse extends Group {
|
||||
this.add(this.lineBorder);
|
||||
this.lineBorder.hide();
|
||||
}
|
||||
} else if (this.device.crossSection) {
|
||||
debugger;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,12 +86,14 @@ export default class Section extends Group {
|
||||
/** 设置区段恢复默认状态*/
|
||||
recover() {
|
||||
if (this.line) {
|
||||
this.line.setCrossUnBlock();
|
||||
this.line.stopAnimation(true);
|
||||
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
||||
this.line.setStyle({
|
||||
stroke: this.style.Section.line.spareColor,
|
||||
lineWidth: this.style.Section.line.width
|
||||
});
|
||||
this.line.setCrossSpeedUpperLimit('');
|
||||
}
|
||||
this.name && this.name.recover();
|
||||
this.speedLimit && this.speedLimit.hide();
|
||||
@ -180,6 +182,9 @@ export default class Section extends Group {
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
}
|
||||
if (this.style.Section.cross && this.model.type == '04') {
|
||||
this.line.setCrossBlock();
|
||||
}
|
||||
if (this.style.Section.block && this.style.Section.block.blockGlint && this.line) {
|
||||
this.line.animateStyle(true, [
|
||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
@ -252,6 +257,8 @@ export default class Section extends Group {
|
||||
this.speedLimit && this.speedLimit.show();
|
||||
this.speedLimitName && this.speedLimitName.show(speedUpLimit);
|
||||
}
|
||||
} else if (this.style.Section.cross && this.model.type == '04') {
|
||||
this.line.setCrossSpeedUpperLimit(speedUpLimit);
|
||||
} else {
|
||||
this.speedLimit && this.speedLimit.show();
|
||||
this.speedLimitName && this.speedLimitName.show(speedUpLimit);
|
||||
|
@ -29,7 +29,7 @@ class ESigPost extends Group {
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
points: verPoints
|
||||
},
|
||||
@ -44,7 +44,7 @@ class ESigPost extends Group {
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
points: verPoints
|
||||
},
|
||||
|
@ -431,6 +431,7 @@ class Signal extends Group {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
this.sigPost.setHorColor(this.style.Signal.post.openHorColor);
|
||||
}
|
||||
}
|
||||
// 列车进路
|
||||
|
@ -630,6 +630,10 @@ export default {
|
||||
}, 0);
|
||||
lengthFact += model.lengthFact;
|
||||
copySection.lengthFact = Number(lengthFact.toFixed(3)); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||
const logicSectionCodeList = copySection.logicSectionCodeList;
|
||||
const last = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCodeList[logicSectionCodeList.length - 1]));
|
||||
last.logicSectionEndOffset = copySection.lengthFact;
|
||||
models.push(last);
|
||||
if (copySection.lengthFact > 5) {
|
||||
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||
@ -648,6 +652,7 @@ export default {
|
||||
}
|
||||
});
|
||||
pointModel.forEach(item => {
|
||||
if (!item.parentCode || item.parentCode == model.parentCode) {
|
||||
const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x);
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) {
|
||||
if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
|
||||
@ -662,6 +667,7 @@ export default {
|
||||
}
|
||||
}
|
||||
models.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
if (!model.parentCode) {
|
||||
@ -707,7 +713,13 @@ export default {
|
||||
model.lengthFact = length.toFixed(3);
|
||||
}
|
||||
model.logicSectionStartOffset = startOffset;
|
||||
const lastData = Object.keys(sectionMap);
|
||||
const temp = lastData[lastData.length - 1];
|
||||
if (temp == startPoint) {
|
||||
model.logicSectionEndOffset = section.lengthFact;
|
||||
} else {
|
||||
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
|
||||
}
|
||||
!sectionMap[startPoint].deepFlag && models.push(model);
|
||||
startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000;
|
||||
startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y;
|
||||
|
@ -77,9 +77,9 @@ export default {
|
||||
height: 800,
|
||||
roadData: [],
|
||||
focus: false,
|
||||
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'],
|
||||
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail', 'signalBlockRouteSettable'],
|
||||
selectList: ['runMode'],
|
||||
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'],
|
||||
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail', 'signalBlockRouteSettable'],
|
||||
rangeList: ['noParkingSM', 'parkingSM'],
|
||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||
numberList: [],
|
||||
@ -106,7 +106,8 @@ export default {
|
||||
standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机',
|
||||
atsAutoHandleManualFrontTurnBack:'ATS是否自动处理人工设置的站前折返自动更新车次',
|
||||
doNotSetRouteWhenSectionOccupied: '当进路的区段占用时不排列进路',
|
||||
routeSettingNoFail:'进路办理不失败'
|
||||
routeSettingNoFail:'进路办理不失败',
|
||||
signalBlockRouteSettable:'信号封锁下进路是否可以办理'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user