fix: 修复link下钻列表分数计算逻辑
This commit is contained in:
@@ -785,7 +785,11 @@ export function computeScore (data) {
|
||||
let k = 0
|
||||
let totalScore = 0
|
||||
const scoreArr = []
|
||||
let num = 0
|
||||
Object.keys(data).forEach(t => {
|
||||
if (!data[t]) {
|
||||
num += 1
|
||||
}
|
||||
if (t === 'establishLatencyMs' || t === 'tcpLostlenPercent' || t === 'pktRetransPercent') {
|
||||
k = 0.3
|
||||
} else if (t === 'httpResponseLatency' || t === 'sslConLatency') {
|
||||
@@ -821,6 +825,9 @@ export function computeScore (data) {
|
||||
if (totalScore > 6) {
|
||||
totalScore = 6
|
||||
}
|
||||
if (num === 5) {
|
||||
return '-'
|
||||
}
|
||||
return totalScore
|
||||
}
|
||||
|
||||
|
||||
@@ -534,7 +534,9 @@ export default {
|
||||
this.timer = setTimeout(() => {
|
||||
if (this.lineTab) {
|
||||
const data = this.mpackets.find(t => t.class === this.lineTab)
|
||||
if (data && data.positioning) {
|
||||
this.activeChange(data, data.positioning)
|
||||
}
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user