fix(usage): show account cost inline under cost column, remove separate column

- Cost cell: change gray "A $xxx" to orange "成本 $xxx" with i18n
- Remove standalone account_cost column from column settings (redundant)
This commit is contained in:
erio
2026-04-15 15:56:39 +08:00
parent db27e8f000
commit a7dd535d47
2 changed files with 2 additions and 9 deletions

View File

@@ -154,18 +154,12 @@
</div>
</div>
</div>
<div v-if="row.account_rate_multiplier != null" class="mt-0.5 text-[11px] text-gray-400">
A ${{ accountBilled(row).toFixed(6) }}
<div v-if="row.account_rate_multiplier != null" class="mt-0.5 text-[11px] text-orange-500 dark:text-orange-400">
{{ t('usage.accountCost') }} ${{ accountBilled(row).toFixed(6) }}
</div>
</div>
</template>
<template #cell-account_cost="{ row }">
<span class="text-sm font-medium text-orange-500 dark:text-orange-400">
${{ accountBilled(row).toFixed(6) }}
</span>
</template>
<template #cell-first_token="{ row }">
<span v-if="row.first_token_ms != null" class="text-sm text-gray-600 dark:text-gray-400">{{ formatDuration(row.first_token_ms) }}</span>
<span v-else class="text-sm text-gray-400 dark:text-gray-500">-</span>

View File

@@ -533,7 +533,6 @@ const allColumns = computed(() => [
{ key: 'billing_mode', label: t('admin.usage.billingMode'), sortable: false },
{ key: 'tokens', label: t('usage.tokens'), sortable: false },
{ key: 'cost', label: t('usage.cost'), sortable: false },
{ key: 'account_cost', label: t('usage.accountCost'), sortable: false },
{ key: 'first_token', label: t('usage.firstToken'), sortable: false },
{ key: 'duration', label: t('usage.duration'), sortable: false },
{ key: 'created_at', label: t('usage.time'), sortable: true },