forked from github/dataease
fix(UI): fix选中状态丢失
This commit is contained in:
parent
d7ccc33954
commit
fe82465151
@ -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
|
||||
},
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user