|
@@ -41,7 +41,7 @@ watch(selectedNode, async (newNode, _oldNode) => {
|
|
|
})
|
|
|
|
|
|
function getRefTypes():UABaseNode[] {
|
|
|
- let list=(store.addressSpace?.getSubTreeAsList("ns=0;i="+ReferenceTypeIds.HierarchicalReferences)||[]) as UAReferenceType[];
|
|
|
+ let list=(store.addressSpace?.getSubTreeAsList("i="+ReferenceTypeIds.HierarchicalReferences)||[]) as UAReferenceType[];
|
|
|
list=list.filter((node) => node.isAbstract==false)
|
|
|
return list;
|
|
|
}
|
|
@@ -52,21 +52,21 @@ function getObjTypes(nid: string):UABaseNode[] {
|
|
|
}
|
|
|
|
|
|
function getInstanceDecl(nid: string, mrType: string){
|
|
|
- const aggregates = (store.addressSpace?.getSubTreeAsList("ns=0;i="+ReferenceTypeIds.Aggregates)||[]) as UABaseNode[];
|
|
|
+ const aggregates = (store.addressSpace?.getSubTreeAsList("i="+ReferenceTypeIds.Aggregates)||[]) as UABaseNode[];
|
|
|
let aggStrings:String[] = [];
|
|
|
aggregates.forEach((item) => {
|
|
|
aggStrings.push(item.browseName);
|
|
|
})
|
|
|
let node = (store.addressSpace?.findNode(nid)) as UABaseNode;
|
|
|
let res:string[] = [];
|
|
|
- node.references.forEach((item) => {
|
|
|
+ for(const item of node.references) {
|
|
|
if(aggStrings.includes(item.referenceType) && item.isForward){
|
|
|
let mr = item.toNode.getModellingRule()||"";
|
|
|
if(mr == mrType){
|
|
|
- res.push(item.toNode.browseName||"");
|
|
|
+ res.push(item.toNode.browseName);
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
|