!368 Merge remote-tracking branch 'yudao/master'
Merge pull request !368 from Jason/masterpull/370/MERGE
commit
ae6ad7abff
|
|
@ -354,7 +354,8 @@ async function initNextAssigneesFormField() {
|
|||
BpmCandidateStrategyEnum.START_USER_SELECT ===
|
||||
node.candidateStrategy) ||
|
||||
// 情况二:当前节点是审批人自选
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy
|
||||
(isEmpty(node.candidateUsers) &&
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy)
|
||||
) {
|
||||
nextAssigneesActivityNode.value.push(node);
|
||||
}
|
||||
|
|
@ -396,7 +397,7 @@ function validateNextAssignees() {
|
|||
}
|
||||
// 如果需要自选审批人,则校验每个节点是否都已配置审批人
|
||||
for (const item of nextAssigneesActivityNode.value) {
|
||||
if (isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
if (isEmpty(item.candidateUsers) && isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
message.warning('下一个节点的审批人不能为空!');
|
||||
return false;
|
||||
}
|
||||
|
|
@ -875,9 +876,10 @@ defineExpose({ loadTodoTask });
|
|||
name="nextAssignees"
|
||||
v-if="nextAssigneesActivityNode.length > 0"
|
||||
>
|
||||
<div class="-mb-8 -mt-3.5 ml-2.5">
|
||||
<div class="ml-2.5 mt-2.5">
|
||||
<ProcessInstanceTimeline
|
||||
ref="nextAssigneesTimelineRef"
|
||||
embedded
|
||||
:activity-nodes="nextAssigneesActivityNode"
|
||||
:show-status-icon="false"
|
||||
:enable-approve-user-select="true"
|
||||
|
|
|
|||
|
|
@ -23,12 +23,14 @@ defineOptions({ name: 'BpmProcessInstanceTimeline' });
|
|||
const props = withDefaults(
|
||||
defineProps<{
|
||||
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; // 审批节点信息
|
||||
embedded?: boolean; // 是否嵌入表单使用(缩小顶部内边距,避免与表单项 label 间距过大)
|
||||
enableApproveUserSelect?: boolean; // 是否开启审批人自选功能
|
||||
showStatusIcon?: boolean; // 是否显示头像右下角状态图标
|
||||
}>(),
|
||||
{
|
||||
showStatusIcon: true, // 默认值为 true
|
||||
enableApproveUserSelect: false, // 默认值为 false
|
||||
embedded: false, // 默认值为 false
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -246,7 +248,7 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<Timeline class="pt-5">
|
||||
<Timeline :class="embedded ? 'pt-2' : 'pt-5'">
|
||||
<!-- 遍历每个审批节点 -->
|
||||
<Timeline.Item
|
||||
v-for="(activity, index) in activityNodes"
|
||||
|
|
|
|||
|
|
@ -335,7 +335,8 @@ async function initNextAssigneesFormField() {
|
|||
BpmCandidateStrategyEnum.START_USER_SELECT ===
|
||||
node.candidateStrategy) ||
|
||||
// 情况二:当前节点是审批人自选
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy
|
||||
(isEmpty(node.candidateUsers) &&
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy)
|
||||
) {
|
||||
nextAssigneesActivityNode.value.push(node);
|
||||
}
|
||||
|
|
@ -377,7 +378,7 @@ function validateNextAssignees() {
|
|||
}
|
||||
// 如果需要自选审批人,则校验每个节点是否都已配置审批人
|
||||
for (const item of nextAssigneesActivityNode.value) {
|
||||
if (isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
if (isEmpty(item.candidateUsers) && isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
message.warning('下一个节点的审批人不能为空!');
|
||||
return false;
|
||||
}
|
||||
|
|
@ -858,9 +859,10 @@ defineExpose({ loadTodoTask });
|
|||
name="nextAssignees"
|
||||
v-if="nextAssigneesActivityNode.length > 0"
|
||||
>
|
||||
<div class="-mb-8 -mt-3.5 ml-2.5">
|
||||
<div class="ml-2.5">
|
||||
<ProcessInstanceTimeline
|
||||
ref="nextAssigneesTimelineRef"
|
||||
embedded
|
||||
:activity-nodes="nextAssigneesActivityNode"
|
||||
:show-status-icon="false"
|
||||
:enable-approve-user-select="true"
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ defineOptions({ name: 'BpmProcessInstanceTimeline' });
|
|||
const props = withDefaults(
|
||||
defineProps<{
|
||||
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; // 审批节点信息
|
||||
embedded?: boolean; // 是否嵌入表单使用(缩小顶部内边距,避免与表单项 label 间距过大)
|
||||
enableApproveUserSelect?: boolean; // 是否开启审批人自选功能
|
||||
showStatusIcon?: boolean; // 是否显示头像右下角状态图标
|
||||
}>(),
|
||||
{
|
||||
showStatusIcon: true, // 默认值为 true
|
||||
enableApproveUserSelect: false, // 默认值为 false
|
||||
embedded: false, // 默认值为 false
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -247,7 +249,7 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<Timeline class="pt-5">
|
||||
<Timeline :class="embedded ? 'pt-2' : 'pt-5'">
|
||||
<!-- 遍历每个审批节点 -->
|
||||
<TimelineItem
|
||||
v-for="(activity, index) in activityNodes"
|
||||
|
|
|
|||
|
|
@ -364,7 +364,8 @@ async function initNextAssigneesFormField() {
|
|||
BpmCandidateStrategyEnum.START_USER_SELECT ===
|
||||
node.candidateStrategy) ||
|
||||
// 情况二:当前节点是审批人自选
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy
|
||||
(isEmpty(node.candidateUsers) &&
|
||||
BpmCandidateStrategyEnum.APPROVE_USER_SELECT === node.candidateStrategy)
|
||||
) {
|
||||
nextAssigneesActivityNode.value.push(node);
|
||||
}
|
||||
|
|
@ -406,7 +407,7 @@ function validateNextAssignees() {
|
|||
}
|
||||
// 如果需要自选审批人,则校验每个节点是否都已配置审批人
|
||||
for (const item of nextAssigneesActivityNode.value) {
|
||||
if (isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
if (isEmpty(item.candidateUsers) && isEmpty(approveReasonForm.nextAssignees[item.id])) {
|
||||
ElMessage.warning('下一个节点的审批人不能为空!');
|
||||
return false;
|
||||
}
|
||||
|
|
@ -881,9 +882,10 @@ defineExpose({ loadTodoTask });
|
|||
prop="nextAssignees"
|
||||
v-if="nextAssigneesActivityNode.length > 0"
|
||||
>
|
||||
<div class="-mb-8 -mt-3.5 ml-2.5">
|
||||
<div>
|
||||
<ProcessInstanceTimeline
|
||||
ref="nextAssigneesTimelineRef"
|
||||
embedded
|
||||
:activity-nodes="nextAssigneesActivityNode"
|
||||
:show-status-icon="false"
|
||||
:enable-approve-user-select="true"
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ defineOptions({ name: 'BpmProcessInstanceTimeline' });
|
|||
const props = withDefaults(
|
||||
defineProps<{
|
||||
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; // 审批节点信息
|
||||
embedded?: boolean; // 是否嵌入表单使用(缩小顶部内边距,避免与表单项 label 间距过大)
|
||||
enableApproveUserSelect?: boolean; // 是否开启审批人自选功能
|
||||
showStatusIcon?: boolean; // 是否显示头像右下角状态图标
|
||||
}>(),
|
||||
{
|
||||
showStatusIcon: true, // 默认值为 true
|
||||
enableApproveUserSelect: false, // 默认值为 false
|
||||
embedded: false, // 默认值为 false
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -253,7 +255,7 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<ElTimeline class="pt-5">
|
||||
<ElTimeline :class="embedded ? 'pt-2' : 'pt-5'">
|
||||
<!-- 遍历每个审批节点 -->
|
||||
<ElTimelineItem
|
||||
v-for="(activity, index) in activityNodes"
|
||||
|
|
|
|||
Loading…
Reference in New Issue