| | |
| | | default: false, |
| | | }, |
| | | }); |
| | | const emit = defineEmits(['export']); |
| | | const emit = defineEmits(['export','saveClick']); |
| | | const { toObject, fromObject, nodes, edges, removeEdges, removeNodes } = useVueFlow(); |
| | | const { files, open, reset, onCancel, onChange } = useFileDialog({ |
| | | // accept: 'image/*', // Set to accept only image files |
| | |
| | | const obj = toObject(); |
| | | const jsonStr = obj ? JSONFormat(obj) : ''; |
| | | |
| | | const res = await update_workflow_json_flow({ |
| | | agent_id: props.queryId, |
| | | json_flow: jsonStr, |
| | | }); |
| | | ElMessage.success('保存成功!'); |
| | | |
| | | emit('saveClick',jsonStr); |
| | | }; |
| | | |
| | | onChange((file) => { |