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(); + }); });