feat:TASK617-681修正

617:属性更新時Toast表示
618:フィールドの表示件数、初期ソード順変更
その他:フローエディタの不具合修正
This commit is contained in:
xiaozhe.ma
2024-09-06 09:08:56 +09:00
parent a7783987a8
commit ad827c1dc8
10 changed files with 127 additions and 57 deletions

View File

@@ -1,6 +1,6 @@
import { defineStore } from 'pinia';
import { AppInfo, IActionFlow, IActionNode } from 'src/types/ActionTypes';
import { IKintoneEvent, KintoneEventManager } from 'src/types/KintoneEvents';
import { IKintoneEvent, KintoneEventManager, kintoneEvent } from 'src/types/KintoneEvents';
import { FlowCtrl } from '../control/flowctrl';
export interface FlowEditorState {
@@ -101,6 +101,12 @@ export const useFlowEditorStore = defineStore('flowEditor', {
const eventNode=this.eventTree.findEventById(eventid||'');
if(eventNode){
expandScreens.push(eventNode.parentId);
if(eventNode.header==='DELETABLE'){
const groupEvent = this.eventTree.findEventById(eventNode.parentId);
if(groupEvent){
expandScreens.push(groupEvent.parentId);
}
}
}
});
// const expandName =actionFlows[0].getRoot()?.title;
@@ -109,7 +115,7 @@ export const useFlowEditorStore = defineStore('flowEditor', {
/**
* フローをDBに保存及び更新する
*/
async saveFlow(flow: IActionFlow) {
async saveFlow(flow: IActionFlow):Promise<boolean> {
const root = flow.getRoot();
const isNew = flow.id === '';
const jsonData = {
@@ -123,7 +129,14 @@ export const useFlowEditorStore = defineStore('flowEditor', {
if (isNew) {
return await flowCtrl.SaveFlow(jsonData);
} else {
return await flowCtrl.UpdateFlow(jsonData);
if(flow.actionNodes.length>1){
return await flowCtrl.UpdateFlow(jsonData);
}else{
const eventId = flow.getRoot()?.name||'';
const eventNode = eventTree.findEventById(eventId) as kintoneEvent;
eventNode.flowData=undefined;
return await flowCtrl.DeleteFlow(flow.id);
}
}
},