fix:监听表单字段,调用流程预测节点

This commit is contained in:
lizhixian 2025-02-18 17:15:17 +08:00
parent b03711e0df
commit 7467b0b4e0

View File

@ -154,17 +154,21 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
// Tab
}
}
// formVariables
//
watch(
detailForm.value,
(newValue, oldValue) => {
console.log('formVariables 发生了变化')
console.log('新值:', newValue)
console.log('旧值:', oldValue)
(newValue) => {
if (newValue && Object.keys(newValue.value).length > 0) {
// startUserSelectTasks.value = []
// startUserSelectAssignees.value = []
getApprovalDetail({
id: props.selectProcessDefinition.id,
processVariablesStr: newValue.value
})
}
},
{
deep: true //
immediate: true
}
)
@ -232,19 +236,7 @@ const submitForm = async () => {
}
//
await fApi.value.validate()
//
const savedAssignees = { ...startUserSelectAssignees.value }
//
await getApprovalDetail({
id: props.selectProcessDefinition.id,
processVariablesStr: detailForm.value?.value
})
//
Object.keys(savedAssignees).forEach((id) => {
if (startUserSelectAssignees.value[id]) {
startUserSelectAssignees.value[id] = savedAssignees[id]
}
})
// debugger
//
if (startUserSelectTasks.value?.length > 0) {
for (const userTask of startUserSelectTasks.value) {