fix: explore graph showAllData使用emit传递数据

This commit is contained in:
zyh
2024-04-26 17:54:16 +08:00
parent 0219704e8b
commit 30506c2960
3 changed files with 15 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
@chartIsNoData="chartIsNoData" @chartIsNoData="chartIsNoData"
:from="from" :from="from"
:globalVariables="globalVariables" :globalVariables="globalVariables"
@loadMore="loadMore"
></chart-time-series> ></chart-time-series>
<chart-doughnut <chart-doughnut
:ref="'chart' + chartInfo.id" :ref="'chart' + chartInfo.id"
@@ -416,6 +417,9 @@ export default {
}, },
refreshLogs (params) { refreshLogs (params) {
this.$emit('refreshLogs', params) this.$emit('refreshLogs', params)
},
loadMore () {
this.$emit('loadMore')
} }
}, },
mounted () { mounted () {

View File

@@ -662,8 +662,9 @@ export default {
u.redraw(false, true) u.redraw(false, true)
}, },
showMore () { showMore () {
this.showAllData = true // this.showAllData = true
this.initChart() // this.initChart()
this.$emit('loadMore')
}, },
themeChange (theme) { themeChange (theme) {
this.theme = theme this.theme = theme

View File

@@ -239,6 +239,7 @@
:is-fullscreen="false" :is-fullscreen="false"
:panelLock="true" :panelLock="true"
:showAllData="showAllData" :showAllData="showAllData"
@loadMore="loadMore"
:isFullscreen="false" :isFullscreen="false"
:globalVariables="[]" :globalVariables="[]"
:from="'explore'" :from="'explore'"
@@ -385,6 +386,7 @@
:is-fullscreen="false" :is-fullscreen="false"
:panelLock="true" :panelLock="true"
:showAllData="showAllData" :showAllData="showAllData"
@loadMore="loadMore"
:isFullscreen="false" :isFullscreen="false"
:globalVariables="[]" :globalVariables="[]"
:from="'explore'" :from="'explore'"
@@ -3808,6 +3810,12 @@ export default {
this.scrollbarWrap.removeEventListener('scroll', this.onScroll) this.scrollbarWrap.removeEventListener('scroll', this.onScroll)
}, },
methods: { methods: {
loadMore () {
this.showAllData = true
this.$nextTick(() => {
this.$refs.exploreChart.$children[0].initChart()
})
},
changeStack () { changeStack () {
this.isStack = !this.isStack this.isStack = !this.isStack
this.$refs.exploreChart.$children[0].changeStack() this.$refs.exploreChart.$children[0].changeStack()