From 5a4ab62e972faf85ee4a125db617141518a17c58 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 20 Dec 2024 15:43:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CDR=E6=95=B0=E6=8D=AE=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=EF=BC=8CSGWC=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 10 +- src/i18n/locales/zh-CN.ts | 10 +- src/views/dashboard/imsCDR/index.vue | 35 +++- src/views/dashboard/sgwcCDR/index.vue | 287 ++++++++++++-------------- src/views/dashboard/smfCDR/index.vue | 118 +++++++---- src/views/dashboard/smscCDR/index.vue | 37 +++- 6 files changed, 288 insertions(+), 209 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index f7953c9e..0cdcc16d 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -421,14 +421,18 @@ export default { resultFail: "Fail", delTip: "Confirm deletion of the data item numbered [{msg}]?", exportTip: "Do you confirm to export the current query conditions of the CDR data? (Maximum 10,000 items can be exported.)", - smfChargingID: 'Charging ID', + chargingID: 'Charging ID', smfSubscriptionIDData: 'Subscription ID Data', smfSubscriptionIDType: 'Subscription ID Type', smfDataVolumeUplink: 'Data Volume Uplink', smfDataVolumeDownlink: 'Data Volume Downlink', smfDataTotalVolume: 'Data Total Volume', - smfDuration: 'Duration', - smfInvocationTime: 'Invocation Time', + durationTime: 'Duration', + invocationTime: 'Invocation Time', + sgwcServedIMSI: 'IMSI', + sgwcServedMSISDN: 'MSISDN', + sgwcVolumeGPRSUplink: 'GPRS Uplink', + sgwcVolumeGPRSDownlink: 'GPRS Downlink', }, ue: { eventType: "Event Type", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 8707f564..4966eec9 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -421,14 +421,18 @@ export default { resultFail: "失败", delTip: "确认删除编号为【{msg}】的数据项?", exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)", - smfChargingID: '计费ID', + chargingID: '计费ID', smfSubscriptionIDData: '订阅 ID 数据', smfSubscriptionIDType: '订阅 ID 类型', smfDataVolumeUplink: '数据量上行链路', smfDataVolumeDownlink: '数据量下行链路', smfDataTotalVolume: '数据总量', - smfDuration: '持续时间', - smfInvocationTime: '调用时间', + durationTime: '持续时间', + invocationTime: '调用时间', + sgwcServedIMSI: 'IMSI', + sgwcServedMSISDN: 'MSISDN', + sgwcVolumeGPRSUplink: 'GPRS 上行链路', + sgwcVolumeGPRSDownlink: 'GPRS 下行链路', }, ue: { eventType: "事件类型", diff --git a/src/views/dashboard/imsCDR/index.vue b/src/views/dashboard/imsCDR/index.vue index 7fdf8ccd..3cd64bfd 100644 --- a/src/views/dashboard/imsCDR/index.vue +++ b/src/views/dashboard/imsCDR/index.vue @@ -21,6 +21,8 @@ import { parseDateToStr, parseDuration } from '@/utils/date-utils'; import { OptionsType, WS } from '@/plugins/ws-websocket'; import saveAs from 'file-saver'; import PQueue from 'p-queue'; +import { useClipboard } from '@vueuse/core'; +const { copy } = useClipboard({ legacy: true }); const { t } = useI18n(); const { getDict } = useDictStore(); const ws = new WS(); @@ -307,6 +309,18 @@ function fnRecordDelete(id: string) { }); } +/** + * 复制CDR + * @param jsonStr JSON字符串 + */ +function fnRecordCopy(jsonStr: string) { + if (!jsonStr) return; + const text = JSON.stringify(jsonStr, null, 2); + copy(text).then(() => { + message.success(t('common.copyOk'), 3); + }); +} + /**查询列表, pageNum初始页数 */ function fnGetList(pageNum?: number) { if (tableState.loading) return; @@ -407,7 +421,9 @@ function fnRealTime() { subGroupID: `1005_${queryParams.neId}`, }, onmessage: wsMessage, - onerror: wsError, + onerror: (ev: any) => { + console.error(ev); + }, }; ws.connect(options); } else { @@ -417,12 +433,6 @@ function fnRealTime() { } } -/**接收数据后回调 */ -function wsError(ev: any) { - // 接收数据后回调 - console.error(ev); -} - /**接收数据后回调 */ function wsMessage(res: Record) { const { code, requestId, data } = res; @@ -724,6 +734,17 @@ onBeforeUnmount(() => {