条件エディタ追加

This commit is contained in:
2024-01-22 10:52:55 +09:00
parent 276e5e9122
commit 5cd6d02f6e
29 changed files with 1209 additions and 382 deletions

View File

@@ -92,6 +92,9 @@ const addActionNode=(action:IActionNode)=>{
}
const addNode=(node:IActionNode,inputPoint:string)=>{
if(drawerRight.value){
drawerRight.value=false;
}
showAddAction.value=true;
prevNodeIfo.value.prevNode=node;
prevNodeIfo.value.inputPoint=inputPoint;
@@ -112,19 +115,28 @@ const onNodeEdit=(node:IActionNode)=>{
const onDeleteNode=(node:IActionNode)=>{
if(!store.currentFlow) return;
//右パネルが開いている場合、自動閉じる
if(drawerRight.value && state.activeNode.id===node.id){
drawerRight.value=false;
}
store.currentFlow?.removeNode(node);
}
const onDeleteAllNextNodes=(node:IActionNode)=>{
if(!store.currentFlow) return;
//右パネルが開いている場合、自動閉じる
if(drawerRight.value){
drawerRight.value=false;
}
store.currentFlow?.removeAllNext(node.id);
}
const closeDg=(val :any)=>{
console.log("Dialog closed->",val);
if (val == 'OK') {
const data = appDg.value.selected[0];
const actionProps=JSON.parse(data.content);
const action = new ActionNode(data.name,data.desc,"",[],actionProps);
const actionProps=JSON.parse(data.property);
const outputPoint =JSON.parse(data.outputPoints);
const action = new ActionNode(data.name,data.desc,"",outputPoint,actionProps);
store.currentFlow?.addNode(action, prevNodeIfo.value.prevNode,prevNodeIfo.value.inputPoint);
}
}