fix: 根据网元列表得到网元类型

This commit is contained in:
TsMask
2025-03-05 15:24:33 +08:00
parent dd9656fa72
commit b21cbb14d7

View File

@@ -70,14 +70,13 @@ const ALL_NE_TYPES = [
'mocngw', 'mocngw',
'smsc', 'smsc',
'cbc', 'cbc',
'ausf',
] as const; ] as const;
type AllChartType = (typeof ALL_NE_TYPES)[number] & string; type AllChartType = (typeof ALL_NE_TYPES)[number] & string;
console.log( neInfoStore.getNeCascaderOptions)
// 在 ALL_NE_TYPES 定义之后添加 小写转大写 // 在 ALL_NE_TYPES 定义之后添加 小写转大写
const neTypeOptions = ALL_NE_TYPES.map(type => ({ const neTypeOptions = neInfoStore.getNeCascaderOptions.map(v => ({
label: type.toUpperCase(), label: v.value,
value: type, value: v.label,
})); }));
// 使用 ref 来使 networkElementTypes 变为响应式,并使用 ALL_NE_TYPES 初始化 // 使用 ref 来使 networkElementTypes 变为响应式,并使用 ALL_NE_TYPES 初始化