From 3a9c651c285cb6a5a4f6906d645a6c81791fa24c Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Sun, 10 Sep 2023 13:29:33 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=96=B0=E5=A2=9E=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8E=E8=A1=A8=E5=8D=95=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/form/types.ts | 2 + src/api/workflow/formDefinition/index.ts | 63 ++++++++ src/api/workflow/formDefinition/types.ts | 101 +++++++++++++ src/api/workflow/processDefinition/index.ts | 11 ++ src/views/workflow/form/index.vue | 155 ++++++++++++++++++-- 5 files changed, 319 insertions(+), 13 deletions(-) create mode 100644 src/api/workflow/formDefinition/index.ts create mode 100644 src/api/workflow/formDefinition/types.ts diff --git a/src/api/workflow/form/types.ts b/src/api/workflow/form/types.ts index 43c21e5..5067732 100644 --- a/src/api/workflow/form/types.ts +++ b/src/api/workflow/form/types.ts @@ -3,6 +3,7 @@ export interface FormVO extends BaseEntity { formName: string; formConfig: string; content: string; + status?: string; remark: string; } @@ -11,6 +12,7 @@ export interface FormForm { formName: string; formConfig?: string; content?: string; + status?: string; remark: string; } diff --git a/src/api/workflow/formDefinition/index.ts b/src/api/workflow/formDefinition/index.ts new file mode 100644 index 0000000..b51afa9 --- /dev/null +++ b/src/api/workflow/formDefinition/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { FormDefinitionVO, FormDefinitionForm, FormDefinitionQuery } from '@/api/workflow/formDefinition/types'; + +/** + * 查询动态单与流程定义关联信息列表 + * @param query + * @returns {*} + */ + +export const listFormDefinition = (query?: FormDefinitionQuery): AxiosPromise => { + return request({ + url: '/workflow/formDefinition/list', + method: 'get', + params: query + }); +}; + +/** + * 查询动态单与流程定义关联信息详细 + * @param id + */ +export const getFormDefinition = (id: string | number): AxiosPromise => { + return request({ + url: '/workflow/formDefinition/' + id, + method: 'get' + }); +}; + +/** + * 新增动态单与流程定义关联信息 + * @param data + */ +export const addFormDefinition = (data: FormDefinitionForm) => { + return request({ + url: '/workflow/formDefinition', + method: 'post', + data: data + }); +}; + +/** + * 修改动态单与流程定义关联信息 + * @param data + */ +export const updateFormDefinition = (data: FormDefinitionForm) => { + return request({ + url: '/workflow/formDefinition', + method: 'put', + data: data + }); +}; + +/** + * 删除动态单与流程定义关联信息 + * @param id + */ +export const delFormDefinition = (id: string | number | Array) => { + return request({ + url: '/workflow/formDefinition/' + id, + method: 'delete' + }); +}; diff --git a/src/api/workflow/formDefinition/types.ts b/src/api/workflow/formDefinition/types.ts new file mode 100644 index 0000000..ab489aa --- /dev/null +++ b/src/api/workflow/formDefinition/types.ts @@ -0,0 +1,101 @@ +export interface FormDefinitionVO { + /** + * 主键 + */ + id: string | number; + + /** + * 动态表单id + */ + formId: string | number; + + /** + * 流程定义id + */ + processDefinitionKey: string; + + /** + * 流程定义名称 + */ + processDefinitionName: string; + + /** + * 流程定义id + */ + processDefinitionId: string | number; + + /** + * 流程定义版本 + */ + processDefinitionVersion: number; + +} + +export interface FormDefinitionForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 动态表单id + */ + formId?: string | number; + + /** + * 流程定义id + */ + processDefinitionKey?: string; + + /** + * 流程定义名称 + */ + processDefinitionName?: string; + + /** + * 流程定义id + */ + processDefinitionId?: string | number; + + /** + * 流程定义版本 + */ + processDefinitionVersion?: number; + +} + +export interface FormDefinitionQuery extends PageQuery { + + /** + * 动态表单id + */ + formId?: string | number; + + /** + * 流程定义id + */ + processDefinitionKey?: string; + + /** + * 流程定义名称 + */ + processDefinitionName?: string; + + /** + * 流程定义id + */ + processDefinitionId?: string | number; + + /** + * 流程定义版本 + */ + processDefinitionVersion?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/workflow/processDefinition/index.ts b/src/api/workflow/processDefinition/index.ts index e49f9e4..b8f326a 100644 --- a/src/api/workflow/processDefinition/index.ts +++ b/src/api/workflow/processDefinition/index.ts @@ -109,3 +109,14 @@ export const migrationProcessDefinition = (currentProcessDefinitionId: string, f method: 'put' }); }; + +/** + * 查询流程定义列表 + * @returns + */ +export const getProcessDefinitionList = () => { + return request({ + url: `/workflow/processDefinition/getProcessDefinitionList`, + method: 'get' + }); +}; diff --git a/src/views/workflow/form/index.vue b/src/views/workflow/form/index.vue index b5eb6f8..b2336ef 100644 --- a/src/views/workflow/form/index.vue +++ b/src/views/workflow/form/index.vue @@ -1,6 +1,7 @@