From 6d5b9f417c357b9880f6147674a349e5a045f72b Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 14 May 2024 17:24:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E6=B7=BB=E5=8A=A0SMSC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configManage/neManage.ts | 23 +++---------------- src/api/index.ts | 23 ++++--------------- src/constants/ne-constants.ts | 8 ++++--- src/router/index.ts | 2 +- src/views/ne/neConfPara5G/index.vue | 8 +++++++ .../components/NeInfoConfigPara5G.vue | 8 +++++++ 6 files changed, 29 insertions(+), 43 deletions(-) diff --git a/src/api/configManage/neManage.ts b/src/api/configManage/neManage.ts index bceb4887..d7b980b7 100644 --- a/src/api/configManage/neManage.ts +++ b/src/api/configManage/neManage.ts @@ -5,6 +5,7 @@ import { } from '@/constants/result-constants'; import { language, request } from '@/plugins/http-fetch'; import { parseObjLineToHump } from '@/utils/parse-utils'; +import { NE_TYPE_LIST } from '@/constants/ne-constants'; /** * 查询网元列表 @@ -15,24 +16,6 @@ export async function listNeInfo(query: Record) { let totalSQL = 'select count(*) as total from ne_info where 1=1 '; let rowsSQL = 'select * from ne_info where 1=1 '; - // 系统特定顺序 - const specificOrder = [ - 'OMC', - 'MME', - 'AMF', - 'AUSF', - 'UDM', - 'SMF', - 'PCF', - 'UPF', - 'NRF', - 'NSSF', - 'IMS', - 'N3IWF', - 'NEF', - 'LMF', - ]; - // 查询 let querySQL = ''; if (query.neType) { @@ -70,8 +53,8 @@ export async function listNeInfo(query: Record) { data.rows = itemData.map(v => parseObjLineToHump(v)); //通过sort进行冒泡排序 data.rows.sort((a: any, b: any) => { - const typeA = specificOrder.indexOf(a.neType); - const typeB = specificOrder.indexOf(b.neType); + const typeA = NE_TYPE_LIST.indexOf(a.neType); + const typeB = NE_TYPE_LIST.indexOf(b.neType); if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面 if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面 return typeA - typeB; diff --git a/src/api/index.ts b/src/api/index.ts index eb4f5c4f..a1ea8b3b 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,29 +1,14 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { request } from '@/plugins/http-fetch'; import { parseDateToStr } from '@/utils/date-utils'; +import { NE_TYPE_LIST } from '@/constants/ne-constants'; + /** * 查询公告列表 * @param query 查询参数 * @returns object */ export async function listMain() { - // 系统特定顺序 - const specificOrder = [ - 'OMC', - 'MME', - 'AMF', - 'AUSF', - 'UDM', - 'SMF', - 'PCF', - 'UPF', - 'NRF', - 'NSSF', - 'IMS', - 'N3IWF', - 'NEF', - 'LMF', - ]; const result = await request({ url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState', method: 'get', @@ -66,8 +51,8 @@ export async function listMain() { }); //通过sort进行冒泡排序 mergedData.sort((a: any, b: any) => { - const typeA = specificOrder.indexOf(a.name.split('_')[0]); - const typeB = specificOrder.indexOf(b.name.split('_')[0]); + const typeA = NE_TYPE_LIST.indexOf(a.name.split('_')[0]); + const typeB = NE_TYPE_LIST.indexOf(b.name.split('_')[0]); if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面 if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面 return typeA - typeB; diff --git a/src/constants/ne-constants.ts b/src/constants/ne-constants.ts index 9e3c64a6..79e02187 100644 --- a/src/constants/ne-constants.ts +++ b/src/constants/ne-constants.ts @@ -7,11 +7,13 @@ export const NE_TYPE_LIST = [ 'UDM', 'SMF', 'PCF', - 'UPF', - 'NRF', 'NSSF', - 'N3IWF', + 'NRF', + 'UPF', + 'LMF', + 'NEF', 'MME', + 'N3IWF', 'MOCNGW', 'SMSC', ]; diff --git a/src/router/index.ts b/src/router/index.ts index 26278fca..c7664ab9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -159,7 +159,7 @@ router.beforeEach(async (to, from, next) => { if (!appStore.loginBackground) { await appStore.fnSysConf(); } - console.log(to.path); + // 需要系统引导跳转 if (appStore.bootloader && to.path !== '/quick-start') { next({ name: 'QuickStart' }); diff --git a/src/views/ne/neConfPara5G/index.vue b/src/views/ne/neConfPara5G/index.vue index 6eb692c7..5eb7c7cb 100644 --- a/src/views/ne/neConfPara5G/index.vue +++ b/src/views/ne/neConfPara5G/index.vue @@ -65,6 +65,8 @@ let state: StateType = reactive({ nssf_ip: '172.60.5.170', nrf_ip: '172.60.5.180', upf_ip: '172.60.5.190', + lmf_ip: '172.60.5.200', + nef_ip: '172.60.5.210', mme_ip: '172.60.5.220', n3iwf_ip: '172.60.5.230', }, @@ -154,6 +156,12 @@ function fnGetData() { case 'UPF': state.from.sbi.upf_ip = item.ip; break; + case 'LMF': + state.from.sbi.lmf_ip = item.ip; + break; + case 'NEF': + state.from.sbi.nef_ip = item.ip; + break; case 'MME': state.from.sbi.mme_ip = item.ip; break; diff --git a/src/views/system/quick-start/components/NeInfoConfigPara5G.vue b/src/views/system/quick-start/components/NeInfoConfigPara5G.vue index 2da05c45..b2b86849 100644 --- a/src/views/system/quick-start/components/NeInfoConfigPara5G.vue +++ b/src/views/system/quick-start/components/NeInfoConfigPara5G.vue @@ -57,6 +57,8 @@ let state: StateType = reactive({ nssf_ip: '172.60.5.170', nrf_ip: '172.60.5.180', upf_ip: '172.60.5.190', + lmf_ip: '172.60.5.200', + nef_ip: '172.60.5.210', mme_ip: '172.60.5.220', n3iwf_ip: '172.60.5.230', }, @@ -135,6 +137,12 @@ function fnGetList() { case 'UPF': state.from.sbi.upf_ip = item.ip; break; + case 'LMF': + state.from.sbi.lmf_ip = item.ip; + break; + case 'NEF': + state.from.sbi.nef_ip = item.ip; + break; case 'MME': state.from.sbi.mme_ip = item.ip; break;