From 88d4b0cbb680ad5f301aa65245dc4d32e1f28aa0 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sat, 23 Nov 2024 16:17:27 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/dashboard/imsCDR/index.vue | 40 ++++++++++- .../views/dashboard/mmeUE/index.vue | 67 ++++++++++++++----- .../views/dashboard/smfCDR/index.vue | 43 +++++++++++- .../views/dashboard/smscCDR/index.vue | 48 +++++++++++-- src/views/dashboard/imsCDR/index.vue | 40 ++++++++++- src/views/dashboard/mmeUE/index.vue | 67 ++++++++++++++----- src/views/dashboard/smfCDR/index.vue | 43 +++++++++++- src/views/dashboard/smscCDR/index.vue | 48 +++++++++++-- 8 files changed, 348 insertions(+), 48 deletions(-) diff --git a/practical_training/views/dashboard/imsCDR/index.vue b/practical_training/views/dashboard/imsCDR/index.vue index be212ab3..3405700a 100644 --- a/practical_training/views/dashboard/imsCDR/index.vue +++ b/practical_training/views/dashboard/imsCDR/index.vue @@ -11,6 +11,7 @@ import { RESULT_CODE_SUCCESS, } from '@/constants/result-constants'; import useDictStore from '@/store/modules/dict'; +import useNeInfoStore from '@/store/modules/neinfo'; import { delIMSDataCDR, exportIMSDataCDR, @@ -37,6 +38,9 @@ let dict: { cdrCallType: [], }); +/**网元可选 */ +let neOtions = ref[]>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -464,6 +468,31 @@ onMounted(() => { if (resArr[1].status === 'fulfilled') { dict.cdrCallType = resArr[1].value; } + } + ); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'IMS') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + } }) .finally(() => { // 获取列表数据 @@ -488,6 +517,15 @@ onBeforeUnmount(() => { + + + + + { > - + diff --git a/practical_training/views/dashboard/mmeUE/index.vue b/practical_training/views/dashboard/mmeUE/index.vue index b95d71ab..b6f4f842 100644 --- a/practical_training/views/dashboard/mmeUE/index.vue +++ b/practical_training/views/dashboard/mmeUE/index.vue @@ -11,6 +11,7 @@ import { RESULT_CODE_SUCCESS, } from '@/constants/result-constants'; import useDictStore from '@/store/modules/dict'; +import useNeInfoStore from '@/store/modules/neinfo'; import { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neData/mme'; import { parseDateToStr } from '@/utils/date-utils'; import { OptionsType, WS } from '@/plugins/ws-websocket'; @@ -22,6 +23,9 @@ const { getDict } = useDictStore(); const ws = new WS(); const queue = new PQueue({ concurrency: 1, autoStart: true }); +/**网元可选 */ +let neOtions = ref[]>([]); + /**字典数据 */ let dict: { /**UE 事件认证代码类型 */ @@ -407,23 +411,47 @@ onMounted(() => { getDict('ue_auth_code'), getDict('ue_event_type'), getDict('ue_event_cm_state'), - ]) - .then(resArr => { - if (resArr[0].status === 'fulfilled') { - dict.ueAauthCode = resArr[0].value; - } - if (resArr[1].status === 'fulfilled') { - const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1])); - dict.ueEventType = ueEventType.map(item => { - if (item.value === 'cm-state') { - item.label = item.label.replace('CM', 'ECM'); + ]).then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.ueAauthCode = resArr[0].value; + } + if (resArr[1].status === 'fulfilled') { + const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1])); + dict.ueEventType = ueEventType.map(item => { + if (item.value === 'cm-state') { + item.label = item.label.replace('CM', 'ECM'); + } + return item; + }); + } + if (resArr[2].status === 'fulfilled') { + dict.ueEventCmState = resArr[2].value; + } + }); + + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'MME') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; } - return item; + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, }); } - if (resArr[2].status === 'fulfilled') { - dict.ueEventCmState = resArr[2].value; - } }) .finally(() => { // 获取列表数据 @@ -448,6 +476,15 @@ onBeforeUnmount(() => { + + + + + { > - + []>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -454,8 +458,34 @@ function wsMessage(res: Record) { } onMounted(() => { - // 获取列表数据 - fnGetList(); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'SMF') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + } + }) + .finally(() => { + // 获取列表数据 + fnGetList(); + }); }); onBeforeUnmount(() => { @@ -475,6 +505,15 @@ onBeforeUnmount(() => { + + + + + []>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -431,10 +435,33 @@ function wsMessage(res: Record) { onMounted(() => { // 初始字典数据 - Promise.allSettled([getDict('cdr_cause_code')]) - .then(resArr => { - if (resArr[0].status === 'fulfilled') { - dict.cdrCauseCode = resArr[0].value; + Promise.allSettled([getDict('cdr_cause_code')]).then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.cdrCauseCode = resArr[0].value; + } + }); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'SMSC') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } }) .finally(() => { @@ -460,6 +487,15 @@ onBeforeUnmount(() => { + + + + + { > - + @@ -625,7 +661,7 @@ onBeforeUnmount(() => { []>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -464,6 +468,31 @@ onMounted(() => { if (resArr[1].status === 'fulfilled') { dict.cdrCallType = resArr[1].value; } + } + ); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'IMS') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + } }) .finally(() => { // 获取列表数据 @@ -488,6 +517,15 @@ onBeforeUnmount(() => { + + + + + { > - + diff --git a/src/views/dashboard/mmeUE/index.vue b/src/views/dashboard/mmeUE/index.vue index b95d71ab..b6f4f842 100644 --- a/src/views/dashboard/mmeUE/index.vue +++ b/src/views/dashboard/mmeUE/index.vue @@ -11,6 +11,7 @@ import { RESULT_CODE_SUCCESS, } from '@/constants/result-constants'; import useDictStore from '@/store/modules/dict'; +import useNeInfoStore from '@/store/modules/neinfo'; import { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neData/mme'; import { parseDateToStr } from '@/utils/date-utils'; import { OptionsType, WS } from '@/plugins/ws-websocket'; @@ -22,6 +23,9 @@ const { getDict } = useDictStore(); const ws = new WS(); const queue = new PQueue({ concurrency: 1, autoStart: true }); +/**网元可选 */ +let neOtions = ref[]>([]); + /**字典数据 */ let dict: { /**UE 事件认证代码类型 */ @@ -407,23 +411,47 @@ onMounted(() => { getDict('ue_auth_code'), getDict('ue_event_type'), getDict('ue_event_cm_state'), - ]) - .then(resArr => { - if (resArr[0].status === 'fulfilled') { - dict.ueAauthCode = resArr[0].value; - } - if (resArr[1].status === 'fulfilled') { - const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1])); - dict.ueEventType = ueEventType.map(item => { - if (item.value === 'cm-state') { - item.label = item.label.replace('CM', 'ECM'); + ]).then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.ueAauthCode = resArr[0].value; + } + if (resArr[1].status === 'fulfilled') { + const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1])); + dict.ueEventType = ueEventType.map(item => { + if (item.value === 'cm-state') { + item.label = item.label.replace('CM', 'ECM'); + } + return item; + }); + } + if (resArr[2].status === 'fulfilled') { + dict.ueEventCmState = resArr[2].value; + } + }); + + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'MME') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; } - return item; + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, }); } - if (resArr[2].status === 'fulfilled') { - dict.ueEventCmState = resArr[2].value; - } }) .finally(() => { // 获取列表数据 @@ -448,6 +476,15 @@ onBeforeUnmount(() => { + + + + + { > - + []>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -454,8 +458,34 @@ function wsMessage(res: Record) { } onMounted(() => { - // 获取列表数据 - fnGetList(); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'SMF') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + } + }) + .finally(() => { + // 获取列表数据 + fnGetList(); + }); }); onBeforeUnmount(() => { @@ -475,6 +505,15 @@ onBeforeUnmount(() => { + + + + + []>([]); + /**开始结束时间 */ let queryRangePicker = ref<[string, string]>(['', '']); @@ -431,10 +435,33 @@ function wsMessage(res: Record) { onMounted(() => { // 初始字典数据 - Promise.allSettled([getDict('cdr_cause_code')]) - .then(resArr => { - if (resArr[0].status === 'fulfilled') { - dict.cdrCauseCode = resArr[0].value; + Promise.allSettled([getDict('cdr_cause_code')]).then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.cdrCauseCode = resArr[0].value; + } + }); + // 获取网元网元列表 + useNeInfoStore() + .fnNelist() + .then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + let arr: Record[] = []; + res.data.forEach(i => { + if (i.neType === 'SMSC') { + arr.push({ value: i.neId, label: i.neName }); + } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } }) .finally(() => { @@ -460,6 +487,15 @@ onBeforeUnmount(() => { + + + + + { > - + @@ -625,7 +661,7 @@ onBeforeUnmount(() => {