From 2cf363d6e8e1357462bc6480c3b3e8094d1e1c42 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 12 Apr 2023 22:13:41 +0800 Subject: [PATCH] feat: bpm api --- src/api/base/upload.ts | 3 ++- src/api/bpm/definition/index.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/api/bpm/definition/index.ts diff --git a/src/api/base/upload.ts b/src/api/base/upload.ts index 2e88b065..b8e758c9 100644 --- a/src/api/base/upload.ts +++ b/src/api/base/upload.ts @@ -2,13 +2,14 @@ import { UploadApiResult } from './model/uploadModel' import { defHttp } from '@/utils/http/axios' import { UploadFileParams } from '@/types/axios' import { useGlobSetting } from '@/hooks/setting' +import { AxiosProgressEvent } from 'axios' const { uploadUrl = '' } = useGlobSetting() /** * @description: Upload interface */ -export function uploadApi(params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) { +export function uploadApi(params: UploadFileParams, onUploadProgress: (progressEvent: AxiosProgressEvent) => void) { return defHttp.uploadFile( { url: uploadUrl, diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts new file mode 100644 index 00000000..821c2a44 --- /dev/null +++ b/src/api/bpm/definition/index.ts @@ -0,0 +1,13 @@ +import { defHttp } from '@/utils/http/axios' + +export function getProcessDefinitionPage(params) { + return defHttp.get({ url: '/bpm/process-definition/page', params }) +} + +export function getProcessDefinitionList(params) { + return defHttp.get({ url: '/bpm/process-definition/list', params }) +} + +export function getProcessDefinitionBpmnXML(id) { + return defHttp.get({ url: '/bpm/process-definition/get-bpmn-xml?id=' + id }) +}