From ea2ce56e52d099a500a134780174f7b19b7674f1 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 11 Mar 2025 15:49:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BD=BF=E7=94=A8=E6=83=85=E5=86=B5=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/smfCDRByIMSI/index.vue | 31 +++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue index dea8bf0b..7c99e830 100644 --- a/src/views/dashboard/smfCDRByIMSI/index.vue +++ b/src/views/dashboard/smfCDRByIMSI/index.vue @@ -229,7 +229,7 @@ function fnRanderChart() { // 创建 ResizeObserver 实例 监听图表容器大小变化,并在变化时调整图表大小 var observer = new ResizeObserver(entries => { - if (cdrChart) { + if (cdrChart && !cdrChart.isDisposed) { cdrChart.resize(); } }); @@ -295,6 +295,8 @@ let state = reactive({ total: 0, /**表格加载状态 */ loading: false, + /**数据总量 up,down */ + dataUsage: ['0 B', '0 B'], }); /**查询列表, pageNum初始页数 */ @@ -455,6 +457,18 @@ function fnRanderChartDataUpdate() { ], }); cdrChart.hideLoading(); + + // 累加总量 + let uplinkTotal = 0; + let downlinkTotal = 0; + for (let index = 0; index < dataVolumeUplinkYSeriesData.length; index++) { + uplinkTotal += dataVolumeUplinkYSeriesData[index]; + downlinkTotal += dataVolumeDownlinkYSeriesData[index]; + } + state.dataUsage = [ + parseSizeFromByte(uplinkTotal), + parseSizeFromByte(downlinkTotal), + ]; } /** @@ -549,9 +563,9 @@ onMounted(() => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.data.length > 0) { let arr: Record[] = []; - res.data.forEach(i => { - if (i.neType === 'SMF') { - arr.push({ value: i.neId, label: i.neName }); + res.data.forEach((v: any) => { + if (v.neType === 'SMF') { + arr.push({ value: v.neId, label: v.neName }); } }); neOtions.value = arr; @@ -669,6 +683,15 @@ onBeforeUnmount(() => {
+ + + + {{ state.dataUsage[0] }} + + + {{ state.dataUsage[1] }} + +