diff --git a/apps/web-antd/src/api/bpm/definition/index.ts b/apps/web-antd/src/api/bpm/definition/index.ts index 562b0009..2dc9f625 100644 --- a/apps/web-antd/src/api/bpm/definition/index.ts +++ b/apps/web-antd/src/api/bpm/definition/index.ts @@ -4,6 +4,7 @@ import { requestClient } from '#/api/request'; /** 流程定义 */ export namespace BpmProcessDefinitionApi { + // 流程定义 export interface ProcessDefinitionVO { id: string; version: number; diff --git a/apps/web-antd/src/api/bpm/form/index.ts b/apps/web-antd/src/api/bpm/form/index.ts index 581178c5..78ce4d6d 100644 --- a/apps/web-antd/src/api/bpm/form/index.ts +++ b/apps/web-antd/src/api/bpm/form/index.ts @@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace BpmFormApi { - // TODO @siye:注释加一个。。嘿嘿 + // 流程表单 export interface FormVO { id?: number | undefined; name: string; @@ -11,7 +11,7 @@ export namespace BpmFormApi { fields: string[]; status: number; remark: string; - createTime: string; + createTime: number; } } @@ -23,7 +23,7 @@ export async function getFormPage(params: PageParam) { } /** 获取表单详情 */ -export async function getFormDetail(id: number) { +export async function getFormDetail(id: number | string) { return requestClient.get(`/bpm/form/get?id=${id}`); } diff --git a/apps/web-antd/src/api/bpm/processInstance/index.ts b/apps/web-antd/src/api/bpm/processInstance/index.ts index 23afa8c3..70d21846 100644 --- a/apps/web-antd/src/api/bpm/processInstance/index.ts +++ b/apps/web-antd/src/api/bpm/processInstance/index.ts @@ -40,6 +40,7 @@ export namespace BpmProcessInstanceApi { tasks: ApprovalTaskInfo[]; }; + // 流程实例 export type ProcessInstanceVO = { businessKey: string; category: string; @@ -59,6 +60,7 @@ export namespace BpmProcessInstanceApi { tasks?: BpmProcessInstanceApi.Task[]; }; + // 审批详情 export type ApprovalDetail = { activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; formFieldsPermission: any; @@ -66,6 +68,25 @@ export namespace BpmProcessInstanceApi { processInstance: BpmProcessInstanceApi.ProcessInstanceVO; status: number; }; + + // 抄送流程实例 VO + export type CopyVO = { + id: number; + startUser: User; + processInstanceId: string; + processInstanceName: string; + processInstanceStartTime: number; + activityId: string; + activityName: string; + taskId: string; + reason: string; + createUser: User; + createTime: number; + summary: { + key: string; + value: string; + }[]; + }; } /** 查询我的流程实例分页 */ diff --git a/apps/web-antd/src/api/bpm/task/index.ts b/apps/web-antd/src/api/bpm/task/index.ts index 4054b8f6..629f25eb 100644 --- a/apps/web-antd/src/api/bpm/task/index.ts +++ b/apps/web-antd/src/api/bpm/task/index.ts @@ -1,5 +1,7 @@ import type { PageParam, PageResult } from '@vben/request'; +import type { BpmProcessInstanceApi } from '../processInstance'; + import { requestClient } from '#/api/request'; export namespace BpmTaskApi { @@ -11,7 +13,33 @@ export namespace BpmTaskApi { status: number; // 监听器状态 event: string; // 监听事件 valueType: string; // 监听器值类型 - value: string; // 监听器值 + } + + // 流程任务 VO + export interface TaskManagerVO { + id: string; // 编号 + name: string; // 任务名称 + createTime: number; // 创建时间 + endTime: number; // 结束时间 + durationInMillis: number; // 持续时间 + status: number; // 状态 + reason: string; // 原因 + ownerUser: any; // 负责人 + assigneeUser: any; // 处理人 + taskDefinitionKey: string; // 任务定义key + processInstanceId: string; // 流程实例id + processInstance: BpmProcessInstanceApi.ProcessInstanceVO; // 流程实例 + parentTaskId: any; // 父任务id + children: any; // 子任务 + formId: any; // 表单id + formName: any; // 表单名称 + formConf: any; // 表单配置 + formFields: any; // 表单字段 + formVariables: any; // 表单变量 + buttonsSetting: any; // 按钮设置 + signEnable: any; // 签名设置 + reasonRequire: any; // 原因设置 + nodeType: any; // 节点类型 } } diff --git a/apps/web-antd/src/router/routes/modules/bpm.ts b/apps/web-antd/src/router/routes/modules/bpm.ts index 215ab26a..8773271b 100644 --- a/apps/web-antd/src/router/routes/modules/bpm.ts +++ b/apps/web-antd/src/router/routes/modules/bpm.ts @@ -49,7 +49,7 @@ const routes: RouteRecordRaw[] = [ { path: '/bpm/manager/form/edit', name: 'BpmFormEditor', - component: () => import('#/views/bpm/form/editor.vue'), + component: () => import('#/views/bpm/form/designer/index.vue'), meta: { title: '编辑流程表单', activePath: '/bpm/manager/form', diff --git a/apps/web-antd/src/utils/formCreate.ts b/apps/web-antd/src/utils/formCreate.ts index 1129f63f..60264934 100644 --- a/apps/web-antd/src/utils/formCreate.ts +++ b/apps/web-antd/src/utils/formCreate.ts @@ -34,7 +34,7 @@ export const decodeFields = (fields: string[]) => { export const setConfAndFields = ( designerRef: object, conf: string, - fields: string, + fields: string | string[], ) => { // @ts-ignore designerRef.value is dynamically added by form-create-designer designerRef.value.setOption(JSON.parse(conf)); diff --git a/apps/web-antd/src/views/bpm/category/index.vue b/apps/web-antd/src/views/bpm/category/index.vue index da7d694e..8dd26b7c 100644 --- a/apps/web-antd/src/views/bpm/category/index.vue +++ b/apps/web-antd/src/views/bpm/category/index.vue @@ -6,11 +6,13 @@ import type { import type { BpmCategoryApi } from '#/api/bpm/category'; import { Page, useVbenModal } from '@vben/common-ui'; +import { Plus } from '@vben/icons'; import { Button, message } from 'ant-design-vue'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { deleteCategory, getCategoryPage } from '#/api/bpm/category'; +import { DocAlert } from '#/components/doc-alert'; import { $t } from '#/locales'; import { useGridColumns, useGridFormSchema } from './data'; @@ -100,6 +102,10 @@ async function onDelete(row: BpmCategoryApi.CategoryVO) {