From dc3ac270ef4aa943cb99199b0babde4831e829b7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 26 Sep 2022 17:20:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=A2=9C=E8=89=B2=E6=A0=B7=E8=AE=BE=E7=BD=AE=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E4=BB=AA=E8=A1=A8=E6=9D=BF=E4=B8=BB=E9=A2=98=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E5=90=8E=EF=BC=8C=E8=AE=BE=E7=BD=AE=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=90=8E=E5=8F=88=E6=81=A2=E5=A4=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/custom-component/UserView.vue | 8 ++++++-- frontend/src/views/chart/view/ChartEdit.vue | 3 +++ frontend/src/views/panel/edit/index.vue | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 272b6beaad..f43c538304 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -476,7 +476,9 @@ export default { this.chart.customStyle = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr } - viewPropsSave(this.panelInfo.id, updateParams) + viewPropsSave(this.panelInfo.id, updateParams).then(rsp =>{ + this.active && bus.$emit('current-component-change') + }) this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) this.mergeScale() }, @@ -491,7 +493,9 @@ export default { this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr - viewPropsSave(this.panelInfo.id, updateParams) + viewPropsSave(this.panelInfo.id, updateParams).then(rsp =>{ + this.active && bus.$emit('current-component-change') + }) this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) this.mergeScale() }, diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 61dd8a8ca0..cc17877b15 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1459,6 +1459,9 @@ export default { }, methods: { + resetChartData(){ + this.getChart(this.param.id) + }, setDynamicAreaCode(code) { this.currentAreaCode = code }, diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 3b57490fc1..9ace4394e1 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -697,6 +697,7 @@ export default { bus.$off('previewFullScreenClose', this.previewFullScreenClose) bus.$off('change_panel_right_draw', this.changeRightDrawOpen) bus.$off('delete-condition', this.deleteCustomComponent) + bus.$off('current-component-change', this.asideRefresh) const elx = this.$refs.rightPanel elx && elx.remove() }, @@ -718,6 +719,12 @@ export default { bus.$on('previewFullScreenClose', this.previewFullScreenClose) bus.$on('change_panel_right_draw', this.changeRightDrawOpen) bus.$on('delete-condition', this.deleteCustomComponent) + bus.$on('current-component-change', this.asideRefresh) + }, + asideRefresh(){ + if(this.$refs['chartEditRef']){ + this.$refs['chartEditRef'].resetChartData() + } }, deleteCustomComponent(param) { param && param.componentId && this.componentData.forEach(com => {