fix: 折线图,tab展示判断逻辑使用 parseFloat 函数
This commit is contained in:
@@ -215,7 +215,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
mpackets.forEach(e => {
|
mpackets.forEach(e => {
|
||||||
e.unitType = 'bps'
|
e.unitType = 'bps'
|
||||||
if (e.name !== 'network.total' && e.analysis.avg == 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -225,7 +225,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (e.analysis.avg <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
mpackets.forEach(e => {
|
mpackets.forEach(e => {
|
||||||
e.unitType = 'bps'
|
e.unitType = 'bps'
|
||||||
if (e.name !== 'network.total' && e.analysis.avg == 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -206,7 +206,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (e.analysis.avg <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
@@ -237,7 +237,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
mpackets.forEach(e => {
|
mpackets.forEach(e => {
|
||||||
e.unitType = 'packets/s'
|
e.unitType = 'packets/s'
|
||||||
if (e.name !== 'network.total' && e.analysis.avg == 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (e.analysis.avg <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
mpackets.forEach(e => {
|
mpackets.forEach(e => {
|
||||||
e.unitType = 'bps'
|
e.unitType = 'bps'
|
||||||
if (e.name !== 'network.total' && e.analysis.avg === 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -224,7 +224,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (e.analysis.avg <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
@@ -262,7 +262,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
mpackets.forEach(e => {
|
mpackets.forEach(e => {
|
||||||
e.unitType = 'packets/s'
|
e.unitType = 'packets/s'
|
||||||
if (e.name !== 'network.total' && e.analysis.avg === 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -272,7 +272,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (e.analysis.avg <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { getSecond } from '@/utils/date-util'
|
|||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import chartMixin from '@/views/charts2/chart-mixin'
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import { computeScore, getChainRatio } from '@/utils/tools'
|
import { getChainRatio } from '@/utils/tools'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Reference in New Issue
Block a user