fix(frontend): 恢复使用记录图表功能并添加订阅分配表单校验

- UsageView: 恢复 ModelDistributionChart、TokenUsageTrend 图表和粒度选择器
- SubscriptionsView: 添加分配订阅时的用户和分组校验提示
- i18n: 添加 pleaseSelectUser/pleaseSelectGroup 翻译
This commit is contained in:
ianshaw
2026-01-04 20:10:15 -08:00
parent b05e90e4e4
commit 960c09cdce
4 changed files with 46 additions and 7 deletions

View File

@@ -869,7 +869,14 @@ const closeAssignModal = () => {
}
const handleAssignSubscription = async () => {
if (!assignForm.user_id || !assignForm.group_id) return
if (!assignForm.user_id) {
appStore.showError(t('admin.subscriptions.pleaseSelectUser'))
return
}
if (!assignForm.group_id) {
appStore.showError(t('admin.subscriptions.pleaseSelectGroup'))
return
}
submitting.value = true
try {