|
|
@ -153,6 +153,8 @@ |
|
|
|
@register="registerModal" |
|
|
|
@register="registerModal" |
|
|
|
@ccEmit="handleCCEmit" |
|
|
|
@ccEmit="handleCCEmit" |
|
|
|
@assignEmit="handleAssignEmit" |
|
|
|
@assignEmit="handleAssignEmit" |
|
|
|
|
|
|
|
@transferTask="handleTransferTask" |
|
|
|
|
|
|
|
@delegateTask="handleDelegateTask" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<RollBackTaskModal @register="registerRollBackTask" @success="handleRollBackTask"/> |
|
|
|
<RollBackTaskModal @register="registerRollBackTask" @success="handleRollBackTask"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -191,6 +193,7 @@ |
|
|
|
import { listUser } from '/@/api/platform/system/controller/user'; |
|
|
|
import { listUser } from '/@/api/platform/system/controller/user'; |
|
|
|
import { ActivityCommentInfo } from '/@/api/platform/workflow/entity/activityCommentInfo'; |
|
|
|
import { ActivityCommentInfo } from '/@/api/platform/workflow/entity/activityCommentInfo'; |
|
|
|
import RollBackTaskModal from './popups/RollBackTaskModal.vue'; |
|
|
|
import RollBackTaskModal from './popups/RollBackTaskModal.vue'; |
|
|
|
|
|
|
|
import { PageEnum } from '/@/enums/workflowEnum'; |
|
|
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
interface WindowState { |
|
|
|
interface WindowState { |
|
|
@ -240,7 +243,9 @@ |
|
|
|
// 任务代理人ID |
|
|
|
// 任务代理人ID |
|
|
|
assignee: string; |
|
|
|
assignee: string; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
// 审批表单验证规则 |
|
|
|
rulesRef: Recordable; |
|
|
|
rulesRef: Recordable; |
|
|
|
|
|
|
|
// 用户选取器prop |
|
|
|
userPickerProps: { |
|
|
|
userPickerProps: { |
|
|
|
title: string; |
|
|
|
title: string; |
|
|
|
limit: number; |
|
|
|
limit: number; |
|
|
@ -296,7 +301,7 @@ |
|
|
|
assignee: [{ required: true, whitespace: true, message: '处理用户不能为空', validateTrigger: 'blur' }] |
|
|
|
assignee: [{ required: true, whitespace: true, message: '处理用户不能为空', validateTrigger: 'blur' }] |
|
|
|
}, |
|
|
|
}, |
|
|
|
userPickerProps: { |
|
|
|
userPickerProps: { |
|
|
|
title: '任务表单用户选择器', |
|
|
|
title: '', |
|
|
|
limit: 0, |
|
|
|
limit: 0, |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -368,7 +373,7 @@ |
|
|
|
state.auditForm.assignee = ''; |
|
|
|
state.auditForm.assignee = ''; |
|
|
|
state.auditForm.userIds = []; |
|
|
|
state.auditForm.userIds = []; |
|
|
|
state.auditForm.message = ''; |
|
|
|
state.auditForm.message = ''; |
|
|
|
state.userPickerProps.title = '任务表单用户选择器'; |
|
|
|
state.userPickerProps.title = ''; |
|
|
|
state.userPickerProps.limit = 0; |
|
|
|
state.userPickerProps.limit = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -405,16 +410,16 @@ |
|
|
|
businessId: businessId, |
|
|
|
businessId: businessId, |
|
|
|
...vars |
|
|
|
...vars |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await cc({ processInsId }); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({path: '/workflow/task/index'}); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({ processInsId }); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
// 动态表单 |
|
|
|
// 动态表单 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
formPreview.value.startFormProcessDefinition({ processDefId: state.processDefId, ...vars }, (processInsId: string) => { |
|
|
|
formPreview.value.startFormProcessDefinition({ processDefId: state.processDefId, ...vars }, async (processInsId: string) => { |
|
|
|
close(); |
|
|
|
await cc({ processInsId }); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
|
await close(); |
|
|
|
cc({ processInsId }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -472,12 +477,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 转办 */ |
|
|
|
/** 转办 */ |
|
|
|
function handleTransferUserPicker() { |
|
|
|
function handleTransferUserPicker() { |
|
|
|
openModal(true,{ _tag: 'transfer' }); |
|
|
|
openModal(true,{ _tag: 'transferTask' }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 委托 */ |
|
|
|
/** 委托 */ |
|
|
|
function handleDelegateUserPicker() { |
|
|
|
function handleDelegateUserPicker() { |
|
|
|
openModal(true,{ _tag: 'delegate' }); |
|
|
|
openModal(true,{ _tag: 'delegateTask' }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 终止 */ |
|
|
|
/** 终止 */ |
|
|
@ -488,9 +493,9 @@ |
|
|
|
content: '确定终止流程吗?', |
|
|
|
content: '确定终止流程吗?', |
|
|
|
onOk: async () => { |
|
|
|
onOk: async () => { |
|
|
|
await stopProcessInstance(state.processInsId, state.auditForm.message); |
|
|
|
await stopProcessInstance(state.processInsId, state.auditForm.message); |
|
|
|
|
|
|
|
await cc({processInsId: state.processInsId}); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({path: '/workflow/task/index'}); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({processInsId: state.processInsId}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -536,9 +541,9 @@ |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
vars, |
|
|
|
vars, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await cc({ processInsId: state.processInsId }); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
// 动态表单审批 |
|
|
|
// 动态表单审批 |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -549,10 +554,10 @@ |
|
|
|
activityCommentInfo: state.auditForm, |
|
|
|
activityCommentInfo: state.auditForm, |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
vars |
|
|
|
vars |
|
|
|
}, () => { |
|
|
|
}, async () => { |
|
|
|
close(); |
|
|
|
await cc({ processInsId: state.processInsId }); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
|
await close(); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -564,25 +569,25 @@ |
|
|
|
rollBackTaskDefKey: backTaskDefKey, |
|
|
|
rollBackTaskDefKey: backTaskDefKey, |
|
|
|
comment: state.auditForm |
|
|
|
comment: state.auditForm |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await cc({ processInsId: state.processInsId }); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理转派任务 */ |
|
|
|
/** 处理转派任务 */ |
|
|
|
async function handleTransferTask(userList: KiccUser[]) { |
|
|
|
async function handleTransferTask(userList: KiccUser[]) { |
|
|
|
await transferTask( state.taskId, userList[0].id); |
|
|
|
await transferTask( state.taskId, userList[0].id); |
|
|
|
|
|
|
|
await cc({ processInsId: state.processInsId }); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理任务委派 */ |
|
|
|
/** 处理任务委派 */ |
|
|
|
async function handleDelegateTask(userList: KiccUser[]) { |
|
|
|
async function handleDelegateTask(userList: KiccUser[]) { |
|
|
|
await delegateTask(state.taskId, userList[0].id); |
|
|
|
await delegateTask(state.taskId, userList[0].id); |
|
|
|
|
|
|
|
await cc({ processInsId: state.processInsId }); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: PageEnum.TODO_TASK_PAGE }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function submit(button: Partial<WorkflowButton>) { |
|
|
|
function submit(button: Partial<WorkflowButton>) { |
|
|
|