@@ -243,33 +244,24 @@ watch(visible, () => {
-
+
- {{ flowCodeTypeRecord[model.flowCode] || '-' }}
+ {{ flowCodeTypeRecord[model.flowCode] }}
- {{ leaveTypeRecord[model.leaveType!] || '-' }}
+ {{ leaveTypeRecord[model.leaveType!] }}
- {{ model.startDate ? `${model.startDate} 至 ${model.endDate}` : '-' }}
+ {{ `${model.startDate} 至 ${model.endDate}` }}
- {{ model.leaveDays || '-' }} 天
+ {{ model.leaveDays }} 天
{{ model.remark || '-' }}
-
-
-
-
-
-
-
-
-
-
+
+
-
diff --git a/src/constants/workflow.ts b/src/constants/workflow.ts
index e018064b..b59e2e31 100644
--- a/src/constants/workflow.ts
+++ b/src/constants/workflow.ts
@@ -1,5 +1,17 @@
import { transformRecordToOption } from '@/utils/common';
+export const cooperateTypeRecord: Record = {
+ 1: '审批',
+ 2: '转办',
+ 3: '委派',
+ 4: '会签',
+ 5: '票签',
+ 6: '加签',
+ 7: '减签'
+};
+
+export const cooperateTypeOptions = transformRecordToOption(cooperateTypeRecord);
+
export const businessStatusRecord: Record = {
cancel: '已撤销',
draft: '草稿',
diff --git a/src/service/api/workflow/instance.ts b/src/service/api/workflow/instance.ts
index f41ee183..b7a83c61 100644
--- a/src/service/api/workflow/instance.ts
+++ b/src/service/api/workflow/instance.ts
@@ -34,3 +34,11 @@ export function fetchFlowInvalidOperate(data: Api.Workflow.FlowInvalidOperatePar
data
});
}
+
+/** 获取流程记录 */
+export function fetchGetFlowHisTaskList(businessId: CommonType.IdType) {
+ return request({
+ url: `/workflow/instance/flowHisTaskList/${businessId}`,
+ method: 'get'
+ });
+}
diff --git a/src/typings/api/workflow.api.d.ts b/src/typings/api/workflow.api.d.ts
index 58a77bb6..b9fd5634 100644
--- a/src/typings/api/workflow.api.d.ts
+++ b/src/typings/api/workflow.api.d.ts
@@ -247,11 +247,9 @@ declare namespace Api {
show: boolean;
}>;
/** 任务详情 */
- type Task = Common.CommonRecord<{
+ type Task = Common.CommonTenantRecord<{
/** 任务ID */
id: CommonType.IdType;
- /** 租户编号 */
- tenantId: CommonType.IdType;
/** 删除标志 */
delFlag: number;
/** 流程定义ID */
@@ -280,7 +278,7 @@ declare namespace Api {
category: CommonType.IdType;
/** 分类名称 */
categoryName: string;
- /** 类型 */
+ /** 办理人类型 */
type: string;
/** 审批人 */
assigneeIds: string;
@@ -307,6 +305,82 @@ declare namespace Api {
/** 流程版本号 */
version: string;
}>;
+ /** 协作方式 */
+ type CooperateType = 1 | 2 | 3 | 4 | 5 | 6 | 7;
+
+ /** 历史任务 */
+ type HisTask = Common.CommonTenantRecord<{
+ /** 任务ID */
+ id: CommonType.IdType;
+ /** 删除标志 */
+ delFlag: number;
+ /** 流程定义ID */
+ definitionId: CommonType.IdType;
+ /** 流程定义名称 */
+ flowName: string;
+ /** 流程实例ID */
+ instanceId: CommonType.IdType;
+ /** 任务表ID */
+ taskId: CommonType.IdType;
+ /** 协作方式(1审批 2转办 3委派 4会签 5票签 6加签 7减签) */
+ cooperateType: CooperateType;
+ /** 协作方式名称 */
+ cooperateTypeName: string;
+ /** 业务ID */
+ businessId: string;
+ /** 节点编码 */
+ nodeCode: string;
+ /** 节点名称 */
+ nodeName: string;
+ /** 节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关) */
+ nodeType: WorkflowNodeType;
+ /** 目标节点编码 */
+ targetNodeCode: string;
+ /** 目标节点名称 */
+ targetNodeName: string;
+ /** 审批者 */
+ approver: string;
+ /** 审批者名称 */
+ approveName: string;
+ /** 协作人 */
+ collaborator: string;
+ /** 权限标识 */
+ permissionList: string[];
+ /** 跳转类型(PASS通过 REJECT退回 NONE无动作) */
+ skipType: string;
+ /** 流程状态 */
+ flowStatus: string;
+ /** 任务状态 */
+ flowTaskStatus: string;
+ /** 流程状态名称 */
+ flowStatusName: string;
+ /** 审批意见 */
+ message: string;
+ /** 业务扩展信息(JSON字符串) */
+ ext: string;
+ /** 创建者姓名(申请人名称) */
+ createByName: string;
+ /** 流程分类ID */
+ category: string;
+ /** 流程分类名称 */
+ categoryName: string;
+ /** 审批表单是否自定义(Y是 N否) */
+ formCustom: Api.Common.YesOrNoStatus;
+ /** 表单路径 */
+ formPath: string;
+ /** 流程定义编码 */
+ flowCode: string;
+ /** 流程版本号 */
+ version: string;
+ /** 运行时长 */
+ runDuration: string;
+ }>;
+
+ type InstanceIdWithHisTask = CommonType.RecordNullable<{
+ instanceId: CommonType.IdType;
+ list: HisTask[];
+ }>;
+
/** 消息类型 */
type MessageType = '1' | '2' | '3';
diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts
index f4cc9fab..d8341c2f 100644
--- a/src/typings/components.d.ts
+++ b/src/typings/components.d.ts
@@ -9,6 +9,7 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
+ ApprovalInfoPanel: typeof import('./../components/custom/work-flow/approval-info-panel.vue')['default']
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
BooleanTag: typeof import('./../components/custom/boolean-tag.vue')['default']
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
@@ -124,6 +125,7 @@ declare module 'vue' {
NStatistic: typeof import('naive-ui')['NStatistic']
NSwitch: typeof import('naive-ui')['NSwitch']
NTab: typeof import('naive-ui')['NTab']
+ NTable: typeof import('naive-ui')['NTable']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']