diff --git a/web/admin-spa/src/components/common/IconPicker.vue b/web/admin-spa/src/components/common/IconPicker.vue index 253f2fe2..d3628591 100644 --- a/web/admin-spa/src/components/common/IconPicker.vue +++ b/web/admin-spa/src/components/common/IconPicker.vue @@ -3,7 +3,7 @@
@@ -757,6 +757,18 @@ const applyCropAndSave = () => { transition: all 0.2s; } +.icon-display.size-small { + width: 24px; + height: 24px; + border-radius: 4px; +} + +.icon-display.size-large { + width: 40px; + height: 40px; + border-radius: 8px; +} + .dark .icon-display { background: #374151; } diff --git a/web/admin-spa/src/views/ApiKeysView.vue b/web/admin-spa/src/views/ApiKeysView.vue index 22d90d91..25e30f3b 100644 --- a/web/admin-spa/src/views/ApiKeysView.vue +++ b/web/admin-spa/src/views/ApiKeysView.vue @@ -86,7 +86,7 @@ range-separator="至" size="small" start-placeholder="开始日期" - style="width: 320px" + style="width: 320px; height: 38px" type="datetimerange" :unlink-panels="false" value-format="YYYY-MM-DD HH:mm:ss" @@ -253,7 +253,7 @@
名称 @@ -267,13 +267,18 @@ /> + + 所属账号 + 标签 状态 @@ -288,22 +293,7 @@ - 请求数 - - - - 费用 @@ -318,10 +308,10 @@ - Token数 + Token + + 请求数 + + + 创建时间 @@ -363,7 +368,7 @@ 过期时间 @@ -378,7 +383,7 @@ 操作 @@ -401,212 +406,94 @@
-
- - -
- -
- {{ key.name }} -
- -
- - - - {{ - getClaudeBindingInfo(key) - .replace(/^🔒\s*专属-/, '') - .replace(/^⚠️\s*/, '') - }} - - - - - {{ - getClaudeBindingInfo(key) - .replace(/^🔒\s*专属-/, '') - .replace(/^⚠️\s*/, '') - }} - - - - - {{ getClaudeBindingInfo(key) }} - - - - - {{ - getGeminiBindingInfo(key) - .replace(/^🔒\s*专属-/, '') - .replace(/^⚠️\s*/, '') - }} - - - - - {{ getGeminiBindingInfo(key) }} - - - - - {{ - getOpenAIBindingInfo(key) - .replace(/^🔒\s*专属-/, '') - .replace(/^⚠️\s*/, '') - }} - - - - - {{ getOpenAIBindingInfo(key) }} - - - - - {{ - getBedrockBindingInfo(key) - .replace(/^🔒\s*专属-/, '') - .replace(/^⚠️\s*/, '') - }} - - - - - {{ getBedrockBindingInfo(key) }} - - - - - 共享池 - -
-
-
- -
- -
- - - Claude - - - {{ getClaudeBindingInfo(key) }} - -
- -
- - - Gemini - - - {{ getGeminiBindingInfo(key) }} - -
- -
- - - OpenAI - - - {{ getOpenAIBindingInfo(key) }} - -
- -
- - - Bedrock - - - {{ getBedrockBindingInfo(key) }} - -
+ +
+ {{ key.name }}
{{ key.ownerDisplayName }}
+ + +
+ +
+ + + Claude + + + {{ getClaudeBindingInfo(key) }} + +
+ +
+ + + Gemini + + + {{ getGeminiBindingInfo(key) }} + +
+ +
+ + + OpenAI + + + {{ getOpenAIBindingInfo(key) }} + +
+ +
+ + + Bedrock + + + {{ getBedrockBindingInfo(key) }} + +
+ +
+ + 共享池 +
+
+ +
- - -
- - {{ formatNumber(getPeriodRequests(key)) }} - - -
- - +
- - ${{ getPeriodCost(key).toFixed(4) }} + + ${{ getPeriodCost(key).toFixed(2) }} @@ -714,40 +595,61 @@
- +
- + {{ formatTokenCount(getPeriodTokens(key)) }}
+ + +
+ + {{ formatNumber(getPeriodRequests(key)) }} + + +
+ {{ formatLastUsed(key.lastUsedAt) }} - 从未使用 + 从未使用 {{ new Date(key.createdAt).toLocaleDateString() }} - +
- + 未激活 ({{ key.activationDays || 30 }}天) @@ -755,22 +657,25 @@ - + 已过期 - + {{ formatExpireDate(key.expiresAt) }} {{ formatExpireDate(key.expiresAt) }} @@ -780,14 +685,15 @@ - + 永不过期
- +
+ + +
+ +
+ + + Claude OAuth + +
+ +
+ + + Claude Console + +
+ +
+ + + Gemini + +
+ +
+ + 共享池 +
+
+ + -
+
- + 管理员 - + {{ key.userUsername }} - + 未知
+ {{ formatDate(key.createdAt) }} + -
+
- + {{ key.deletedBy }} - + {{ key.deletedBy }} - + {{ key.deletedBy }}
+ {{ formatDate(key.deletedAt) }} + + + + ${{ (key.usage?.total?.cost || 0).toFixed(2) }} + + + + + + {{ formatTokenCount(key.usage?.total?.tokens || 0) }} + + - +
- + {{ formatNumber(key.usage?.total?.requests || 0) }}
- - - - ${{ (key.usage?.total?.cost || 0).toFixed(4) }} - - - - - - {{ formatTokenCount(key.usage?.total?.tokens || 0) }} - - + - + {{ formatLastUsed(key.lastUsedAt) }} - 从未使用 + 从未使用
@@ -3418,7 +3384,7 @@ const exportToExcel = () => { 名称: key.name || '', 标签: key.tags && key.tags.length > 0 ? key.tags.join(', ') : '无', 请求总数: periodRequests, - '总费用($)': periodCost.toFixed(4), + '总费用($)': periodCost.toFixed(2), Token数: formatTokenCount(periodTokens), 输入Token: formatTokenCount(periodInputTokens), 输出Token: formatTokenCount(periodOutputTokens), @@ -3452,7 +3418,7 @@ const exportToExcel = () => { modelName = modelName.replace(/[:/]/g, '_') modelStats[`${modelName}_请求数`] = stats.requests || 0 - modelStats[`${modelName}_费用($)`] = (stats.cost || 0).toFixed(4) + modelStats[`${modelName}_费用($)`] = (stats.cost || 0).toFixed(2) modelStats[`${modelName}_Token`] = formatTokenCount(stats.totalTokens || 0) modelStats[`${modelName}_输入Token`] = formatTokenCount(stats.inputTokens || 0) modelStats[`${modelName}_输出Token`] = formatTokenCount(stats.outputTokens || 0)