修改 道岔位置定位、反位 为pos字段
This commit is contained in:
parent
7d21d75ad0
commit
d541259695
@ -33,7 +33,6 @@ deviceState[deviceType.Switch] = {
|
||||
routeLock: 0, // 是否进路锁闭
|
||||
overlapLock: 0, // 是否进路延续保护锁闭
|
||||
pos:'N', // // 道岔位置定位、反位 N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
// reversePosition: 0, // 是否反位
|
||||
isCiConfirm: 0, // 是否进行联锁确认
|
||||
/** 定位状态*/
|
||||
// locateType: {
|
||||
|
@ -46,7 +46,6 @@ class Status {
|
||||
routeLock: device.routeLock, // 是否进路锁闭
|
||||
overlapLock: device.overlapLock, // 是否进路延续保护锁闭
|
||||
pos:device.pos, // 道岔位置定位、反位 N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
// reversePosition: device.pos == 'R', // 是否反位
|
||||
fault: device.fault /** 非故障*/
|
||||
};
|
||||
}
|
||||
|
@ -93,12 +93,12 @@ export default class EBadShunt extends Group {
|
||||
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && swch.pos != 'N' && swch.sectionCCode == model.code) {
|
||||
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.pos == 'N' && swch.sectionCCode == model.code) {
|
||||
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
@ -93,12 +93,12 @@ export default class ELimitLines extends Group {
|
||||
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && swch.pos != 'N' && swch.sectionCCode == model.code) {
|
||||
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.pos == 'N' && swch.sectionCCode == model.code) {
|
||||
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
@ -388,17 +388,18 @@ export default class Section extends Group {
|
||||
const sectionB = this.mapDevice[switchModel.sectionBCode];
|
||||
const sectionC = this.mapDevice[switchModel.sectionCCode];
|
||||
const sectionA = this.mapDevice[switchModel.sectionACode];
|
||||
if (switchModel && switchModel.normalPosition === 1) {
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
if (switchModel && switchModel.pos === 'N') {
|
||||
this.setSwitchSectionColor(sectionC, sectionB);// 定位
|
||||
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && switchModel.fault !== 'SPLIT') {
|
||||
} else if (switchModel && switchModel.pos == 'NO' && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && switchModel.fault !== 'SPLIT') {
|
||||
this.setSwitchSectionColor(sectionC, sectionB);// 反位转定位前
|
||||
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'normal' && (switchModel.fault === 'SPLIT' || switchModel.fault === 'NORMAL_SPLIT')) {
|
||||
} else if (switchModel && switchModel.pos == 'NO' && switchModel.instance && switchModel.instance.switchPosition === 'normal' && (switchModel.fault === 'SPLIT' || switchModel.fault === 'NORMAL_SPLIT')) {
|
||||
this.setSwitchSectionColor(sectionC, sectionB);// 定位变失表或定位失表
|
||||
} else if (switchModel && switchModel.reversePosition === 1) {
|
||||
} else if (switchModel && switchModel.pos === 'R') {
|
||||
this.setSwitchSectionColor(sectionB, sectionC); // 反位
|
||||
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'normal' && switchModel.fault !== 'SPLIT') {
|
||||
} else if (switchModel && switchModel.pos == 'NO' && switchModel.instance && switchModel.instance.switchPosition === 'normal' && switchModel.fault !== 'SPLIT') {
|
||||
this.setSwitchSectionColor(sectionB, sectionC); // 定位转反位前
|
||||
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && (switchModel.fault === 'SPLIT' || switchModel.fault === 'REVERSE_SPLIT')) {
|
||||
} else if (switchModel && switchModel.pos == 'NO' && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && (switchModel.fault === 'SPLIT' || switchModel.fault === 'REVERSE_SPLIT')) {
|
||||
this.setSwitchSectionColor(sectionB, sectionC);// 反位变失表后反位失表
|
||||
}
|
||||
if (this.style.Section.switchFault && switchModel.fault === 'SQUEEZE') {
|
||||
|
@ -77,22 +77,22 @@ class EMouse extends Group {
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
|
||||
if (this.device.style.Switch.mouseOverStyle.coreBackgroundColor) {
|
||||
this.device.shapeModelA.show();
|
||||
this.device.shapeModelB.show();
|
||||
this.device.shapeModelA.removeHover();
|
||||
this.device.shapeModelB.removeHover();
|
||||
this.device.shapeModelA.addHover({
|
||||
stroke: this.device.__over
|
||||
? this.device.style.Switch.mouseOverStyle.coreBackgroundColorOver
|
||||
: this.device.style.Switch.mouseOverStyle.coreBackgroundColor
|
||||
})
|
||||
this.device.shapeModelB.addHover({
|
||||
stroke: this.device.__over
|
||||
? this.device.style.Switch.mouseOverStyle.coreBackgroundColorOver
|
||||
: this.device.style.Switch.mouseOverStyle.coreBackgroundColor
|
||||
})
|
||||
}
|
||||
if (this.device.style.Switch.mouseOverStyle.coreBackgroundColor) {
|
||||
this.device.shapeModelA.show();
|
||||
this.device.shapeModelB.show();
|
||||
this.device.shapeModelA.removeHover();
|
||||
this.device.shapeModelB.removeHover();
|
||||
this.device.shapeModelA.addHover({
|
||||
stroke: this.device.__over
|
||||
? this.device.style.Switch.mouseOverStyle.coreBackgroundColorOver
|
||||
: this.device.style.Switch.mouseOverStyle.coreBackgroundColor
|
||||
});
|
||||
this.device.shapeModelB.addHover({
|
||||
stroke: this.device.__over
|
||||
? this.device.style.Switch.mouseOverStyle.coreBackgroundColorOver
|
||||
: this.device.style.Switch.mouseOverStyle.coreBackgroundColor
|
||||
});
|
||||
}
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
@ -102,33 +102,34 @@ class EMouse extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
mouseout(e) {
|
||||
if (!this.device.__down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
|
||||
if (this.device.style.Switch.mouseOverStyle.coreBackgroundColor) {
|
||||
this.device.shapeModelA.removeHover();
|
||||
this.device.shapeModelB.removeHover();
|
||||
if (this.device.model.normalPosition) {
|
||||
this.device.shapeModelA.hide();
|
||||
this.device.shapeModelB.show();
|
||||
} else {
|
||||
this.device.shapeModelA.show();
|
||||
this.device.shapeModelB.show();
|
||||
}
|
||||
}
|
||||
if (this.device.style.Switch.mouseOverStyle.coreBackgroundColor) {
|
||||
this.device.shapeModelA.removeHover();
|
||||
this.device.shapeModelB.removeHover();
|
||||
// if (this.device.model.normalPosition) {
|
||||
if (this.device.model.pos == 'N') {
|
||||
this.device.shapeModelA.hide();
|
||||
this.device.shapeModelB.show();
|
||||
} else {
|
||||
this.device.shapeModelA.show();
|
||||
this.device.shapeModelB.show();
|
||||
}
|
||||
}
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,15 +433,17 @@ export default class Switch extends Group {
|
||||
.when(1000, { stroke: this.style.backgroundColor })
|
||||
.start();
|
||||
}
|
||||
setSwitchFault(fault, normalPosition, reversePosition) {
|
||||
if (this.style.Switch.jointImg.faultStatus && fault && !reversePosition && !normalPosition ) { // 宁波线失表状态
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
setSwitchFault(fault, pos) {
|
||||
if (this.style.Switch.jointImg.faultStatus && fault && (pos == 'NO' || pos == 'EX') ) { // 宁波线失表状态
|
||||
this.setForkAction(); // 道岔挤岔
|
||||
} else if (this.style.Switch.faultNoHandle ) {
|
||||
this.shapeModelA.hide();
|
||||
this.shapeModelB.hide();
|
||||
this.shapeModelC.hide();
|
||||
} else {
|
||||
if (this.model.switchFaultCode && (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))) {
|
||||
// (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))
|
||||
if (this.model.switchFaultCode && (pos == 'NO' || pos == 'EX') ) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor('#F00', true);
|
||||
} else if (this.model.switchFaultCode) {
|
||||
@ -487,7 +489,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock(normalPosition, reversePosition) {
|
||||
setMonolock(pos) {
|
||||
if (this.style.Switch.rectLock &&
|
||||
this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
@ -503,9 +505,9 @@ export default class Switch extends Group {
|
||||
if (this.style.Switch.arcBlcok &&
|
||||
this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
if (normalPosition) {
|
||||
if (pos == 'N') {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor });
|
||||
} else if (reversePosition) {
|
||||
} else if (pos == 'R') {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.inversionColor });
|
||||
}
|
||||
}
|
||||
@ -513,7 +515,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
/** 封锁 */
|
||||
block(normalPosition, reversePosition) {
|
||||
block(pos) {
|
||||
if (this.style.Switch.jointImg.block) { // 宁波专用封锁显示
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.animateStyle(item => {
|
||||
@ -547,10 +549,10 @@ export default class Switch extends Group {
|
||||
this.setTextColor(this.style.Switch.text.blockText);
|
||||
}
|
||||
if (this.style.Switch.jointImg.trapezoidBlock) { // 范围且封锁时显示
|
||||
if (normalPosition) {
|
||||
if ( pos == 'N') {
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.setColor('#000080');
|
||||
} else if (reversePosition) {
|
||||
} else if ( pos == 'R') {
|
||||
this.shapeModelA.show();
|
||||
this.shapeModelA.setColor('#000080');
|
||||
}
|
||||
@ -600,11 +602,11 @@ export default class Switch extends Group {
|
||||
// 处理岔芯颜色
|
||||
setSectionState(state) {
|
||||
const sectionC = this.mapDevice[state.sectionCCode];
|
||||
if (sectionC && state.reversePosition && !state.blockade) {
|
||||
if (sectionC && state.pos == 'R' & !state.blockade) {
|
||||
this.setSwitchModelStatus(this.shapeModelA, sectionC);
|
||||
}
|
||||
const sectionA = this.mapDevice[state.sectionACode];
|
||||
if (sectionA && state.normalPosition && !this.style.Switch.core.graphShow && !state.blockade) {
|
||||
if (sectionA && state.pos == 'N' && !this.style.Switch.core.graphShow && !state.blockade) {
|
||||
this.setSwitchModelStatus(this.shapeModelB, sectionA);
|
||||
}
|
||||
}
|
||||
@ -650,23 +652,23 @@ export default class Switch extends Group {
|
||||
this.shapeModelC.setColor('#7F7F7F');
|
||||
this.name.getNameText().setStyle({textFill: '#7F7F7F'});
|
||||
}
|
||||
preReset(normalPosition, reversePosition ) {
|
||||
preReset(pos) {
|
||||
const coverBlock = this.style.Switch.coverBlock;
|
||||
if (coverBlock && coverBlock.preResetColor) { // 范围且封锁时显示
|
||||
if (normalPosition) {
|
||||
if (pos == 'N') {
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.setColor(coverBlock.preResetColor);
|
||||
} else if (reversePosition) {
|
||||
} else if (pos == 'R') {
|
||||
this.shapeModelA.show();
|
||||
this.shapeModelA.setColor(coverBlock.preResetColor);
|
||||
}
|
||||
} else {
|
||||
const sectionReset = this.style.Section.sectionMiddle;
|
||||
if (sectionReset && sectionReset.preResetColor) {
|
||||
if (normalPosition) {
|
||||
if (pos == 'N') {
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.setColor(sectionReset.preResetColor);
|
||||
} else if (reversePosition) {
|
||||
} else if (pos == 'R') {
|
||||
this.shapeModelA.show();
|
||||
this.shapeModelA.setColor(sectionReset.preResetColor);
|
||||
}
|
||||
@ -678,13 +680,13 @@ export default class Switch extends Group {
|
||||
this.recover();
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
if (model.normalPosition) {
|
||||
if (model.pos == 'N') {
|
||||
this.switchPosition = 'normal';
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
if (model.routeLock) {
|
||||
this.setSectionState(model);
|
||||
}
|
||||
} else if (model.reversePosition) {
|
||||
} else if (model.pos == 'R') {
|
||||
this.switchPosition = 'reverse';
|
||||
this.setInversionAction(model); /** 反位*/
|
||||
if (model.routeLock) {
|
||||
@ -694,23 +696,26 @@ export default class Switch extends Group {
|
||||
this.setAshShow();
|
||||
}
|
||||
} else {
|
||||
this.setSwitchFault(model.fault, model.normalPosition, model.reversePosition);
|
||||
if (model.normalPosition) {
|
||||
this.setSwitchFault(model.fault, model.pos);
|
||||
|
||||
// model.pos == 'NO' || model.pos == 'EX';
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
|
||||
if (model.pos == 'N') {
|
||||
this.switchPosition = 'normal';
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
} else if (model.reversePosition) {
|
||||
} else if (model.pos == 'R') {
|
||||
this.switchPosition = 'reverse';
|
||||
this.setInversionAction(model); /** 反位*/
|
||||
} else {
|
||||
} else if (model.pos == 'NO') {
|
||||
this.setLossAction(model.fault); // 失去
|
||||
if (model.switchSplit) {
|
||||
this.setForkAction();
|
||||
}
|
||||
} else if (model.pos == 'EX') {
|
||||
this.setForkAction(); // 挤岔
|
||||
}
|
||||
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
||||
|
||||
model.singleLock && this.setMonolock(model.normalPosition, model.reversePosition); // 道岔单锁
|
||||
model.blockade && this.block(model.normalPosition, model.reversePosition); // 道岔封锁
|
||||
model.singleLock && this.setMonolock(model.pos); // 道岔单锁
|
||||
model.blockade && this.block(model.pos); // 道岔封锁
|
||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||
const path = window.location.href;
|
||||
if (!path.includes('/map/draw')) {
|
||||
@ -720,7 +725,7 @@ export default class Switch extends Group {
|
||||
model.routeLock && this.handleRouteLock(); // 道岔进路锁闭
|
||||
model.overlapLock && this.handleOverlapLock(); // 道岔进路延续保护
|
||||
// this.interlockingReserved(); // 联锁预留道岔
|
||||
model.preReset && this.preReset(model.normalPosition, model.reversePosition); // 道岔预复位
|
||||
model.preReset && this.preReset(model.pos); // 道岔预复位
|
||||
|
||||
if (this.style.Switch.sectionAction.flag && this.model.showMode !== '05') { // 哈尔滨线路处理道岔相关区段颜色
|
||||
const switchModel = this.mapDevice[model.code];
|
||||
|
@ -173,14 +173,14 @@ export default {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Switch.locate.button.operation: {
|
||||
// 道岔总定
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
if (selectType.pos == 'R') {
|
||||
this.locate(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.reverse.button.operation: {
|
||||
// 道岔总反
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
if (selectType.pos == 'N') {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
break;
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Section') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
@ -193,19 +193,32 @@ export default {
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
debugger;
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Section.fault.button.operation: {
|
||||
// 事故解锁
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
this.locate(selectType);
|
||||
}
|
||||
debugger;
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Section.axlePreReset.button.operation: {
|
||||
// 计轴复零
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
debugger;
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -213,14 +213,14 @@ export default {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Switch.locate.button.operation: {
|
||||
// 道岔总定
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
if (selectType.pos == 'R') {
|
||||
this.locate(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.reverse.button.operation: {
|
||||
// 道岔总反
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
if (selectType.pos == 'N') {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
break;
|
||||
|
@ -33,7 +33,7 @@
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col v-show="showExpand" :span="showExpand? 18: 0">
|
||||
<map-visual ref="map" :mapData="mapData" :width="780" :height="600" />
|
||||
<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
@ -98,9 +98,9 @@ export default {
|
||||
title() {
|
||||
return '进路设置';
|
||||
},
|
||||
expandTitle() {
|
||||
return this.showExpand? '收起进路预览' : '展开进路预览'
|
||||
},
|
||||
expandTitle() {
|
||||
return this.showExpand ? '收起进路预览' : '展开进路预览';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
@ -124,7 +124,7 @@ export default {
|
||||
this.showExpand = !this.showExpand;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
@ -166,7 +166,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.row = null;
|
||||
this.restoreBeforeDevices();
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
@ -183,8 +183,8 @@ export default {
|
||||
|
||||
if (this.beforeSwitchList && this.beforeSwitchList.length) {
|
||||
this.beforeSwitchList.forEach(el => {
|
||||
el.normalPosition = false;
|
||||
el.reversePosition = false;
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
el.pos = 'NO';
|
||||
el.routeLock = false;
|
||||
});
|
||||
}
|
||||
@ -208,7 +208,7 @@ export default {
|
||||
const signalEnd = this.$refs.map.getDeviceByCode(row.endSignalCode);
|
||||
const diff = signalBegin.position.x - signalEnd.position.x;
|
||||
const code = diff > 0 ? row.endSignalCode : row.startSignalCode;
|
||||
const signal = diff > 0? signalEnd: signalBegin;
|
||||
const signal = diff > 0 ? signalEnd : signalBegin;
|
||||
const switchCodeList = [];
|
||||
|
||||
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
|
||||
@ -235,7 +235,8 @@ export default {
|
||||
const sectionA = this.$refs.map.getDeviceByCode(swch.sectionACode);
|
||||
const sectionB = this.$refs.map.getDeviceByCode(swch.sectionBCode);
|
||||
const sectionC = this.$refs.map.getDeviceByCode(swch.sectionCCode);
|
||||
containSwitchList.push({code: el.switchCode, routeLock: true, normalPosition: el.normal, reversePosition: !el.normal});
|
||||
// normalPosition: el.normal, reversePosition: !el.normal
|
||||
containSwitchList.push({code: el.switchCode, routeLock: true, pos:el.pos });
|
||||
if (el.normal) {
|
||||
containSectionList.push({code: sectionA.code, routeLock:true });
|
||||
containSectionList.push({code: sectionC.code, preBlue: true });
|
||||
|
@ -36,8 +36,8 @@
|
||||
</div>
|
||||
<div class="radio-box-title">设置位置</div>
|
||||
<div class="radio-box">
|
||||
<el-radio v-model="position" label="normal" :disabled="!!(selectedSwitch.normalPosition || selectedSwitch.auto)" style="display: block;margin-bottom: 10px;">定位</el-radio>
|
||||
<el-radio v-model="position" label="reserve" :disabled="!!(selectedSwitch.reversePosition || selectedSwitch.auto)" style="display: block;">反位</el-radio>
|
||||
<el-radio v-model="position" label="normal" :disabled="!!(selectedSwitch.pos=='N' || selectedSwitch.auto)" style="display: block;margin-bottom: 10px;">定位</el-radio>
|
||||
<el-radio v-model="position" label="reserve" :disabled="!!(selectedSwitch.pos=='R' || selectedSwitch.auto)" style="display: block;">反位</el-radio>
|
||||
</div>
|
||||
<div class="radio-box-title">设置预留</div>
|
||||
<div class="radio-box">
|
||||
@ -208,9 +208,10 @@ export default {
|
||||
},
|
||||
getSwitchPosition(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (elem.normalPosition) {
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
if (elem.pos == 'N') {
|
||||
return '定位';
|
||||
} else if (elem.reversePosition) {
|
||||
} else if (elem.pos == 'R') {
|
||||
return '反位';
|
||||
} else {
|
||||
return '';
|
||||
|
@ -109,9 +109,10 @@ export default {
|
||||
},
|
||||
getSwitchPosition(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (elem.normalPosition) {
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
if (elem.pos == 'N') {
|
||||
return '定位';
|
||||
} else if (elem.reversePosition) {
|
||||
} else if (elem.pos == 'R') {
|
||||
return '反位';
|
||||
} else {
|
||||
return '';
|
||||
|
@ -7,24 +7,16 @@ export default function parseStatus(deviceStatus) {
|
||||
elem.deviceType = deviceType.Switch;
|
||||
switch (msg[1]) {
|
||||
case 0:
|
||||
elem.normalPosition = 0;
|
||||
elem.reversePosition = 0;
|
||||
elem.switchSplit = 0;
|
||||
elem.pos = 'NO'; // 失表
|
||||
break;
|
||||
case 1:
|
||||
elem.normalPosition = 1;
|
||||
elem.reversePosition = 0;
|
||||
elem.switchSplit = 0;
|
||||
elem.pos = 'N'; // 定位
|
||||
break;
|
||||
case 2:
|
||||
elem.normalPosition = 0;
|
||||
elem.reversePosition = 1;
|
||||
elem.switchSplit = 0;
|
||||
elem.pos = 'R'; // 反位
|
||||
break;
|
||||
case 4:
|
||||
elem.normalPosition = 0;
|
||||
elem.reversePosition = 0;
|
||||
elem.switchSplit = 1;
|
||||
elem.pos = 'EX'; // 挤岔
|
||||
break;
|
||||
}
|
||||
elem.blockade = msg[2];
|
||||
|
@ -77,7 +77,8 @@ export default {
|
||||
x: skew.x,
|
||||
y: skew.y
|
||||
},
|
||||
normalPosition: 1 // 默认状态定位
|
||||
pos: 'N' // 默认状态定位
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
};
|
||||
const model = Object.assign(switchModel, data);
|
||||
const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode);
|
||||
@ -135,7 +136,8 @@ export default {
|
||||
x: skew.x,
|
||||
y: skew.y
|
||||
},
|
||||
normalPosition: 1 // 默认状态定位
|
||||
pos: 'N' // 默认状态定位
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
};
|
||||
const model = Object.assign(switchModel, data);
|
||||
const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode);
|
||||
|
Loading…
Reference in New Issue
Block a user