fix: 标签名称修改导致全局标签
This commit is contained in:
@@ -225,11 +225,19 @@ onMounted(() => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.data.length > 0) {
|
||||
// 过滤不可用的网元
|
||||
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return ['AMF', 'MME'].includes(item.value);
|
||||
for (const item of neInfoStore.getNeCascaderOptions) {
|
||||
if (!['AMF', 'MME'].includes(item.value)) continue;
|
||||
const v = JSON.parse(JSON.stringify(item));
|
||||
|
||||
if (v.label === 'AMF') {
|
||||
v.label = '5G';
|
||||
}
|
||||
);
|
||||
if (v.label === 'MME') {
|
||||
v.label = '4G';
|
||||
}
|
||||
neCascaderOptions.value.push(v);
|
||||
}
|
||||
|
||||
if (neCascaderOptions.value.length === 0) {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
@@ -238,14 +246,8 @@ onMounted(() => {
|
||||
return;
|
||||
}
|
||||
|
||||
neCascaderOptions.value.forEach((item: any) => {
|
||||
if (item.label === 'AMF') {
|
||||
item.label = '5G';
|
||||
} else if (item.label === 'MME') item.label = '4G';
|
||||
});
|
||||
|
||||
// 无查询参数neType时 默认选择AMF
|
||||
const queryNeType = (route.query.neType as string) || 'AMF';
|
||||
const queryNeType = (route.query.neType as string) || '5G';
|
||||
const item = neCascaderOptions.value.find(
|
||||
s => s.value === queryNeType
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user