diff --git a/src/components/flow-approval/types.ts b/src/components/flow-approval/types.ts index f9ba9d7..4133b75 100644 --- a/src/components/flow-approval/types.ts +++ b/src/components/flow-approval/types.ts @@ -77,6 +77,8 @@ export interface ByBizResult { /** 审批轨迹(各子应用自有进度接口形态;组件只用其中"最近一步"做摘要,缺位则不展示) */ export interface TraceStep { + /** 节点 id(与 currentNodes 同一口径,用于把 id 串翻成节点名) */ + nodeId?: string | null; nodeName?: string | null; label?: string | null; assignees?: Array<{ userName?: string | null; statusLabel?: string | null; opinion?: string | null }> | null; diff --git a/src/views/notice/NoticeDetails.vue b/src/views/notice/NoticeDetails.vue index ffe2feb..1c20308 100644 --- a/src/views/notice/NoticeDetails.vue +++ b/src/views/notice/NoticeDetails.vue @@ -40,6 +40,23 @@ async function loadTrace() { } } +/** + * 当前节点:flow-center 的 currentNodes 是**节点 id 逗号串**(办件原文口径), + * 用人看的名字得拿 steps 的 nodeId→nodeName 翻;翻不到(老实例/步骤缺失)才回落原 id。 + */ +const currentNodeText = computed(() => { + const ids = String(flowTrace.value?.currentNodes || "") + .split(",") + .map((s) => s.trim()) + .filter(Boolean); + if (!ids.length) return ""; + const names = new Map(); + for (const s of flowTrace.value?.steps || []) { + if (s.nodeId && s.nodeName) names.set(String(s.nodeId), s.nodeName); + } + return ids.map((id) => names.get(id) || id).join("、"); +}); + /** * 撤回:走本应用后端(2026-09-17 接入:后端经 SDK 托管件中转并复核创建人, * 不再前端直调 flow-center——跨应用 CAS 票据 + CORS 双重外溢且"谁能撤"落在前端)。 @@ -330,13 +347,15 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number;

{{ detail.title }}

- +
审批进度 {{ flowTrace.auditStatusDesc || "—" }} 流程:{{ flowTrace.nodeSummary }} - 当前节点:{{ flowTrace.currentNodes }} + 当前节点:{{ currentNodeText }}
全部审批记录
- -
-
- {{ s.label || s.nodeName || `节点${i + 1}` }} - -
-
- -
-
- {{ t.nodeName || t.node || t.taskName || `节点${i + 1}` }} - {{ t.userName || t.assigneeName || t.handlerName || "" }} - {{ t.handleTime || t.time || t.createTime || "" }} - {{ t.opinion }} -
-
- + +
@@ -544,48 +537,6 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number; color: var(--red); font-size: 13px; } -.flow-timeline { - margin-top: 8px; - background: var(--panel); - border-radius: var(--r-s); - padding: 6px 10px; -} -.flow-step { - display: flex; - gap: 12px; - font-size: 13px; - color: var(--text-2); - padding: 3px 0; - border-bottom: 1px dashed var(--line); -} -.flow-step:last-child { - border-bottom: none; -} -.flow-step-node { - min-width: 120px; -} -.flow-step-user { - min-width: 90px; - color: var(--brand); -} -.flow-step-time { - color: var(--text-3); -} -.flow-step-op { - color: var(--red); -} -.flow-step-active .flow-step-node { - color: var(--brand); - font-weight: 600; -} -.flow-step-status { - font-style: normal; - color: var(--text-3); - margin-left: 4px; -} -.flow-step .flow-step-op { - font-style: normal; -} .diagram-wrap { text-align: center; min-height: 200px;