From 70f8e4091a573ca0b41bcc3e13c2c758e7d064f1 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 23 May 2024 18:05:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=B8=96=E7=95=8C?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=B8=8B=E9=92=BB=E5=88=B0=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=A4=B1=E8=B4=A5=20#9201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/customComponent/UserView.vue | 12 +++++++++++- core/frontend/src/views/chart/view/ChartEdit.vue | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 2b23818290..2b1f4e4600 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -1439,8 +1439,18 @@ export default { } const customAttr = JSON.parse(this.chart.customAttr) const currentNode = this.findEntityByCode(aCode || customAttr.areaCode, this.places) + let mappingName = null + if (this.chart.senior) { + const senior = JSON.parse(this.chart.senior) + if (senior?.mapMapping[currentNode.code]) { + const mapping = senior.mapMapping[currentNode.code] + if (mapping[name]) { + mappingName = mapping[name] + } + } + } if (currentNode && currentNode.children && currentNode.children.length > 0) { - const nextNode = currentNode.children.find(item => item.name === name) + const nextNode = currentNode.children.find(item => item.name === name || (mappingName && item.name === mappingName)) this.currentAcreaNode = nextNode const current = this.$refs[this.element.propValue.id] if (this.chart.isPlugin) { diff --git a/core/frontend/src/views/chart/view/ChartEdit.vue b/core/frontend/src/views/chart/view/ChartEdit.vue index 6e6e38e176..ffb209eb19 100644 --- a/core/frontend/src/views/chart/view/ChartEdit.vue +++ b/core/frontend/src/views/chart/view/ChartEdit.vue @@ -3618,8 +3618,18 @@ export default { aCode = this.currentAcreaNode.code } const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places) + let mappingName = null + if (this.chart.senior) { + const senior = JSON.parse(this.chart.senior) + if (senior?.mapMapping[currentNode.code]) { + const mapping = senior.mapMapping[currentNode.code] + if (mapping[name]) { + mappingName = mapping[name] + } + } + } if (currentNode && currentNode.children && currentNode.children.length > 0) { - const nextNode = currentNode.children.find(item => item.name === name) + const nextNode = currentNode.children.find(item => item.name === name || (mappingName && item.name === mappingName)) if (!nextNode || !nextNode.code) return null this.currentAcreaNode = nextNode const current = this.$refs.dynamicChart