diff --git a/src/api/neData/smf.ts b/src/api/neData/smf.ts index a7d8c3c0..05050abc 100644 --- a/src/api/neData/smf.ts +++ b/src/api/neData/smf.ts @@ -10,6 +10,7 @@ export function listSMFDataCDR(query: Record) { url: '/neData/smf/cdr/list', method: 'get', params: query, + timeout: 60_000, }); } diff --git a/src/utils/parse-utils.ts b/src/utils/parse-utils.ts index e091aa8e..49a89ddd 100644 --- a/src/utils/parse-utils.ts +++ b/src/utils/parse-utils.ts @@ -171,8 +171,8 @@ export function parseSizeFromKbs(sizeByte: number, timeInterval: number): any { } /** - * 字节数转换单位 - * @param bits 字节Bit大小 64009540 = 512.08 MB + * 位数据转换单位 + * @param bits 位Bit大小 64009540 = 512.08 MB * @returns xx B / KB / MB / GB / TB / PB / EB / ZB / YB */ export function parseSizeFromBits(bits: number | string): string { @@ -181,7 +181,28 @@ export function parseSizeFromBits(bits: number | string): string { bits = bits * 8; const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; const unitIndex = Math.floor(Math.log2(bits) / 10); - const value = (bits / Math.pow(1000, unitIndex)).toFixed(2); + const value = bits / Math.pow(1000, unitIndex); const unti = units[unitIndex]; + if (unitIndex > 0) { + return `${value.toFixed(2)} ${unti}`; + } + return `${value} ${unti}`; +} + +/** + * 字节数转换单位 + * @param byte 字节Byte大小 64009540 = 512.08 MB + * @returns xx B / KB / MB / GB / TB / PB / EB / ZB / YB + */ +export function parseSizeFromByte(byte: number | string): string { + byte = Number(byte) || 0; + if (byte <= 0) return '0 B'; + const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + const unitIndex = Math.floor(Math.log2(byte) / 10); + const unti = units[unitIndex]; + const value = byte / Math.pow(1000, unitIndex); + if (unitIndex > 0) { + return `${value.toFixed(2)} ${unti}`; + } return `${value} ${unti}`; } diff --git a/src/views/dashboard/smfCDR/index.vue b/src/views/dashboard/smfCDR/index.vue index 727f262f..b9e41b1c 100644 --- a/src/views/dashboard/smfCDR/index.vue +++ b/src/views/dashboard/smfCDR/index.vue @@ -88,7 +88,7 @@ let tableState: TabeStateType = reactive({ }); /**表格字段列 */ -let tableColumns: ColumnsType = [ +let tableColumns = ref([ { title: t('common.rowId'), dataIndex: 'id', @@ -225,7 +225,7 @@ let tableColumns: ColumnsType = [ key: 'id', align: 'left', }, -]; +]); /**表格分页器参数 */ let tablePagination = reactive({ @@ -780,14 +780,14 @@ onBeforeUnmount(() => {
-
RatingGroup: {{ u.ratingGroup }}
+
- +
Data Total Volume: @@ -801,10 +801,10 @@ onBeforeUnmount(() => { Data Volume Uplink: {{ udata.dataVolumeUplink }}
-
+
diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue new file mode 100644 index 00000000..976940e3 --- /dev/null +++ b/src/views/dashboard/smfCDRByIMSI/index.vue @@ -0,0 +1,664 @@ + + + + +