From 1dd2ae6a4c94b72ac1fb7bf185dd045f67d4292b Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 20 May 2025 17:32:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0KPI=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/kpiOverView/index.vue | 34 +++++++++++++++++----- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index 037a0903..b636554b 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -134,6 +134,19 @@ const TARGET_KPI_IDS: Record = { // SMSC: ['SMSC.A.01', 'SMSC.A.02', 'SMSC.A.03'], }; +const KPI_TITLE: Record = { + 'AMF.02': '5G Registration Request', + 'AMF.03': '5G Registration Success', + 'UPF.04': 'UPF Downlink Throughput', + 'UPF.05': 'UPF Uplink Throughput', + 'SCSCF.03': 'VoNR Registration Success', + 'SCSCF.04': 'VoNR Registration Request', + 'SCSCF.05': 'MO Call Success', + 'SCSCF.06': 'MO Call Attempt', + 'SCSCF.07': 'MT Call Success', + 'SCSCF.08': 'MT Call Attempt', +}; + // 实时数据开关函数 const fnRealTimeSwitch = (bool: boolean) => { if (bool) { @@ -658,13 +671,20 @@ const fetchSpecificKPI = async () => { const res = await getKPITitle(neType.toUpperCase()); if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { - const formattedKPIs = res.data.map(item => ({ - title: item[`${language}Title`], - dataIndex: item.kpiId, - key: item.kpiId, - kpiId: item.kpiId, - neType: neType, - })); + const titleIDs = Object.values(TARGET_KPI_IDS).flat(); + const formattedKPIs = res.data.map(item => { + let title = item[`${language}Title`]; + if (titleIDs.includes(item.kpiId)) { + title = KPI_TITLE[item.kpiId] || title; + } + return { + title: title, + dataIndex: item.kpiId, + key: item.kpiId, + kpiId: item.kpiId, + neType: neType, + }; + }); allKPIs = [...allKPIs, ...formattedKPIs]; }