From 20b8531dc81f1bc68b2f7a4a4278aa104b1ecca1 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 2 Jul 2025 10:02:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B7=9F=E8=B8=AA=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E7=BD=91=E5=85=83=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/traceManage/task/index.vue | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/views/traceManage/task/index.vue b/src/views/traceManage/task/index.vue index f4fec982..34341a1b 100644 --- a/src/views/traceManage/task/index.vue +++ b/src/views/traceManage/task/index.vue @@ -612,21 +612,35 @@ onMounted(() => { } ); + // 目前支持的 'AMF', 'AUSF', 'SMF', 'UDM', 'PCF', 'UPF' // 获取网元网元列表 - neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter( - (item: any) => { - return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF', 'UPF'].includes(item.value); // 过滤不可用的网元 + neInfoStore.fnNelist().then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + if (res.data.length > 0) { + neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter( + (item: any) => { + return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF', 'UPF'].includes( + item.value + ); // 过滤不可用的网元 + } + ); + if (neCascaderOptions.value.length === 0) { + message.warning({ + content: t('common.noData'), + duration: 3, + }); + return; + } + // 获取列表数据 + fnGetList(); + } + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } - ); - if (neCascaderOptions.value.length === 0) { - message.warning({ - content: t('common.noData'), - duration: 3, - }); - return; - } - // 获取列表数据 - fnGetList(); + }); });