fix: 开站网元信息无终端配置时不显示,没有则新建个默认的占位
This commit is contained in:
@@ -313,16 +313,19 @@ function fnGetList() {
|
||||
listAllNeInfo({
|
||||
bandHost: true,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
for (const item of res.data) {
|
||||
if (item.neType === 'OMC') continue;
|
||||
if (item.neType === 'OMC' || !Array.isArray(item.hosts)) continue;
|
||||
tabState.panes.push({
|
||||
key: `${item.neType}@${item.neId}`,
|
||||
data: item,
|
||||
status: false,
|
||||
});
|
||||
}
|
||||
// 没有终端信息时,新建一个占位
|
||||
if (tabState.panes.length === 0) {
|
||||
fnTabCreate();
|
||||
}
|
||||
// 选择首个
|
||||
if (tabState.panes.length > 0) {
|
||||
tabState.activeKey = tabState.panes[0].key;
|
||||
|
||||
Reference in New Issue
Block a user