From 605d60b06c2eead04ea84baed771590ca500eb66 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 10 Mar 2021 18:14:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B2=94=E8=8A=AF=E6=B7=BB=E5=8A=A0parentCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/map.js | 1 - .../newMapdraft/mapoperate/section/index.vue | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/store/modules/map.js b/src/store/modules/map.js index bb3dd0503..5236e1ba3 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -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); diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 4913aae58..9fdfb6831 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -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) {