fix: 修复npm location 折线图,因字段改变导致的报错

This commit is contained in:
@changcode
2022-10-27 10:47:38 +08:00
parent 2da2172f03
commit 64610304c1

View File

@@ -132,11 +132,11 @@ export default {
this.isNoData = res.data.result.length === 0
if (this.chart.params.index === 0) {
res.data.result.forEach((t, i) => {
if (t.type === 'totalBytesRate') {
if (t.type === 'totalBitsRate') {
this.chartOptionLineData[i].values = t.values
} else if (t.type === 'inboundBytesRate') {
} else if (t.type === 'inboundBitsRate') {
this.chartOptionLineData[i].values = t.values
} else if (t.type === 'outboundBytesRate') {
} else if (t.type === 'outboundBitsRate') {
this.chartOptionLineData[i].values = t.values
}
})