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 => {