From 87e52619422557d884a9aa09eb59aa05239e5e12 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 2 Sep 2025 18:07:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=9B=BE=E8=A1=A8=E6=98=BE=E7=A4=BA=E4=B8=8E?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/smfCDRByIMSI/index.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue index 3370fc99..6f9b8922 100644 --- a/src/views/dashboard/smfCDRByIMSI/index.vue +++ b/src/views/dashboard/smfCDRByIMSI/index.vue @@ -225,6 +225,7 @@ const option = { function fnRanderChart() { const container: HTMLElement | undefined = cdrChartDom.value; if (!container) return; + container.style.display = 'block'; // 如果图表已经存在,先销毁 if (cdrChart) { @@ -283,6 +284,15 @@ function fnQueryReset() { queryParams.dnn = ''; queryRangePicker.value = [dayjs().startOf('hour'), dayjs().endOf('hour')]; fnGetList(1); + // 重置关闭图 + ws.close(); + if (cdrChart) { + cdrChart.clear(); + cdrChart.dispose(); + if (cdrChartDom.value) { + cdrChartDom.value.style.display = 'none'; + } + } } let state = reactive({ @@ -444,6 +454,8 @@ function fnRanderChartDataLoad() { } // 绘制图数据 fnRanderChartDataUpdate(); + // 动态ws + fnRealTime(); } else { message.warning('No Data'); cdrChart.hideLoading(); @@ -620,8 +632,7 @@ onMounted(() => { } }) .finally(() => { - // 移除初始化时的图表创建,改为在需要时动态创建 - fnRealTime(); + fnGetList(); }); }); @@ -737,7 +748,10 @@ onBeforeUnmount(() => { -
+