fix: 网元默认选择第一个

This commit is contained in:
TsMask
2023-10-23 10:54:21 +08:00
parent 8bcf6f9c45
commit 5100642c97

View File

@@ -289,14 +289,15 @@ onMounted(() => {
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.data.length > 0) {
const info = res.data[0];
state.neType = [info.neType, info.neId];
// 过滤不可用的网元
neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter(
(item: any) => {
return !['OMC'].includes(item.value);
}
);
// 默认选择第一个
const info = neCascaderOtions.value[0].children[0];
state.neType = [info.neType, info.neId];
fnGetList();
}
} else {