diff --git a/web/admin-spa/src/views/ApiKeysView.vue b/web/admin-spa/src/views/ApiKeysView.vue index 971c05cf..22d90d91 100644 --- a/web/admin-spa/src/views/ApiKeysView.vue +++ b/web/admin-spa/src/views/ApiKeysView.vue @@ -55,8 +55,8 @@
-
- +
+
@@ -140,7 +140,10 @@
+
+ +
-
- - + + +
@@ -3413,6 +3416,7 @@ const exportToExcel = () => { // 基础数据 const baseData = { 名称: key.name || '', + 标签: key.tags && key.tags.length > 0 ? key.tags.join(', ') : '无', 请求总数: periodRequests, '总费用($)': periodCost.toFixed(4), Token数: formatTokenCount(periodTokens), @@ -3469,6 +3473,7 @@ const exportToExcel = () => { const headers = Object.keys(exportData[0] || {}) const columnWidths = headers.map((header) => { if (header === '名称') return { wch: 25 } + if (header === '标签') return { wch: 20 } if (header === '最后使用时间') return { wch: 20 } if (header.includes('费用')) return { wch: 15 } if (header.includes('Token')) return { wch: 15 } @@ -3535,6 +3540,11 @@ const exportToExcel = () => { // 根据列类型设置对齐和特殊样式 if (header === '名称') { cellStyle.alignment = { horizontal: 'left', vertical: 'center' } + } else if (header === '标签') { + cellStyle.alignment = { horizontal: 'left', vertical: 'center' } + if (value === '无') { + cellStyle.font = { ...cellStyle.font, color: { rgb: '999999' }, italic: true } + } } else if (header === '最后使用时间') { cellStyle.alignment = { horizontal: 'right', vertical: 'center' } if (value === '从未使用') {