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