fix: 拓扑信息首个非OMC的异常显示问题
This commit is contained in:
@@ -61,7 +61,7 @@ function fnGetList(refresh: boolean = false) {
|
||||
res.data.length > 0
|
||||
) {
|
||||
// 根网管
|
||||
let rootNodeInfo = { neName: undefined };
|
||||
let rootNodeInfo = { neName: "OMC_001" };
|
||||
const nodes = [];
|
||||
const edges = [];
|
||||
for (const item of res.data) {
|
||||
@@ -70,7 +70,7 @@ function fnGetList(refresh: boolean = false) {
|
||||
const nodeIndex = nodes.findIndex(v => v.id === item.neName);
|
||||
if (nodeIndex === -1) {
|
||||
if (item.neType === 'OMC') {
|
||||
nodes.push({
|
||||
nodes.unshift({
|
||||
id: item.neName,
|
||||
label: item.neName,
|
||||
info: item,
|
||||
@@ -120,7 +120,7 @@ function fnGetList(refresh: boolean = false) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
edges.push({
|
||||
edges.unshift({
|
||||
source: item.neName,
|
||||
target: rootNodeInfo.neName,
|
||||
label: `${item.neName}-${rootNodeInfo.neName}`,
|
||||
@@ -140,6 +140,7 @@ function fnGetList(refresh: boolean = false) {
|
||||
})
|
||||
.then(hasNeList => {
|
||||
if (!hasNeList) return;
|
||||
console.log(graphG6Data)
|
||||
if (refresh) {
|
||||
// graphG6.value.get('canvas').set('localRefresh', true);
|
||||
graphG6.value.destroy();
|
||||
|
||||
Reference in New Issue
Block a user