feat: 子流程
This commit is contained in:
@ -157,24 +157,24 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
|
||||
}
|
||||
|
||||
/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */
|
||||
watch(
|
||||
detailForm.value,
|
||||
(newValue) => {
|
||||
if (newValue && Object.keys(newValue.value).length > 0) {
|
||||
// 记录之前的节点审批人
|
||||
tempStartUserSelectAssignees.value = startUserSelectAssignees.value
|
||||
startUserSelectAssignees.value = {}
|
||||
// 加载最新的审批详情
|
||||
getApprovalDetail({
|
||||
id: props.selectProcessDefinition.id,
|
||||
processVariablesStr: JSON.stringify(newValue.value) // 解决 GET 无法传递对象的问题,后端 String 再转 JSON
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
// watch(
|
||||
// detailForm.value,
|
||||
// (newValue) => {
|
||||
// if (newValue && Object.keys(newValue.value).length > 0) {
|
||||
// // 记录之前的节点审批人
|
||||
// tempStartUserSelectAssignees.value = startUserSelectAssignees.value
|
||||
// startUserSelectAssignees.value = {}
|
||||
// // 加载最新的审批详情
|
||||
// getApprovalDetail({
|
||||
// id: props.selectProcessDefinition.id,
|
||||
// processVariablesStr: JSON.stringify(newValue.value) // 解决 GET 无法传递对象的问题,后端 String 再转 JSON
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// immediate: true
|
||||
// }
|
||||
// )
|
||||
|
||||
/** 获取审批详情 */
|
||||
const getApprovalDetail = async (row: any) => {
|
||||
|
||||
@ -85,7 +85,9 @@ const setSimpleModelNodeTaskStatus = (
|
||||
if (
|
||||
simpleModel.type === NodeType.START_USER_NODE ||
|
||||
simpleModel.type === NodeType.USER_TASK_NODE ||
|
||||
simpleModel.type === NodeType.TRANSACTOR_NODE
|
||||
simpleModel.type === NodeType.TRANSACTOR_NODE ||
|
||||
simpleModel.type === NodeType.CHILD_PROCESS_NODE ||
|
||||
simpleModel.type === NodeType.ASYNC_CHILD_PROCESS_NODE
|
||||
) {
|
||||
simpleModel.activityStatus = TaskStatusEnum.NOT_START
|
||||
if (rejectedTaskActivityIds.includes(simpleModel.id)) {
|
||||
|
||||
@ -181,6 +181,8 @@ import conditionSvg from '@/assets/svgs/bpm/condition.svg'
|
||||
import parallelSvg from '@/assets/svgs/bpm/parallel.svg'
|
||||
import finishSvg from '@/assets/svgs/bpm/finish.svg'
|
||||
import transactorSvg from '@/assets/svgs/bpm/transactor.svg'
|
||||
import childProcessSvg from '@/assets/svgs/bpm/child-process.svg'
|
||||
import asyncChildProcessSvg from '@/assets/svgs/bpm/async-child-process.svg'
|
||||
|
||||
defineOptions({ name: 'BpmProcessInstanceTimeline' })
|
||||
withDefaults(
|
||||
@ -249,7 +251,11 @@ const nodeTypeSvgMap = {
|
||||
// 条件分支节点
|
||||
[NodeType.CONDITION_NODE]: { color: '#14bb83', svg: conditionSvg },
|
||||
// 并行分支节点
|
||||
[NodeType.PARALLEL_BRANCH_NODE]: { color: '#14bb83', svg: parallelSvg }
|
||||
[NodeType.PARALLEL_BRANCH_NODE]: { color: '#14bb83', svg: parallelSvg },
|
||||
// 子流程节点
|
||||
[NodeType.CHILD_PROCESS_NODE]: { color: '#14bb83', svg: childProcessSvg },
|
||||
// 异步子流程节点
|
||||
[NodeType.ASYNC_CHILD_PROCESS_NODE]: { color: '#14bb83', svg: asyncChildProcessSvg }
|
||||
}
|
||||
|
||||
// 只有只有状态是 -1、0、1 才展示头像右小角状态小icon
|
||||
@ -269,6 +275,8 @@ const getApprovalNodeIcon = (taskStatus: number, nodeType: NodeType) => {
|
||||
nodeType === NodeType.START_USER_NODE ||
|
||||
nodeType === NodeType.USER_TASK_NODE ||
|
||||
nodeType === NodeType.TRANSACTOR_NODE ||
|
||||
nodeType === NodeType.CHILD_PROCESS_NODE ||
|
||||
nodeType === NodeType.ASYNC_CHILD_PROCESS_NODE ||
|
||||
nodeType === NodeType.END_EVENT_NODE
|
||||
) {
|
||||
return statusIconMap[taskStatus]?.icon
|
||||
|
||||
Reference in New Issue
Block a user