feat(shipping-notice): 落地 XFA 统一视觉拆分确认门禁与处理投影收敛
闭合拆分预览令牌单次消费、样本 checksum 绑定与确认审计;正式提取改为 bindings-only。 同步统一标注工作台交互,并补齐进度投影/任务中心与迁移文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d2b3d74def
commit
84a881b554
195 files changed
+20269
-3463
No files matched your search
+47
-1
@@ -4,7 +4,7 @@
|
||||
依赖:shipping-audit.api 类型、shippingAuditDisplay、Vue I18n、useMessage。
|
||||
逻辑:由 ShippingAuditCenterPage 传入 detail;事件/动作/结果与列表同源业务标签;
|
||||
展示 before/after checksum 与 XFA snapshot_ref;技术编号以复制芯片展示;
|
||||
关闭时 emit close;不自行拉接口。
|
||||
若快照/metadata 含视觉绑定前后摘要则单独渲染;关闭时 emit close;不自行拉接口。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
@@ -68,6 +68,33 @@ const techRefs = computed(() => {
|
||||
.filter((item) => Boolean(item.value));
|
||||
});
|
||||
|
||||
/**
|
||||
* 从 before/after 快照或 metadata 提取视觉绑定前后摘要。
|
||||
*/
|
||||
const visualBindingDiff = computed(() => {
|
||||
const d = props.detail as (ShippingAuditEventDetail & {
|
||||
before_snapshot?: Record<string, unknown> | null;
|
||||
after_snapshot?: Record<string, unknown> | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
}) | null;
|
||||
if (!d) return null;
|
||||
const meta = d.metadata && typeof d.metadata === 'object' ? d.metadata : {};
|
||||
const beforeSnap = d.before_snapshot && typeof d.before_snapshot === 'object' ? d.before_snapshot : {};
|
||||
const afterSnap = d.after_snapshot && typeof d.after_snapshot === 'object' ? d.after_snapshot : {};
|
||||
const before =
|
||||
meta.before_visual_binding
|
||||
?? beforeSnap.visual_binding
|
||||
?? beforeSnap.before_visual_binding
|
||||
?? null;
|
||||
const after =
|
||||
meta.after_visual_binding
|
||||
?? afterSnap.visual_binding
|
||||
?? afterSnap.after_visual_binding
|
||||
?? null;
|
||||
if (before == null && after == null) return null;
|
||||
return { before, after };
|
||||
});
|
||||
|
||||
/**
|
||||
* 关闭抽屉。
|
||||
*/
|
||||
@@ -176,6 +203,25 @@ function onClose() {
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
<section
|
||||
v-if="visualBindingDiff"
|
||||
class="mt-5"
|
||||
data-testid="shipping-audit-visual-binding-diff"
|
||||
>
|
||||
<h3 class="text-sm font-semibold">{{ t('admin.shippingAudit.visualBindingDiff') }}</h3>
|
||||
<p class="mt-1 text-[11px] text-muted">{{ t('admin.shippingAudit.visualBindingDiffHint') }}</p>
|
||||
<div class="mt-2 space-y-2 rounded-lg border border-default p-3 text-xs">
|
||||
<div>
|
||||
<div class="font-medium text-muted">{{ t('admin.shippingAudit.before') }}</div>
|
||||
<pre class="mt-1 whitespace-pre-wrap break-all">{{ visualBindingDiff.before == null ? '—' : JSON.stringify(visualBindingDiff.before, null, 2) }}</pre>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-medium text-muted">{{ t('admin.shippingAudit.after') }}</div>
|
||||
<pre class="mt-1 whitespace-pre-wrap break-all">{{ visualBindingDiff.after == null ? '—' : JSON.stringify(visualBindingDiff.after, null, 2) }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section
|
||||
v-if="detail.xfa_snapshot_refs?.length"
|
||||
class="mt-5"
|
||||
|
||||
Reference in new issue
Block a user