彻底重构-4
This commit is contained in:
@@ -36,6 +36,15 @@ function formatSpecSummary(spec: Record<string, unknown>) {
|
||||
|
||||
return entries.length > 0 ? entries.join(' | ') : '-'
|
||||
}
|
||||
|
||||
function formatBindingRoleSummary(roleKeys: string[]) {
|
||||
return Array.isArray(roleKeys) && roleKeys.length > 0 ? roleKeys.join(' / ') : '-'
|
||||
}
|
||||
|
||||
function formatTaskBindingCountSummary(task: AdminOrderDetail['tasks'][number]) {
|
||||
const summary = task.bindingSummary
|
||||
return `共 ${summary.totalBindingCount} 条 · 预占 ${summary.reservedBindingCount} · 已消费 ${summary.consumedBindingCount} · 已释放 ${summary.releasedBindingCount}`
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -91,6 +100,11 @@ function formatSpecSummary(spec: Record<string, unknown>) {
|
||||
<strong>{{ detail.order.bindingSummary.completedBindingTaskCount }}/{{ detail.order.bindingSummary.totalTaskCount }} 完整绑定</strong>
|
||||
<small>{{ detail.order.bindingSummary.systemBoundTaskCount }}/{{ detail.order.bindingSummary.totalTaskCount }} 系统绑定</small>
|
||||
</article>
|
||||
<article class="info-tile">
|
||||
<span>库存绑定</span>
|
||||
<strong>{{ detail.order.bindingSummary.totalBindingCount }} 条绑定记录</strong>
|
||||
<small>预占 {{ detail.order.bindingSummary.reservedBindingCount }} · 已消费 {{ detail.order.bindingSummary.consumedBindingCount }} · 已释放 {{ detail.order.bindingSummary.releasedBindingCount }}</small>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<table class="meta-table">
|
||||
@@ -137,6 +151,7 @@ function formatSpecSummary(spec: Record<string, unknown>) {
|
||||
<th>状态</th>
|
||||
<th>系统绑定</th>
|
||||
<th>完整绑定</th>
|
||||
<th>库存绑定</th>
|
||||
<th>登录方式</th>
|
||||
<th>错误</th>
|
||||
</tr>
|
||||
@@ -149,6 +164,10 @@ function formatSpecSummary(spec: Record<string, unknown>) {
|
||||
<td><AdminStatusTag :status="task.status" /></td>
|
||||
<td><AdminStatusTag :status="task.systemBindingStatus" /></td>
|
||||
<td><AdminStatusTag :status="task.userBindingStatus" /></td>
|
||||
<td>
|
||||
<div>{{ formatTaskBindingCountSummary(task) }}</div>
|
||||
<div class="binding-copy">角色 {{ formatBindingRoleSummary(task.bindingSummary.roleKeys) }}</div>
|
||||
</td>
|
||||
<td>{{ task.loginType || '-' }}</td>
|
||||
<td>{{ task.lastError || '-' }}</td>
|
||||
</tr>
|
||||
@@ -248,6 +267,11 @@ function formatSpecSummary(spec: Record<string, unknown>) {
|
||||
.info-tile strong {
|
||||
color: #1d3555;
|
||||
}
|
||||
.binding-copy {
|
||||
margin-top: 6px;
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
}
|
||||
.meta-table,
|
||||
.data-table { width: 100%; border-collapse: collapse; }
|
||||
.meta-table th,
|
||||
|
||||
Reference in New Issue
Block a user