From 4105f4ef3328674390b2296730b1a113d520ff90 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 8 Dec 2023 18:38:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=93=E5=AD=98=E7=BD=91=E5=85=83?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=8E=B7=E5=8F=96=E7=BA=A7=E8=81=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configManage/configParamForm/index.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/configManage/configParamForm/index.vue b/src/views/configManage/configParamForm/index.vue index d79fbe2e..12dcbfbb 100644 --- a/src/views/configManage/configParamForm/index.vue +++ b/src/views/configManage/configParamForm/index.vue @@ -19,7 +19,7 @@ import { SizeType } from 'ant-design-vue/lib/config-provider'; const { t } = useI18n(); /**网元参数 */ -let neCascaderOtions = ref[]>([]); +let neCascaderOptions = ref[]>([]); /**网元类型选择 type,id */ let neTypeSelect = ref(['', '']); @@ -989,18 +989,25 @@ onMounted(() => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.data.length > 0) { // 过滤不可用的网元 - neCascaderOtions.value = useNeInfoStore().getNeCascaderOptions.filter( + neCascaderOptions.value = useNeInfoStore().getNeCascaderOptions.filter( (item: any) => { return !['OMC'].includes(item.value); } ); + if (neCascaderOptions.value.length === 0) { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + return; + } // 默认选择AMF - const item = neCascaderOtions.value.find(s => s.value === 'AMF'); + const item = neCascaderOptions.value.find(s => s.value === 'AMF'); if (item && item.children) { const info = item.children[0]; neTypeSelect.value = [info.neType, info.neId]; } else { - const info = neCascaderOtions.value[0].children[0]; + const info = neCascaderOptions.value[0].children[0]; neTypeSelect.value = [info.neType, info.neId]; } fnGetParamConfigTopTab(); @@ -1035,7 +1042,7 @@ onMounted(() => { >