feat(web): workflow import & export
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 13:59:45
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-03 13:59:45
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-28 16:34:15
|
||||
*/
|
||||
import { request } from '@/utils/request'
|
||||
import type { ApplicationModalData } from '@/views/ApplicationManagement/types'
|
||||
@@ -120,3 +120,15 @@ export const copyApplication = (app_id: string, new_name: string) => {
|
||||
export const getAppStatistics = (app_id: string, data: { start_date: number; end_date: number; }) => {
|
||||
return request.get(`/apps/${app_id}/statistics`, data)
|
||||
}
|
||||
// 导出工作流
|
||||
export const exportWorkflow = (app_id: string, fileName: string) => {
|
||||
return request.downloadFile(`/apps/${app_id}/workflow/export`, fileName, undefined, undefined, 'GET')
|
||||
}
|
||||
// 工作流上传+兼容性分析
|
||||
export const importWorkflow = (formData: FormData) => {
|
||||
return request.uploadFile(`/apps/workflow/import`, formData)
|
||||
}
|
||||
// 完成工作流导入
|
||||
export const completeImportWorkflow = (data: { temp_id: string; name?: string; description?: string }) => {
|
||||
return request.post(`/apps/workflow/import/save`, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user