|
@@ -4,14 +4,11 @@ import { computed, ref } from 'vue';
|
|
import { UABaseNode } from '@/ua/UABaseNode';
|
|
import { UABaseNode } from '@/ua/UABaseNode';
|
|
import { ReferenceTypeIds } from '@/ua/opcua_node_ids';
|
|
import { ReferenceTypeIds } from '@/ua/opcua_node_ids';
|
|
import type { UAReferenceType } from '@/ua/UAReferenceType';
|
|
import type { UAReferenceType } from '@/ua/UAReferenceType';
|
|
-import { ObjectTypeIds } from '@/ua/opcua_node_ids';
|
|
|
|
import type { UAObjectType } from '@/ua/UAObjectType';
|
|
import type { UAObjectType } from '@/ua/UAObjectType';
|
|
-import { VariableTypeIds } from '@/ua/opcua_node_ids';
|
|
|
|
import type { UAVariableType } from '@/ua/UAVariableType';
|
|
import type { UAVariableType } from '@/ua/UAVariableType';
|
|
-import { UAReference } from '@/ua/UAReference';
|
|
|
|
import { UAObject } from '@/ua/UAObject';
|
|
import { UAObject } from '@/ua/UAObject';
|
|
import { UAVariable } from '@/ua/UAVariable';
|
|
import { UAVariable } from '@/ua/UAVariable';
|
|
-import { DynamicNode, ComponentPair} from '@/ua/DynamicNode';
|
|
|
|
|
|
+import { DynamicNode} from '@/ua/DynamicNode';
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
|
|
|
@@ -40,15 +37,6 @@ let opt = {
|
|
let dynNode = new DynamicNode(opt);
|
|
let dynNode = new DynamicNode(opt);
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-function filter(fnode: UABaseNode) {
|
|
|
|
- if(selectedNode.value?.nodeClass==="Variable") {
|
|
|
|
- if(fnode.nodeClass!="Object")
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- return false;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
function getRefTypes():UABaseNode[] {
|
|
function getRefTypes():UABaseNode[] {
|
|
let list=(store.addressSpace?.getSubTreeAsList("ns=0;i="+ReferenceTypeIds.HierarchicalReferences)||[]) as UAReferenceType[];
|
|
let list=(store.addressSpace?.getSubTreeAsList("ns=0;i="+ReferenceTypeIds.HierarchicalReferences)||[]) as UAReferenceType[];
|
|
list=list.filter((node) => node.isAbstract==false)
|
|
list=list.filter((node) => node.isAbstract==false)
|
|
@@ -99,10 +87,8 @@ function getInstanceDecl(nid="ns=0;i=84"){
|
|
mr = i.getModellingRule()||"";
|
|
mr = i.getModellingRule()||"";
|
|
}
|
|
}
|
|
if(mr == "Mandatory"){
|
|
if(mr == "Mandatory"){
|
|
- const newItem = new ComponentPair(item.toNode.displayName , true);
|
|
|
|
res_man.push(item.toNode.displayName);
|
|
res_man.push(item.toNode.displayName);
|
|
}else{
|
|
}else{
|
|
- const newItem = new ComponentPair(item.toNode.displayName , false);
|
|
|
|
res_opt.push(item.toNode.displayName);
|
|
res_opt.push(item.toNode.displayName);
|
|
}
|
|
}
|
|
dynNode.mandatory = res_man;
|
|
dynNode.mandatory = res_man;
|
|
@@ -173,8 +159,6 @@ async function createDynamic() {
|
|
|
|
|
|
|
|
|
|
const checked = ref("")
|
|
const checked = ref("")
|
|
-const c_man = ref([])
|
|
|
|
-const c_opt = ref([])
|
|
|
|
const typedef = ref("")
|
|
const typedef = ref("")
|
|
|
|
|
|
|
|
|
|
@@ -260,7 +244,7 @@ const typedef = ref("")
|
|
</div>
|
|
</div>
|
|
<div class="input-group mb-3">
|
|
<div class="input-group mb-3">
|
|
<ul class="no-bullets"><b>Mandatory Components</b>
|
|
<ul class="no-bullets"><b>Mandatory Components</b>
|
|
- <li v-for="item of getComponents(typedef).mandatory">
|
|
|
|
|
|
+ <li v-for="item of getComponents(typedef).mandatory" v-bind:key = item>
|
|
<input type="checkbox" id="checkbox-digg-{{ item }}" :checked="true" :disabled="true">
|
|
<input type="checkbox" id="checkbox-digg-{{ item }}" :checked="true" :disabled="true">
|
|
<label for="checkbox-digg-{{ item}}">{{ item}}</label>
|
|
<label for="checkbox-digg-{{ item}}">{{ item}}</label>
|
|
</li>
|
|
</li>
|
|
@@ -268,7 +252,7 @@ const typedef = ref("")
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<ul class="no-bullets"><b>Optional Components</b>
|
|
<ul class="no-bullets"><b>Optional Components</b>
|
|
- <li v-for="(item1,index) of getComponents(typedef).optionals" :key="typedef">
|
|
|
|
|
|
+ <li v-for="(item1,index) of getComponents(typedef).optionals" v-bind:key = item1>
|
|
<input type="checkbox" id="checkbox-digg-{{ item1 }}" v-model="dynNode.o_check![index]" :value="item1" :checked="dynNode.o_check![index]">
|
|
<input type="checkbox" id="checkbox-digg-{{ item1 }}" v-model="dynNode.o_check![index]" :value="item1" :checked="dynNode.o_check![index]">
|
|
<label for="checkbox-digg-{{ item1 }}">{{ item1 }}</label>
|
|
<label for="checkbox-digg-{{ item1 }}">{{ item1 }}</label>
|
|
</li>
|
|
</li>
|