fix: 实体subscribe详情页的Top 应用部分不显示数据

This commit is contained in:
hyx
2024-01-11 10:58:01 +08:00
parent ada66ee9d2
commit 734bfb33d3

View File

@@ -124,8 +124,8 @@ export default {
this.showError = false
if (!this.isNoData) {
const appDatas = res.data.result.map(item => {
const upData = item.outbound_byte ? item.outbound_byte : 0
const downData = item.inbound_byte ? item.inbound_byte : 0
const upData = item.outbound_bytes ? Number(item.outbound_bytes) : 0
const downData = item.inbound_bytes ? Number(item.inbound_bytes) : 0
return {
app: item.app,
up: upData,
@@ -160,7 +160,7 @@ export default {
this.isNoData = Object.keys(data).length === 0
this.showError = false
if (!this.isNoData) {
const totalData = data.total_bytes ? data.total_bytes : 0
const totalData = data.total_bytes ? Number(data.total_bytes) : 0
if (totalData !== 0) {
const echartDataList = []
this.topAppData.forEach(item => {