岔芯添加parentCode

This commit is contained in:
fan 2021-03-10 18:14:12 +08:00
parent b05ab63bc6
commit 605d60b06c
2 changed files with 12 additions and 4 deletions

View File

@ -1028,7 +1028,6 @@ const map = {
dict[model.code] = model;
}
});
const list = Object.values(dict);
if (window.location.href.includes('/design/usermap/map/draw')) { handleOperation(state, list); }
commit('mapRender', list);

View File

@ -545,7 +545,16 @@ export default {
}
const changeSectionList = this.handleOtherSectionChange(model);
const changeStandList = this.handleRelevanceStand(model);
models = [...changeSectionList, ...changeStandList];
if (model.relCrossSection) {
this.crossSectionList.forEach(item => {
if (item.code === model.relCrossSection) {
const crossSection = deepAssign({parentCode: model.code}, item);
models = [crossSection];
}
});
}
models = [...models, ...changeSectionList, ...changeStandList];
this.$emit('updateMapModel', models);
this.oldPoint = JSON.parse(JSON.stringify(model.points));
this.oldLeftSectionCode = model.leftSectionCode;
@ -613,10 +622,10 @@ export default {
}
}
}
if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1])) {
if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1]) && section.type !== '04' && section.type !== '05') {
pointModel.push(copySection);
}
if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], section.points[0])) {
if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], section.points[0]) && section.type !== '04' && section.type !== '05') {
pointModel.push(copySection);
}
if (updataFlag) {