fix: MML网元操作/参数配置默认首个选AMF
This commit is contained in:
@@ -288,7 +288,7 @@ onMounted(() => {
|
||||
.fnNelist()
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.data.length > 0) {
|
||||
if (res.data.length > 0) {
|
||||
// 过滤不可用的网元
|
||||
neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter(
|
||||
(item: any) => {
|
||||
@@ -296,10 +296,11 @@ onMounted(() => {
|
||||
}
|
||||
);
|
||||
// 默认选择AMF
|
||||
const item = res.data.find(s => s.neType === 'AMF');
|
||||
state.neType = [item.neType, item.neId];
|
||||
// const info = neCascaderOtions.value[0].children[0];
|
||||
// state.neType = [info.neType, info.neId];
|
||||
const item = neCascaderOtions.value.find(s => s.value === 'AMF');
|
||||
if (item) {
|
||||
const info = item.children[0];
|
||||
state.neType = [info.neType, info.neId];
|
||||
}
|
||||
fnGetList();
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user