调整道岔生成逻辑

This commit is contained in:
zyy 2020-09-11 10:28:55 +08:00
parent 9ca3612715
commit e5687c13dd
2 changed files with 39 additions and 43 deletions

View File

@ -2,10 +2,10 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -170,14 +170,12 @@ 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);
@ -191,14 +189,12 @@ 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);
@ -249,8 +245,8 @@ export default {
const sectionb = this.findSectionData(sectionLists, elem.sectionBCode);
const sectiona = this.findSectionData(sectionLists, elem.sectionACode);
const sectionc = this.findSectionData(sectionLists, elem.sectionCCode);
const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode);
if (!parentSectionModel) { //
// const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode);
// if (!parentSectionModel) { //
if (switchSectionList.indexOf(elem.code) == -1) {
let uid;
if (!elem['uid']) {
@ -282,12 +278,12 @@ export default {
}
});
}
} else {
parentSectionModel.relevanceSectionList.push(elem.sectionACode);
parentSectionModel.relevanceSectionList.push(elem.sectionBCode);
parentSectionModel.relevanceSectionList.push(elem.sectionCCode);
models.push(parentSectionModel);
}
// } else {
// parentSectionModel.relevanceSectionList.push(elem.sectionACode);
// parentSectionModel.relevanceSectionList.push(elem.sectionBCode);
// parentSectionModel.relevanceSectionList.push(elem.sectionCCode);
// models.push(parentSectionModel);
// }
sectiona.relSwitchCode = elem.code;
sectionb.relSwitchCode = elem.code;
sectionc.relSwitchCode = elem.code;