From df5072bae7eb3d3a67f4f11ae6b2ea5e894e785c Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sat, 2 Nov 2024 15:46:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CDR-IMS=E6=98=BE=E7=A4=BA=E5=91=BC?= =?UTF-8?q?=E5=8F=AB-=E6=8C=82=E6=96=AD=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 2 + src/i18n/locales/zh-CN.ts | 2 + src/views/dashboard/imsCDR/index.vue | 154 ++++++++++++++++----------- 3 files changed, 95 insertions(+), 63 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 4771a6da..6e4e9716 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -567,6 +567,8 @@ export default { rowInfo: "Info", type: "Type", duration: "Duration", + seizureTime: "Call Start Time", + releaseTime: "Hangup Time", caller: "Caller", called: "Called", result: "Result", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 6c3e1b80..c8bcb32a 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -567,6 +567,8 @@ export default { rowInfo: "记录信息", type: "记录类型", duration: "通话时长", + seizureTime: "呼叫开始时间", + releaseTime: "挂断结束时间", caller: "主叫", called: "被叫", result: "结果", diff --git a/src/views/dashboard/imsCDR/index.vue b/src/views/dashboard/imsCDR/index.vue index 10a9d996..69d25e7d 100644 --- a/src/views/dashboard/imsCDR/index.vue +++ b/src/views/dashboard/imsCDR/index.vue @@ -161,6 +161,13 @@ let tableColumns: ColumnsType = [ return cdrJSON.calledParty; }, }, + { + title: t('views.dashboard.cdr.result'), + dataIndex: 'cdrJSON', + key: 'cause', + align: 'left', + width: 150, + }, { title: t('views.dashboard.cdr.duration'), dataIndex: 'cdrJSON', @@ -175,20 +182,29 @@ let tableColumns: ColumnsType = [ }, }, { - title: t('views.dashboard.cdr.result'), + title: t('views.dashboard.cdr.seizureTime'), dataIndex: 'cdrJSON', - key: 'cause', align: 'left', - width: 150, - }, - { - title: t('views.dashboard.cdr.time'), - dataIndex: 'cdrJSON', - align: 'center', - width: 150, + width: 200, customRender(opt) { const cdrJSON = opt.value; - return parseDateToStr(+cdrJSON.releaseTime * 1000); + if (typeof cdrJSON.seizureTime === 'number') { + return parseDateToStr(+cdrJSON.seizureTime * 1000); + } + return cdrJSON.seizureTime; + }, + }, + { + title: t('views.dashboard.cdr.releaseTime'), + dataIndex: 'cdrJSON', + align: 'left', + width: 200, + customRender(opt) { + const cdrJSON = opt.value; + if (typeof cdrJSON.releaseTime === 'number') { + return parseDateToStr(+cdrJSON.releaseTime * 1000); + } + return cdrJSON.releaseTime; }, }, { @@ -725,61 +741,73 @@ onBeforeUnmount(() => {