Pre Merge pull request !875 from 郭某人/master

pull/875/MERGE
郭某人 2026-05-02 03:22:01 +00:00 committed by Gitee
commit ffb30493ff
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('表单校验不通过,请先完善表单!!') message.warning('表单校验不通过,请先完善表单!!')
return return
} }
initNextAssigneesFormField()
} }
if (type === 'return') { if (type === 'return') {
// 退 // 退
@ -709,6 +708,13 @@ const openPopover = async (type: string) => {
Object.keys(popOverVisible.value).forEach((item) => { Object.keys(popOverVisible.value).forEach((item) => {
popOverVisible.value[item] = item === type popOverVisible.value[item] = item === type
}) })
if (type === 'approve') {
//
await nextTick()
// tick form-create API
await nextTick()
initNextAssigneesFormField()
}
// await nextTick() // await nextTick()
// formRef.value.resetFields() // formRef.value.resetFields()
} }
@ -1081,6 +1087,22 @@ const loadTodoTask = (task: any) => {
if (task && task.formId && task.formConf) { if (task && task.formId && task.formConf) {
const tempApproveForm = {} const tempApproveForm = {}
setConfAndFields2(tempApproveForm, task.formConf, task.formFields, task.formVariables) 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 approveForm.value = tempApproveForm
} else { } else {
approveForm.value = {} // approveForm.value = {} //
@ -1105,9 +1127,40 @@ const validateNormalForm = async () => {
/** 从可以编辑的流程表单字段,获取需要修改的流程实例的变量 */ /** 从可以编辑的流程表单字段,获取需要修改的流程实例的变量 */
const getUpdatedProcessInstanceVariables = () => { const getUpdatedProcessInstanceVariables = () => {
const variables = {} 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 return variables
} }