From 9f371814789563c430b08eb2da6280a4972d0036 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Thu, 5 Nov 2026 23:00:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(web-admin):=20=E6=A0=B7=E6=9C=AC=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E5=BC=B9=E7=AA=97=E4=B8=8D=E5=B1=95=E7=A4=BA=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E9=99=84=E4=BB=B6=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 验收要求仅展示知情同意书与孕妇健康调查表,移除第三项「协议附件」分组。 Co-authored-by: Cursor --- web-admin/src/utils/protocol-source-attachment.test.ts | 3 ++- web-admin/src/utils/protocol-source-attachment.ts | 10 +--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/web-admin/src/utils/protocol-source-attachment.test.ts b/web-admin/src/utils/protocol-source-attachment.test.ts index 2817732e..8bffcb85 100644 --- a/web-admin/src/utils/protocol-source-attachment.test.ts +++ b/web-admin/src/utils/protocol-source-attachment.test.ts @@ -42,9 +42,10 @@ describe('protocol-source-attachment', () => { }) assert.deepEqual( groups.map((g) => g.label), - ['知情同意书', '孕妇健康调查表', '协议附件'] + ['知情同意书', '孕妇健康调查表'] ) assert.ok(groups.every((g) => g.files.length === 1)) + assert.equal(groups.length, 2) }) it('groups research donation attachments for reception dialog', () => { diff --git a/web-admin/src/utils/protocol-source-attachment.ts b/web-admin/src/utils/protocol-source-attachment.ts index c677f1f8..84a8b635 100644 --- a/web-admin/src/utils/protocol-source-attachment.ts +++ b/web-admin/src/utils/protocol-source-attachment.ts @@ -37,17 +37,13 @@ export function getConsentProtocolAttachment( /** * 样本接收弹窗:按来源返回质检需查看的协议附件分组。 - * 细胞存储:知情同意书 / 孕妇健康调查表 / 协议附件(评论优先前两项) + * 细胞存储:仅知情同意书 / 孕妇健康调查表(不展示「协议附件」项) * 科研捐赠:知情同意书 / 传染病检测报告 / 其他附件 - * 兼容 attachments 别名(协议详情字段名)。 */ export function getSourceProtocolAttachmentGroups( row: Record ): ProtocolSourceAttachmentMeta[] { const source = String(row.sourceType || 'cell_storage').trim() - const protocolFiles = normalizeAttachmentFiles( - row.protocolAttachmentFiles ?? row.attachments - ) if (source === 'research_donation') { return [ { @@ -72,10 +68,6 @@ export function getSourceProtocolAttachmentGroups( { label: '孕妇健康调查表', files: normalizeAttachmentFiles(row.healthSurveyAttachmentFiles) - }, - { - label: '协议附件', - files: protocolFiles } ] } -- 2.54.0