fix:stat图表 sparklineMode历史数据设置为none

This commit is contained in:
zyh
2023-02-28 14:15:52 +08:00
parent 95cd6b406f
commit 0bb607f9e8
3 changed files with 13 additions and 4 deletions

View File

@@ -461,6 +461,9 @@ export default {
if (!this.chart.groupId || this.chart.groupId == -1) {
this.chart.groupId = ''
}
if (this.chart.type === 'stat' && !this.chart.param.sparklineMode) {
this.chart.param.sparklineMode = 'none'
}
if (this.chart.type == 'table') {
const arr = this.chart.param.indexs ? this.chart.param.indexs.split(',') : []
this.chart.param.tags = arr.map((item) => {
@@ -618,7 +621,6 @@ export default {
this.getData(this.filter)
}
} else if (this.from === this.fromRoute.dashboardTemp) {
this.$get('visual/panel', { type: 'template', ids: this.obj.id }).then(response => {
if (response.code === 200) {
this.panelData = response.data.list

View File

@@ -614,6 +614,9 @@ export default {
if (!this.chart.groupId || this.chart.groupId == -1) {
this.chart.groupId = ''
}
if (this.chart.type === 'stat' && !this.chart.param.sparklineMode) {
this.chart.param.sparklineMode = 'none'
}
if (this.chart.type == 'table') {
const arr = this.chart.param.indexs ? this.chart.param.indexs.split(',') : []
this.chart.param.tags = arr.map((item) => {

View File

@@ -1,10 +1,11 @@
<template>
<div class="integration-configuration">
<pre class="integration-configuration-pre">{{configuration}}</pre>
<pre class="integration-configuration-pre" v-html="converterData()"></pre>
</div>
</template>
<script>
import showdown from 'showdown'
export default {
name: 'integration-configuration',
props: {
@@ -15,8 +16,11 @@ export default {
}
},
methods: {
},
watch: {
// 给页面插入markdown数据
converterData () {
const converter = new showdown.Converter()
return converter.makeHtml(this.configuration)
}
}
}
</script>