fix: 网元默认选择第一个
This commit is contained in:
@@ -288,15 +288,16 @@ onMounted(() => {
|
|||||||
.fnNelist()
|
.fnNelist()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
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) {
|
||||||
const info = res.data[0];
|
|
||||||
state.neType = [info.neType, info.neId];
|
|
||||||
// 过滤不可用的网元
|
// 过滤不可用的网元
|
||||||
neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter(
|
neCascaderOtions.value = useNeInfoStore().getNeCascaderOtions.filter(
|
||||||
(item: any) => {
|
(item: any) => {
|
||||||
return !['OMC'].includes(item.value);
|
return !['OMC'].includes(item.value);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// 默认选择第一个
|
||||||
|
const info = neCascaderOtions.value[0].children[0];
|
||||||
|
state.neType = [info.neType, info.neId];
|
||||||
fnGetList();
|
fnGetList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user