From a2a4e49692bf8a406fad627d9be1dd3253cd0c6e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 31 Oct 2023 20:14:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20MML=E7=BD=91=E5=85=83=E6=93=8D=E4=BD=9C/?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE=E9=BB=98=E8=AE=A4=E9=A6=96?= =?UTF-8?q?=E4=B8=AA=E9=80=89AMF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/configManage/configParam/index.vue | 23 ++++++++++++++------ src/views/mmlManage/neOperate/index.vue | 11 +++++----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index 976c6d68..aaa0d329 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -19,6 +19,9 @@ import { toRaw } from 'vue'; import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils'; const { t } = useI18n(); +/**网元参数 */ +let neCascaderOtions = ref[]>([]); + /**网元类型选择 type,id */ let neTypeSelect = ref(['', '']); @@ -1007,8 +1010,18 @@ onMounted(() => { .then(res => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.data.length > 0) { - const item = res.data.find(s => s.neType === 'AMF'); - neTypeSelect.value = [item.neType, item.neId]; + // 过滤不可用的网元 + neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter( + (item: any) => { + return !['OMC'].includes(item.value); + } + ); + // 默认选择AMF + const item = neCascaderOtions.value.find(s => s.value === 'AMF'); + if (item) { + const info = item.children[0]; + neTypeSelect.value = [info.neType, info.neId]; + } fnGetParamConfigTopTab(); } } else { @@ -1034,11 +1047,7 @@ onMounted(() => { { .fnNelist() .then(res => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { - if (res.data.length > 0) { + if (res.data.length > 0) { // 过滤不可用的网元 neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter( (item: any) => { @@ -296,10 +296,11 @@ onMounted(() => { } ); // 默认选择AMF - const item = res.data.find(s => s.neType === 'AMF'); - state.neType = [item.neType, item.neId]; - // const info = neCascaderOtions.value[0].children[0]; - // state.neType = [info.neType, info.neId]; + const item = neCascaderOtions.value.find(s => s.value === 'AMF'); + if (item) { + const info = item.children[0]; + state.neType = [info.neType, info.neId]; + } fnGetList(); } } else {