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 @@