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]; }