调整道岔生成 道岔区段问题

This commit is contained in:
zyy 2020-09-11 10:18:07 +08:00
parent e8a007cfba
commit 50c9a4eabb
3 changed files with 9 additions and 3 deletions

View File

@ -270,6 +270,7 @@ class Jlmap {
// }
if (this.mapDevice[code]) {
this.$painter.delete(this.mapDevice[code]);
delete this.mapDevice[code];
}
if (!elem._dispose) {
this.mapDevice[code] = deepAssign(this.mapDevice[code] || {}, oDevice);

View File

@ -516,8 +516,8 @@ export default class Switch extends Group {
model.singleLock && this.setMonolock(); // 道岔单锁
model.blockade && this.block(); // 道岔封锁
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
if (!this.style.Switch.core.graphShow) {
const path = window.location.href;
if (!this.style.Switch.core.graphShow && !path.includes('/map/draw')) {
this.setSectionState(this.sheltertriangle, this.model); // 处理岔芯颜色
}
// this.interlockingReserved(); // 联锁预留道岔

View File

@ -153,7 +153,8 @@ export default {
}
return rtn;
},
changeSectionAttr() { //
//
changeSectionAttr() {
const changeSectionList = []; //
this.sectionList.forEach(section => {
const oneSection = section.points[section.points.length - 1];
@ -169,12 +170,14 @@ export default {
if (!this.checkAddListA(oneSection, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.rightSectionCode = '';
sectionModel.parentCode = '';
sectionModel.sepTypeRight = '00'; //
sectionModel.type = '03';
const list = this.findSectionA(sectionModel.points[sectionModel.points.length - 1].x, sectionModel.points[sectionModel.points.length - 1].y);
list.forEach(elem => {
const sectionModel = deepAssign({}, elem);
sectionModel.leftSectionCode = '';
sectionModel.parentCode = '';
sectionModel.sepTypeLeft = '00';
sectionModel.type = '03';
changeSectionList.push(sectionModel);
@ -188,12 +191,14 @@ export default {
if (!this.checkAddListB(oneSectionStar, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.leftSectionCode = '';
sectionModel.parentCode = '';
sectionModel.sepTypeLeft = '00';
sectionModel.type = '03';
const list = this.findSectionB(sectionModel.points[0].x, sectionModel.points[0].y);
list.forEach(elem => {
const sectionModel = deepAssign({}, elem);
sectionModel.rightSectionCode = '';
sectionModel.parentCode = '';
sectionModel.sepTypeRight = '00'; //
sectionModel.type = '03';
changeSectionList.push(sectionModel);