From e2b54a8027b3d226ef2a0a9d87504de3cc26ce08 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Sat, 4 Jul 2026 06:41:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=89=BA=E6=9C=AF?= =?UTF-8?q?=E5=93=81=E6=96=B0=E5=BB=BA=E9=A1=B5=E5=AD=90=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aidocs/project_context.md | 1 + apps/admin/src/locales/en-US.json | 2 ++ apps/admin/src/locales/zh-CN.json | 2 ++ apps/admin/src/views/ArtworkEdit.vue | 24 +++++++++++++++++------- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/aidocs/project_context.md b/aidocs/project_context.md index 1161e03..8cc03c9 100644 --- a/aidocs/project_context.md +++ b/aidocs/project_context.md @@ -104,6 +104,7 @@ - 上链录入弱化区块高度(2026-07-04):原版 PRD 要求 C 端可展示区块高度,但后台运营手工录入时不应把它作为重点字段。追溯码管理的“登记出库/上链”弹窗和 `Outbound.vue` 单条录入页默认只展示交易/存证哈希与上链时间,区块高度收进“更多上链信息”折叠项,仍作为可选字段保存到 `BlockchainProof.blockHeight`。 - 单件出库记录进入 C 端时间轴(2026-07-04):出库实况图/出库时间是 `TraceCode` 单件实物级数据,档案时间轴节点是 `Artwork.traceNodes` 档案级数据,二者不再依赖同一条手工节点。`PublicTraceService.trace` 在公开溯源返回时,如果当前追溯码存在 `outTime` 或 `outImage`,会自动在 `timeline` 末尾追加“本件出库记录”节点(`nodeType=OUTBOUND`,媒体来自 `TraceCode.outImage`),因此即使后台删除档案级“出库/流转”时间轴节点,C 端仍能展示该实物自己的出库记录。`AttestationService.trigger` 的上链摘要同步纳入 `batchNo`、`outTime`、`outImage`,保证触发上链时单件出库记录参与存证摘要。 - 后端开发模式编译修复(2026-07-04):`apps/api/tsconfig.json` 禁用 `incremental`。原因是 `nest start --watch` 运行时依赖 `apps/api/dist`,如果开发服务运行中清理或部分删除了 `dist`,TS 增量编译可能只补变化文件,不会完整重吐未变化文件,导致运行时报 `Cannot find module './config/configuration'` 之类缺模块错误。后续清理构建产物时不要在 `dev.py` 运行中删除 API 的 `dist`;需要清理时先停开发服务再全量重启。 +- 艺术品新建页子资源提示(2026-07-04):艺术品档案新建时仍先保存基础信息以获得 `artworkId`,溯源时间轴与认证文件是挂在作品下的子资源,必须在作品存在后维护。后台 `ArtworkEdit.vue` 新建态不再隐藏这两个区块,而是显示锁定空状态,提示保存基础信息后可维护;保存后自动跳转详情页并启用原有节点/认证文件管理。 ## 当前代码基准与注意事项 diff --git a/apps/admin/src/locales/en-US.json b/apps/admin/src/locales/en-US.json index 2016c2f..c8d5910 100644 --- a/apps/admin/src/locales/en-US.json +++ b/apps/admin/src/locales/en-US.json @@ -209,6 +209,8 @@ "dynamicFields": "Fields", "nodes": "Timeline", "certificates": "Certificates", + "saveBeforeNodes": "Save basic info before editing the timeline", + "saveBeforeCertificates": "Save basic info before uploading certificates", "traceCode": "Trace Code", "status": "Status", "create": "New Artwork", diff --git a/apps/admin/src/locales/zh-CN.json b/apps/admin/src/locales/zh-CN.json index 8220925..b5f6f37 100644 --- a/apps/admin/src/locales/zh-CN.json +++ b/apps/admin/src/locales/zh-CN.json @@ -209,6 +209,8 @@ "dynamicFields": "动态字段", "nodes": "溯源时间轴", "certificates": "认证文件", + "saveBeforeNodes": "保存基础信息后可维护溯源时间轴", + "saveBeforeCertificates": "保存基础信息后可上传认证文件", "traceCode": "追溯码", "status": "状态", "create": "新建作品", diff --git a/apps/admin/src/views/ArtworkEdit.vue b/apps/admin/src/views/ArtworkEdit.vue index 89d02ed..6e00118 100644 --- a/apps/admin/src/views/ArtworkEdit.vue +++ b/apps/admin/src/views/ArtworkEdit.vue @@ -115,17 +115,19 @@ -