From fe82465151808655c41288f3798d7e2b7b909e2b Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 29 Apr 2021 18:00:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI):=20fix=E9=80=89=E4=B8=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/group/Group.vue | 16 ++++++++++++++-- frontend/src/views/chart/view/ChartEdit.vue | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index c8ab4c0a66..9e787f0c27 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -276,7 +276,7 @@ export default { }, computed: { sceneData: function() { - this.chartTree() + this.reviewChartList() return this.$store.state.chart.chartSceneData } }, @@ -483,7 +483,8 @@ export default { if (data.type === 'scene') { this.sceneMode = true this.currGroup = data - this.$store.dispatch('chart/setSceneId', this.currGroup.id) + // this.$store.dispatch('chart/setSceneId', this.currGroup.id) + this.chartTree() } if (node.expanded) { this.expandedArray.push(data.id) @@ -522,6 +523,17 @@ export default { this.$emit('switchComponent', { name: 'ChartEdit', param: { 'id': data.id }}) }, + reviewChartList() { + if (this.$store.state.chart.chartSceneData) { + const that = this + this.chartData.forEach(function(ele) { + if (ele.id === that.$store.state.chart.chartSceneData.id) { + ele.type = that.$store.state.chart.chartSceneData.type + } + }) + } + }, + selectTable() { this.selectTableFlag = true }, diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 906c6ca9e5..697715b4ad 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -419,7 +419,7 @@ export default { // this.get(response.data.id); this.getData(response.data.id) this.$store.dispatch('chart/setChartSceneData', null) - this.$store.dispatch('chart/setChartSceneData', this.sceneId) + this.$store.dispatch('chart/setChartSceneData', response.data) }) }, closeEdit() {