From ca8f16fb0c91c95e2bf3ce0f31c5ad1e610c2c50 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 28 Apr 2025 14:19:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0CDR=20SIP=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E4=BB=A3=E7=A0=81=E7=B1=BB=E5=88=AB=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/imsCDR/index.vue | 82 +++++++++++-------- .../components/UserActivity/index.vue | 79 +++++++++++------- 2 files changed, 98 insertions(+), 63 deletions(-) diff --git a/src/views/dashboard/imsCDR/index.vue b/src/views/dashboard/imsCDR/index.vue index 6041f00e..12230357 100644 --- a/src/views/dashboard/imsCDR/index.vue +++ b/src/views/dashboard/imsCDR/index.vue @@ -5,7 +5,6 @@ import { message, Modal } from 'ant-design-vue/es'; import { SizeType } from 'ant-design-vue/es/config-provider'; import { MenuInfo } from 'ant-design-vue/es/menu/src/interface'; import { ColumnsType } from 'ant-design-vue/es/table'; -import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue'; import useI18n from '@/hooks/useI18n'; import { RESULT_CODE_ERROR, @@ -37,9 +36,12 @@ let dict: { cdrSipCode: DictType[]; /**CDR 呼叫类型 */ cdrCallType: DictType[]; + /**CDR SIP响应代码类别类型 */ + cdrSipCodeCause: DictType[]; } = reactive({ cdrSipCode: [], cdrCallType: [], + cdrSipCodeCause: [], }); /**网元可选 */ @@ -187,13 +189,6 @@ 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', @@ -207,36 +202,50 @@ let tableColumns: ColumnsType = [ : parseDuration(cdrJSON.callDuration); }, }, + { + title: t('views.dashboard.cdr.resultCode'), + dataIndex: 'cdrJSON', + key: 'code', + align: 'left', + width: 150, + }, + { + title: t('views.dashboard.cdr.resultCause'), + dataIndex: 'cdrJSON', + key: 'cause', + align: 'left', + width: 200, + }, { title: t('views.dashboard.cdr.seizureTime'), dataIndex: 'cdrJSON', align: 'left', - width: 200, + width: 250, customRender(opt) { const cdrJSON = opt.value; if (typeof cdrJSON.seizureTime === 'number') { return parseDateToStr(+cdrJSON.seizureTime * 1000); } - return cdrJSON.seizureTime; + return parseDateToStr(cdrJSON.seizureTime); }, }, { title: t('views.dashboard.cdr.releaseTime'), dataIndex: 'cdrJSON', align: 'left', - width: 200, + width: 250, customRender(opt) { const cdrJSON = opt.value; if (typeof cdrJSON.releaseTime === 'number') { return parseDateToStr(+cdrJSON.releaseTime * 1000); } - return cdrJSON.releaseTime; + return parseDateToStr(cdrJSON.releaseTime); }, }, { title: t('views.dashboard.cdr.tenantName'), dataIndex: 'tenantName', - align: 'center', + align: 'left', key: 'tenantName', width: 150, }, @@ -247,9 +256,6 @@ let tableColumns: ColumnsType = [ }, ]; -/**表格字段列排序 */ -let tableColumnsDnd = ref([]); - /**表格分页器参数 */ let tablePagination = reactive({ /**当前页数 */ @@ -510,16 +516,21 @@ function wsMessage(res: Record) { onMounted(() => { // 初始字典数据 - Promise.allSettled([getDict('cdr_sip_code'), getDict('cdr_call_type')]).then( - resArr => { - if (resArr[0].status === 'fulfilled') { - dict.cdrSipCode = resArr[0].value; - } - if (resArr[1].status === 'fulfilled') { - dict.cdrCallType = resArr[1].value; - } + Promise.allSettled([ + getDict('cdr_sip_code'), + getDict('cdr_call_type'), + getDict('cdr_sip_code_cause'), + ]).then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.cdrSipCode = resArr[0].value; } - ); + if (resArr[1].status === 'fulfilled') { + dict.cdrCallType = resArr[1].value; + } + if (resArr[2].status === 'fulfilled') { + dict.cdrSipCodeCause = resArr[2].value; + } + }); // 获取网元网元列表 useNeInfoStore() .fnNelist() @@ -738,11 +749,6 @@ onBeforeUnmount(() => { - @@ -774,12 +780,12 @@ onBeforeUnmount(() => { -