!875 fix(bpm):修复流程网关分支问题

Merge pull request !875 from 郭某人/master
pull/867/MERGE
芋道源码 2026-05-02 16:01:00 +00:00 committed by Gitee
commit 7fd0a24ca5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 57 additions and 4 deletions

View File

@ -696,7 +696,6 @@ const openPopover = async (type: string) => {
message.warning('表单校验不通过,请先完善表单!!')
return
}
initNextAssigneesFormField()
}
if (type === 'return') {
// 退
@ -709,6 +708,13 @@ const openPopover = async (type: string) => {
Object.keys(popOverVisible.value).forEach((item) => {
popOverVisible.value[item] = item === type
})
if (type === 'approve') {
//
await nextTick()
// tick form-create API
await nextTick()
initNextAssigneesFormField()
}
// await nextTick()
// formRef.value.resetFields()
}
@ -1081,6 +1087,22 @@ const loadTodoTask = (task: any) => {
if (task && task.formId && task.formConf) {
const tempApproveForm = {}
setConfAndFields2(tempApproveForm, task.formConf, task.formFields, task.formVariables)
// onChange
// @ts-ignore
if (!tempApproveForm.option) {
// @ts-ignore
tempApproveForm.option = {}
}
// @ts-ignore
tempApproveForm.option.onChange = () => {
//
if (popOverVisible.value.approve) {
//
nextAssigneesActivityNode.value = []
//
initNextAssigneesFormField()
}
}
approveForm.value = tempApproveForm
} else {
approveForm.value = {} //
@ -1105,9 +1127,40 @@ const validateNormalForm = async () => {
/** 从可以编辑的流程表单字段,获取需要修改的流程实例的变量 */
const getUpdatedProcessInstanceVariables = () => {
const variables = {}
props.writableFields.forEach((field) => {
variables[field] = props.normalFormApi.getValue(field)
})
//
if (props.writableFields && props.writableFields.length > 0 && props.normalFormApi) {
props.writableFields.forEach((field) => {
variables[field] = props.normalFormApi.getValue(field)
})
}
//
// approveForm.value.value form-create
if (approveForm.value?.value) {
Object.assign(variables, approveForm.value.value)
}
// formVariables
if (approveForm.value?.formVariables) {
Object.assign(variables, approveForm.value.formVariables)
}
// formFields
if (approveForm.value?.formFields) {
Object.assign(variables, approveForm.value.formFields)
}
// approveFormFApi
if (approveFormFApi.value && approveForm.value?.rule) {
approveForm.value.rule.forEach((field: any) => {
if (field.field) {
try {
const value = approveFormFApi.value.getValue(field.field)
if (value !== undefined && value !== null) {
variables[field.field] = value
}
} catch (e) {
//
}
}
})
}
return variables
}