趋势图问题修复
This commit is contained in:
@@ -114,7 +114,17 @@
|
|||||||
// 趋势图
|
// 趋势图
|
||||||
drawTrend() {
|
drawTrend() {
|
||||||
getTrendChart(this.queryParams).then( res => {
|
getTrendChart(this.queryParams).then( res => {
|
||||||
|
console.log('res', res);
|
||||||
|
if (res.data.code == 0) {
|
||||||
this.trendData = res.data.data
|
this.trendData = res.data.data
|
||||||
|
this.initChart()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initChart() {
|
||||||
|
echarts.init(document.getElementById("chartColumn")).dispose();
|
||||||
this.chartColumn = markRaw(echarts.init(document.getElementById('chartColumn')))
|
this.chartColumn = markRaw(echarts.init(document.getElementById('chartColumn')))
|
||||||
this.chartColumn.setOption({
|
this.chartColumn.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@@ -138,7 +148,6 @@
|
|||||||
yAxis: this.trendData.yAxis,
|
yAxis: this.trendData.yAxis,
|
||||||
series: this.trendData.series
|
series: this.trendData.series
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user