From 3eae546aa4d546e268e4a55136bc2c7ea0b5db85 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 15 Jul 2025 19:49:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CDR=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/neData/ims.ts | 8 ++++---- src/api/neData/sgwc.ts | 8 ++++---- src/api/neData/smf.ts | 8 ++++---- src/views/dashboard/imsCDR/index.vue | 17 ++++++----------- src/views/dashboard/sgwcCDR/index.vue | 17 ++++++----------- src/views/dashboard/smfCDR/index.vue | 17 ++++++----------- src/views/dashboard/smfCDRByIMSI/index.vue | 5 ++++- src/views/dashboard/smscCDR/index.vue | 17 ++++++----------- 8 files changed, 40 insertions(+), 57 deletions(-) diff --git a/src/api/neData/ims.ts b/src/api/neData/ims.ts index b56486a5..cbefa062 100644 --- a/src/api/neData/ims.ts +++ b/src/api/neData/ims.ts @@ -29,14 +29,14 @@ export function delIMSDataCDR(cdrIds: string | number) { /** * IMS-CDR会话列表导出 - * @param data 查询列表条件 + * @param query 查询列表条件 * @returns object */ -export function exportIMSDataCDR(data: Record) { +export function exportIMSDataCDR(query: Record) { return request({ url: '/neData/ims/cdr/export', - method: 'POST', - data, + method: 'GET', + params: query, responseType: 'blob', timeout: 60_000, }); diff --git a/src/api/neData/sgwc.ts b/src/api/neData/sgwc.ts index 1cb3853f..b7ea17c7 100644 --- a/src/api/neData/sgwc.ts +++ b/src/api/neData/sgwc.ts @@ -29,14 +29,14 @@ export function delSGWCDataCDR(cdrIds: string | number) { /** * SGWC-CDR会话列表导出 - * @param data 查询列表条件 + * @param query 查询列表条件 * @returns object */ -export function exportSGWCDataCDR(data: Record) { +export function exportSGWCDataCDR(query: Record) { return request({ url: '/neData/sgwc/cdr/export', - method: 'POST', - data, + method: 'GET', + params: query, responseType: 'blob', timeout: 60_000, }); diff --git a/src/api/neData/smf.ts b/src/api/neData/smf.ts index 9b87a10f..61f79cea 100644 --- a/src/api/neData/smf.ts +++ b/src/api/neData/smf.ts @@ -29,14 +29,14 @@ export function delSMFDataCDR(cdrIds: string | number) { /** * SMF-CDR会话列表导出 - * @param data 查询列表条件 + * @param query 查询列表条件 * @returns object */ -export function exportSMFDataCDR(data: Record) { +export function exportSMFDataCDR(query: Record) { return request({ url: '/neData/smf/cdr/export', - method: 'POST', - data, + method: 'GET', + params: query, responseType: 'blob', timeout: 60_000, }); diff --git a/src/views/dashboard/imsCDR/index.vue b/src/views/dashboard/imsCDR/index.vue index 6ebe6d06..61eb8983 100644 --- a/src/views/dashboard/imsCDR/index.vue +++ b/src/views/dashboard/imsCDR/index.vue @@ -290,14 +290,11 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) { type ModalStateType = { /**确定按钮 loading */ confirmLoading: boolean; - /**最大ID值 */ - maxId: number; }; /**对话框对象信息状态 */ let modalState: ModalStateType = reactive({ confirmLoading: false, - maxId: 0, }); /** @@ -399,11 +396,6 @@ function fnGetList(pageNum?: number) { return item; }); - - // 取最大值ID用作实时累加 - if (total > 0) { - modalState.maxId = Number(rows[0].id); - } } tableState.loading = false; }); @@ -490,15 +482,18 @@ function wsMessage(res: Record) { // cdrEvent CDR会话事件 if (data.groupId === `1005_${queryParams.neId}`) { const cdrEvent = data.data; + let cdrJSON = {}; + try { + cdrJSON = JSON.parse(cdrEvent.cdrJSON); + } catch (e) {} queue.add(async () => { - modalState.maxId += 1; tableState.data.unshift({ - id: modalState.maxId, + id: cdrEvent.id, neType: cdrEvent.neType, neName: cdrEvent.neName, rmUID: cdrEvent.rmUID, timestamp: cdrEvent.timestamp, - cdrJSON: cdrEvent.CDR, + cdrJSON: cdrJSON, }); tablePagination.total += 1; if (tableState.data.length > 100) { diff --git a/src/views/dashboard/sgwcCDR/index.vue b/src/views/dashboard/sgwcCDR/index.vue index b436d566..a1f4cd3f 100644 --- a/src/views/dashboard/sgwcCDR/index.vue +++ b/src/views/dashboard/sgwcCDR/index.vue @@ -260,14 +260,11 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) { type ModalStateType = { /**确定按钮 loading */ confirmLoading: boolean; - /**最大ID值 */ - maxId: number; }; /**对话框对象信息状态 */ let modalState: ModalStateType = reactive({ confirmLoading: false, - maxId: 0, }); /** @@ -369,11 +366,6 @@ function fnGetList(pageNum?: number) { return item; }); - - // 取最大值ID用作实时累加 - if (total > 0) { - modalState.maxId = Number(rows[0].id); - } } tableState.loading = false; }); @@ -460,15 +452,18 @@ function wsMessage(res: Record) { // cdrEvent CDR会话事件 if (data.groupId === `1008_${queryParams.neId}`) { const cdrEvent = data.data; + let cdrJSON = {}; + try { + cdrJSON = JSON.parse(cdrEvent.cdrJSON); + } catch (e) {} queue.add(async () => { - modalState.maxId += 1; tableState.data.unshift({ - id: modalState.maxId, + id: cdrEvent.id, neType: cdrEvent.neType, neName: cdrEvent.neName, rmUID: cdrEvent.rmUID, timestamp: cdrEvent.timestamp, - cdrJSON: cdrEvent.CDR, + cdrJSON: cdrJSON, }); tablePagination.total += 1; if (tableState.data.length > 100) { diff --git a/src/views/dashboard/smfCDR/index.vue b/src/views/dashboard/smfCDR/index.vue index dee1bde8..222e1b47 100644 --- a/src/views/dashboard/smfCDR/index.vue +++ b/src/views/dashboard/smfCDR/index.vue @@ -287,14 +287,11 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) { type ModalStateType = { /**确定按钮 loading */ confirmLoading: boolean; - /**最大ID值 */ - maxId: number; }; /**对话框对象信息状态 */ let modalState: ModalStateType = reactive({ confirmLoading: false, - maxId: 0, }); /** @@ -396,11 +393,6 @@ function fnGetList(pageNum?: number) { return item; }); - - // 取最大值ID用作实时累加 - if (total > 0) { - modalState.maxId = Number(rows[0].id); - } } tableState.loading = false; }); @@ -487,15 +479,18 @@ function wsMessage(res: Record) { // cdrEvent CDR会话事件 if (data.groupId === `1006_${queryParams.neId}`) { const cdrEvent = data.data; + let cdrJSON = {}; + try { + cdrJSON = JSON.parse(cdrEvent.cdrJSON); + } catch (e) {} queue.add(async () => { - modalState.maxId += 1; tableState.data.unshift({ - id: modalState.maxId, + id: cdrEvent.id, neType: cdrEvent.neType, neName: cdrEvent.neName, rmUID: cdrEvent.rmUID, timestamp: cdrEvent.timestamp, - cdrJSON: cdrEvent.CDR, + cdrJSON: cdrJSON, }); tablePagination.total += 1; if (tableState.data.length > 100) { diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue index 73f606fa..3a4ae59a 100644 --- a/src/views/dashboard/smfCDRByIMSI/index.vue +++ b/src/views/dashboard/smfCDRByIMSI/index.vue @@ -505,6 +505,10 @@ function fnRealTime() { // cdrEvent CDR会话事件 if (data.groupId === `1006_${queryParams.neId}`) { const cdrEvent = data.data; + let cdrJSON: any = {}; + try { + cdrJSON = JSON.parse(cdrEvent.cdrJSON); + } catch (e) {} // 对应结束时间内 if (queryParams.endTime) { const endTime = Math.round(queryParams.endTime / 1000); @@ -512,7 +516,6 @@ function fnRealTime() { return; } } - const cdrJSON = cdrEvent.CDR; if (!cdrJSON.invocationTimestamp) { return; } diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 2b17344d..9b3d034e 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -254,14 +254,11 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) { type ModalStateType = { /**确定按钮 loading */ confirmLoading: boolean; - /**最大ID值 */ - maxId: number; }; /**对话框对象信息状态 */ let modalState: ModalStateType = reactive({ confirmLoading: false, - maxId: 0, }); /** @@ -363,11 +360,6 @@ function fnGetList(pageNum?: number) { return item; }); - - // 取最大值ID用作实时累加 - if (total > 0) { - modalState.maxId = Number(rows[0].id); - } } tableState.loading = false; }); @@ -454,15 +446,18 @@ function wsMessage(res: Record) { // cdrEvent CDR会话事件 if (data.groupId === `1007_${queryParams.neId}`) { const cdrEvent = data.data; + let cdrJSON = {}; + try { + cdrJSON = JSON.parse(cdrEvent.cdrJSON); + } catch (e) {} queue.add(async () => { - modalState.maxId += 1; tableState.data.unshift({ - id: modalState.maxId, + id: cdrEvent.id, neType: cdrEvent.neType, neName: cdrEvent.neName, rmUID: cdrEvent.rmUID, timestamp: cdrEvent.timestamp, - cdrJSON: cdrEvent.CDR, + cdrJSON: cdrJSON, }); tablePagination.total += 1; if (tableState.data.length > 100) {