属性UI(プロパティ)にチェックルール設定追加

This commit is contained in:
xiaozhe.ma
2024-08-22 17:15:49 +09:00
parent 1e3b2d6392
commit af22f6e603
18 changed files with 468 additions and 231 deletions

View File

@@ -11,7 +11,7 @@ export interface FlowEditorState {
activeNode: IActionNode | undefined;
eventTree: KintoneEventManager;
selectedEvent: IKintoneEvent | undefined;
expandedScreen: any[];
expandedScreen: string[];
}
const flowCtrl = new FlowCtrl();
const eventTree = new KintoneEventManager();
@@ -62,6 +62,10 @@ export const useFlowEditorStore = defineStore('flowEditor', {
},
selectFlow(flow: IActionFlow | undefined) {
this.selectedFlow = flow;
if(flow!==undefined){
const eventId = flow.getRoot()?.name;
this.selectedEvent=this.eventTree.findEventById(eventId) as IKintoneEvent;
}
},
setActiveNode(node: IActionNode) {
this.activeNode = node;
@@ -84,15 +88,23 @@ export const useFlowEditorStore = defineStore('flowEditor', {
if (actionFlows === undefined || actionFlows.length === 0) {
this.flows = [];
this.selectedFlow = undefined;
this.expandedScreen =[];
return;
}
this.setFlows(actionFlows);
if (actionFlows && actionFlows.length > 0) {
this.selectFlow(actionFlows[0]);
}
const expandNames = actionFlows.map((flow) => flow.getRoot()?.title);
const expandEventIds = actionFlows.map((flow) => flow.getRoot()?.name);
const expandScreens:string[]=[];
expandEventIds.forEach((eventid)=>{
const eventNode=this.eventTree.findEventById(eventid||'');
if(eventNode){
expandScreens.push(eventNode.parentId);
}
});
// const expandName =actionFlows[0].getRoot()?.title;
this.expandedScreen = expandNames;
this.expandedScreen = expandScreens;
},
/**
* フローをDBに保存及び更新する