From 3d59c010d252735f8b3e9716090b8021f4002558 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 10 Sep 2021 11:22:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=A7=86=E5=9B=BE=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/chart/ChartViewService.java | 3 +++ frontend/src/components/canvas/custom-component/UserView.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 2c732b554e..92e0f1c6e7 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -460,6 +460,9 @@ public class ChartViewService { map.putAll(mapChart); map.putAll(mapTableNormal); + List sourceFields = dataSetTableFieldsService.getFieldsByTableId(view.getTableId()); + map.put("sourceFields",sourceFields); + ChartViewDTO dto = new ChartViewDTO(); BeanUtils.copyBean(dto, view); dto.setData(map); diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index ef55f4673e..4367d89d25 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -121,7 +121,7 @@ export default { trackMenu() { const trackMenuInfo = [] let linkageCount = 0 - this.chart.data && this.chart.data.fields && this.chart.data.fields.forEach(item => { + this.chart.data && this.chart.data.sourceFields && this.chart.data.sourceFields.forEach(item => { const sourceInfo = this.chart.id + '#' + item.id if (this.nowPanelTrackInfo[sourceInfo]) { linkageCount++