add app dialog

This commit is contained in:
2023-09-30 13:12:08 +09:00
parent 4c6b2ea844
commit 461cd26690
8 changed files with 88 additions and 36 deletions

View File

@@ -28,11 +28,6 @@
<q-page>
<div class="q-pa-md q-gutter-sm">
<!-- <q-layout
container
class="flow-container shadow-2 rounded-borders"
> -->
<div class="flowchart" v-if="store.currentFlow">
<node-item v-for="(node,) in store.currentFlow.actionNodes" :key="node.id"
:isSelected="node===state.activeNode" :actionNode="node"
@@ -43,13 +38,12 @@
@deleteAllNextNodes="onDeleteAllNextNodes"
></node-item>
</div>
<!-- </q-layout> -->
</div>
</q-page>
<PropertyPanel :actionNode="state.activeNode" v-model:drawerRight="drawerRight"></PropertyPanel>
<show-dialog v-model:visible="showAddAction" name="アクション" @close="closeDg">
<action-select ref="appDg" name="アクション" type="single"></action-select>
</show-dialog>
<ShowDialog v-model:visible="showAddAction" name="アクション" @close="closeDg">
<action-select ref="appDg" name="model" type="single"></action-select>
</ShowDialog>
</template>
@@ -64,7 +58,7 @@ import ActionSelect from 'components/ActionSelect.vue';
import PropertyPanel from 'components/right/PropertyPanel.vue';
import AppSelector from 'components/left/AppSelector.vue';
import EventTree from 'components/left/EventTree.vue';
import {FlowCtrl } from '../control/flowctrl'
import {FlowCtrl } from '../control/flowctrl';
const drawerLeft = ref(true);
const store = useFlowEditorStore();
@@ -76,13 +70,13 @@ const state=reactive({
})
const appDg = ref();
const prevNodeIfo=ref({
prevNode:{},
prevNode:{} as IActionNode,
inputPoint:""
});
const refFlow = ref<ActionFlow|null>(null);
const showAddAction=ref(false);
const drawerRight=ref(false);
const model=ref("");
const addActionNode=(action:IActionNode)=>{
// refFlow.value?.actionNodes.push(action);
store.currentFlow?.actionNodes.push(action);
@@ -128,7 +122,8 @@ const closeDg=(val :any)=>{
const fetchData= async ()=>{
const flowCtrl = new FlowCtrl();
const actionFlows = await flowCtrl.getFlows("1");
if(store.appInfo===undefined) return;
const actionFlows = await flowCtrl.getFlows(store.appInfo?.appId);
if(actionFlows && actionFlows.length>0){
store.setFlows(actionFlows);
}