diff --git a/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/Template1.tsx b/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/Template1.tsx index 62611368be12594d9efcd3c0b174574506a826d6..bd8f8e452d02f0cfe98771fea21b32496cfd1290 100644 --- a/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/Template1.tsx +++ b/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/Template1.tsx @@ -260,7 +260,10 @@ const Template1: FC = ({ printData, current, loading, styleTemplate, pri const type = attrsObj['valueType']; const curData = current.instanceData?.data || []; const attrXfieldId: string = attrsObj['xfield']?.name.split('-')[0]; - const fieldAfter = curData[attrXfieldId] ? curData[attrXfieldId][0]?.after : []; + const fieldAfter = curData[attrXfieldId] + ? curData[attrXfieldId].filter((i) => i.nodeId == current.instanceData?.node.id)[0] + ?.after + : []; const fieldValue = fieldAfter[0]?.[attrsObj['id']]; useEffect(() => { if (type === '用户型') { diff --git a/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/drafts.tsx b/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/drafts.tsx index 8a4b3037a0dca2655754ba5eb66e02fb0cfa927a..78775b845d7cfe66d55048d1e0ce20fbe9fc94e5 100644 --- a/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/drafts.tsx +++ b/src/components/Common/FlowDesign/Config/Components/PrintNode/printTemplate/drafts.tsx @@ -246,7 +246,9 @@ const Template1: FC = ({ const type = attrsObj['valueType']; const curData = instanceData?.data || []; const attrXfieldId: string = attrsObj['xfield']?.name.split('-')[0]; - const fieldAfter = curData[attrXfieldId] ? curData[attrXfieldId][0]?.after : []; + const fieldAfter = curData[attrXfieldId] + ? curData[attrXfieldId].filter((i) => i.nodeId == instanceData?.node.id)[0]?.after + : []; const fieldValue = fieldAfter[0]?.[attrsObj['id']]; useEffect(() => {