diff --git a/src/modules/container-loading/components/ContainerOverviewPanel.test.ts b/src/modules/container-loading/components/ContainerOverviewPanel.test.ts index f86a4f8e..4767d2ce 100644 --- a/src/modules/container-loading/components/ContainerOverviewPanel.test.ts +++ b/src/modules/container-loading/components/ContainerOverviewPanel.test.ts @@ -36,7 +36,7 @@ describe('ContainerOverviewPanel', () => { expect(wrapper.text()).not.toContain('PHOTO_STEP_EMPTY_CONTAINER') expect(wrapper.text()).toContain('一项待复核') expect(wrapper.text()).toContain('码头查验') - expect(wrapper.text()).toContain('更新预计到港时间') + expect(wrapper.text()).not.toContain('更新预计到港时间') }) it('emits stable document types and does not expose file ids in visible text', async () => { @@ -89,7 +89,7 @@ describe('ContainerOverviewPanel', () => { expect(section.text()).toContain('复核员') expect(section.text()).toContain('查验解除') expect(section.text()).not.toContain('更新预计到港时间') - expect(wrapper.find('[aria-label="运输轨迹和操作日志"]').text()).toContain('更新预计到港时间') + expect(wrapper.find('[aria-label="运输轨迹和操作日志"]').exists()).toBe(false) }) it('emits the unchanged manage action for mark and cancel buttons', async () => { @@ -137,7 +137,7 @@ describe('ContainerOverviewPanel', () => { wrapper.unmount() }) - it('maps PDA events to Chinese and hides long technical keys from the main timeline', () => { + it('delegates warehouse events to the unified fulfillment timeline without exposing technical keys here', () => { const longKey = 'pda-submit-1000001-2092438843630391297-2092437496092790785--0c642e80891d76a4-m9428-76' const timeline = [ { eventType: 'PDA_CLAIM', detail: `claim-${longKey}`, operatorId: '1', operatorName: 'platform_admin', occurredAt: '2026-08-26T10:28:00' }, @@ -145,9 +145,9 @@ describe('ContainerOverviewPanel', () => { { eventType: 'PDA_COMPLETE_LOADING', detail: `complete-${longKey}`, operatorId: '1', operatorName: 'platform_admin', occurredAt: '2026-08-26T10:29:00' }, ] const wrapper = mount(ContainerOverviewPanel, { props: { overview: { ...overview, pda: null, timeline }, canManageDocuments: true, canManageCustoms: true, canManageException: true }, global: { plugins: [ElementPlus] } }) - expect(wrapper.text()).toContain('领取 PDA 任务') - expect(wrapper.text()).toContain('提交拣货结果') - expect(wrapper.text()).toContain('完成装柜') + expect(wrapper.text()).not.toContain('领取 PDA 任务') + expect(wrapper.text()).not.toContain('提交拣货结果') + expect(wrapper.text()).not.toContain('完成装柜') expect(wrapper.text()).not.toContain(longKey) }) diff --git a/src/modules/container-loading/components/ContainerOverviewPanel.vue b/src/modules/container-loading/components/ContainerOverviewPanel.vue index d5439f9a..5f54dd0c 100644 --- a/src/modules/container-loading/components/ContainerOverviewPanel.vue +++ b/src/modules/container-loading/components/ContainerOverviewPanel.vue @@ -89,13 +89,6 @@ function eventLabel(value: string) { PDA_CLAIM: '领取 PDA 任务', PDA_BATCH: '提交拣货结果', PDA_COMPLETE_LOADING: '完成装柜', } as Record)[value] || value || '状态更新' } -function eventSummary(entry: ContainerOverview['timeline'][number]) { - if (entry.eventType === 'PDA_CLAIM') return 'PDA 作业任务已领取' - if (entry.eventType === 'PDA_BATCH') return '拣货结果已提交' - if (entry.eventType === 'PDA_COMPLETE_LOADING') return '装柜作业已完成' - const detail = String(entry.detail || '').trim() - return !detail || detail.length > 120 || /(?:operation|idempot|claim-|pda-submit|complete-)/i.test(detail) ? '操作已记录' : detail -} function revokePhotoUrls() { Object.values(photoStates).forEach((state) => { if (state.url) URL.revokeObjectURL(state.url) }) Object.keys(photoStates).forEach((key) => delete photoStates[key]) @@ -153,17 +146,12 @@ onBeforeUnmount(() => { photoGeneration += 1; revokePhotoUrls() }) -
-

运输轨迹与操作日志

{{ overview.timeline.length }} 条
- -
  1. {{ eventLabel(entry.eventType) }}{{ entry.operatorName || '系统' }}{{ eventSummary(entry) }}
-