Merge remote-tracking branch 'yudao/dev' into dev

This commit is contained in:
jason
2025-08-05 23:01:03 +08:00
732 changed files with 45651 additions and 1151 deletions

View File

@@ -23,12 +23,12 @@ defineOptions({ name: 'BpmProcessInstanceTimeline' });
const props = withDefaults(
defineProps<{
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; // 审批节点信息
enableApproveUserSelect?: boolean; // 是否开启审批人自选功能
showStatusIcon?: boolean; // 是否显示头像右下角状态图标
useNextAssignees?: boolean; // 是否用于下一个节点审批人选择
}>(),
{
showStatusIcon: true, // 默认值为 true
useNextAssignees: false, // 默认值为 false
enableApproveUserSelect: false, // 默认值为 false
},
);
@@ -183,6 +183,9 @@ function handleUserSelectConfirm(userList: any[]) {
/** 跳转子流程 */
function handleChildProcess(activity: any) {
if (!activity.processInstanceId) {
return;
}
push({
name: 'BpmProcessInstanceDetail',
query: {
@@ -197,12 +200,12 @@ function shouldShowCustomUserSelect(
) {
return (
isEmpty(activity.tasks) &&
isEmpty(activity.candidateUsers) &&
(BpmCandidateStrategyEnum.START_USER_SELECT ===
activity.candidateStrategy ||
(BpmCandidateStrategyEnum.APPROVE_USER_SELECT ===
activity.candidateStrategy &&
props.useNextAssignees))
((BpmCandidateStrategyEnum.START_USER_SELECT ===
activity.candidateStrategy &&
isEmpty(activity.candidateUsers)) ||
(props.enableApproveUserSelect &&
BpmCandidateStrategyEnum.APPROVE_USER_SELECT ===
activity.candidateStrategy))
);
}
@@ -225,6 +228,21 @@ function handleUserSelectClosed() {
function handleUserSelectCancel() {
selectedUsers.value = [];
}
/** 设置自定义审批人 */
const setCustomApproveUsers = (activityId: string, users: any[]) => {
customApproveUsers.value[activityId] = users || [];
};
/** 批量设置多个节点的自定义审批人 */
const batchSetCustomApproveUsers = (data: Record<string, any[]>) => {
Object.keys(data).forEach((activityId) => {
customApproveUsers.value[activityId] = data[activityId] || [];
});
};
// 暴露方法给父组件
defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
</script>
<template>
@@ -291,6 +309,7 @@ function handleUserSelectCancel() {
ghost
size="small"
@click="handleChildProcess(activity)"
:disabled="!activity.processInstanceId"
>
查看子流程
</Button>