From 851e8a461e411df07994db3822f816cb27da8242 Mon Sep 17 00:00:00 2001 From: zhongzm Date: Mon, 18 Nov 2024 10:39:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/kpiOverView/index.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index 7fb8fc72..4d534b06 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -286,10 +286,9 @@ const updateChart = () => { }, grid: { //网格配置 - left: '3%', - right: '4%', + left: '6%', + right: '6%', bottom: '3%', - top: 100, containLabel: true, }, xAxis: { @@ -643,7 +642,7 @@ const updateChartLegendSelect = (selectedKpiId?: string) => { } .chart-container { - height: calc(100vh - 550px); + height: 400px; width: 100%; } From 256802e6984f4b73d894c5e406f242933c96f6db Mon Sep 17 00:00:00 2001 From: zhongzm Date: Mon, 18 Nov 2024 18:15:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/kpiOverView/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index 4d534b06..eaf8e7ed 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -31,7 +31,7 @@ interface ChartDataItem { date: string; // 将存储完整的时间字符串包含时分秒 [kpiId: string]: string | number; // 动态指标 } - +const tableLoading = ref(false); //网元类型定义 const ALL_NE_TYPES = ['AMF','SMF','UPF','MME','IMS','SMSC'] as const; type NeType= typeof ALL_NE_TYPES[number]; @@ -107,6 +107,7 @@ const fnRealTimeSwitch = (bool: boolean) => { } chartData.value = []; + tableLoading.value =true; const options: OptionsType = { url: '/ws', params: { @@ -119,6 +120,7 @@ const fnRealTimeSwitch = (bool: boolean) => { } else if (ws.value) { ws.value.close(); //断开链接 ws.value = null; //清空链接 + tableLoading.value = false; } }; @@ -142,6 +144,9 @@ const handleWebSocketMessage = (kpiEvent:any)=>{ // 更新数据 updateChartData(newData); + if(tableLoading.value){ + tableLoading.value=false; + } }; //成功回调 const wsMessage = (res:Record)=>{ @@ -606,6 +611,7 @@ const updateChartLegendSelect = (selectedKpiId?: string) => { :pagination="false" :scroll="{ y: 250 }" size="small" + :loading="tableLoading" :custom-row="(record) => ({ onClick: () => handleRowClick(record), class: record.kpiId === selectedRow ? 'selected-row' : ''