fix: 修复一开始没数据,更改条件后有数据也刷不出来的问题

This commit is contained in:
chenjinsong
2022-09-06 11:15:48 +08:00
parent 39dc0b8e40
commit 5be4044b51
4 changed files with 31 additions and 25 deletions

View File

@@ -157,19 +157,19 @@ export default {
index = 0
}
if (res.data.result.httpResponseLatencyAvg || res.data.result.httpResponseLatencyAvg === 0) {
res.data.result.httpResponseLatency = res.data.result.establishLatencyMsAvg
res.data.result.httpResponseLatency = res.data.result.httpResponseLatencyAvg
index = 1
}
if (res.data.result.tcpLostlenPercentAvg || res.data.result.tcpLostlenPercentAvg === 0) {
res.data.result.tcpLostlenPercent = res.data.result.establishLatencyMsAvg
res.data.result.tcpLostlenPercent = res.data.result.tcpLostlenPercentAvg
index = 3
}
if (res.data.result.pktRetransPercentAvg || res.data.result.pktRetransPercentAvg === 0) {
res.data.result.pktRetransPercent = res.data.result.establishLatencyMsAvg
res.data.result.pktRetransPercent = res.data.result.pktRetransPercentAvg
index = 4
}
if (res.data.result.sslConLatencyAvg || res.data.result.sslConLatencyAvg === 0) {
res.data.result.sslConLatency = res.data.result.establishLatencyMsAvg
res.data.result.sslConLatency = res.data.result.sslConLatencyAvg
index = 2
}
scoreInfo[keyPre[index] + 'Score'] = computeScore(res.data.result, index)