From 7221f97139e1d798ad1651d7338fb469e399903a Mon Sep 17 00:00:00 2001 From: xue jiahao Date: Fri, 6 Dec 2024 13:04:42 +0800 Subject: [PATCH] Add save version dialog # Conflicts: # frontend/src/types/AppTypes.ts --- .../src/components/dialog/VersionInput.vue | 39 +++++++++++++++++++ frontend/src/pages/FlowChart.vue | 34 +++++++++++++++- frontend/src/types/AppTypes.ts | 27 ++++++++----- 3 files changed, 88 insertions(+), 12 deletions(-) create mode 100644 frontend/src/components/dialog/VersionInput.vue diff --git a/frontend/src/components/dialog/VersionInput.vue b/frontend/src/components/dialog/VersionInput.vue new file mode 100644 index 0000000..7e5fec2 --- /dev/null +++ b/frontend/src/components/dialog/VersionInput.vue @@ -0,0 +1,39 @@ + + diff --git a/frontend/src/pages/FlowChart.vue b/frontend/src/pages/FlowChart.vue index d0ecce1..38aeb48 100644 --- a/frontend/src/pages/FlowChart.vue +++ b/frontend/src/pages/FlowChart.vue @@ -14,6 +14,15 @@ + + + + + + 新バージョン保存 + + + @@ -75,6 +84,10 @@ + + + + (); const $q = useQuasar(); const store = useFlowEditorStore(); const authStore = useAuthStore(); @@ -117,6 +132,7 @@ const prevNodeIfo = ref({ }); // const refFlow = ref(null); const showAddAction = ref(false); +const saveVersionAction = ref(false); const drawerRight = ref(false); const filter=ref(""); const model = ref(""); @@ -177,7 +193,7 @@ const onDeleteAllNextNodes = (node: IActionNode) => { } const closeDg = (val: any) => { console.log("Dialog closed->", val); - if (val == 'OK') { + if (val == 'OK' && appDg?.value?.selected?.length > 0) { const data = appDg.value.selected[0]; const actionProps = JSON.parse(data.property); const outputPoint = JSON.parse(data.outputPoints); @@ -245,6 +261,20 @@ const onSaveActionProps=(props:IActionProperty[])=>{ } }; +const onSaveVersion = async () => { + versionInfo.value = { + id: '1' // TODO + } + saveVersionAction.value = true; + // await onSaveAllFlow(); +} + +const closeSaveVersionDg = (val: 'OK'|'CANCEL') => { + if (val == 'OK') { + console.log(versionInfo.value); + } +} + const onSaveFlow = async () => { const targetFlow = store.selectedFlow; if (targetFlow === undefined) { diff --git a/frontend/src/types/AppTypes.ts b/frontend/src/types/AppTypes.ts index 496165c..9a5eea8 100644 --- a/frontend/src/types/AppTypes.ts +++ b/frontend/src/types/AppTypes.ts @@ -1,10 +1,17 @@ -import { IUser } from './UserTypes'; - -export interface IManagedApp { - appid: string; - appname: string; - domainurl: string; - version: string; - updateuser: IUser; - update_time: string; -} +import { IUser } from './UserTypes'; + +export interface IManagedApp { + appid: string; + appname: string; + domainurl: string; + version: string; + user: IUser; + updateuser: IUser; + update_time: string; +} + +export interface IVersionInfo { + id: string; + name?: string; + desc?: string; +} \ No newline at end of file