fix(server): 赛事包导出传入项目名,修复 GET /api/export/project.zip 恒 500

This commit is contained in:
AskaEth committed 2026-09-09 19:57:23 +08:00
1 parent 72462792ec
commit 5ae55b8057
36 files changed
+2672 -108

No files matched your search

@@ -4,7 +4,7 @@ import { formatDateTime } from '@/shared'
import MxIcon from '../MxIcon.vue'
import ConfirmDialog from '../ConfirmDialog.vue'
import MockBadge from './MockBadge.vue'
import { USER_ROLES, usersApi, type AdminUser, type AdminUserInput } from './systemApi'
import { describeError, USER_ROLES, usersApi, type AdminUser, type AdminUserInput } from './systemApi'
import { useAuthStore } from '../../stores/auth'
import { useToastStore } from '../../stores/toast'
@@ -46,7 +46,7 @@ async function load(): Promise<void> {
rows.value = result.data
usingMock.value = result.mock
} catch (caught) {
loadError.value = caught instanceof Error ? caught.message : '加载用户列表失败'
loadError.value = describeError(caught)
} finally {
loading.value = false
}
@@ -115,7 +115,7 @@ async function commitSave(): Promise<void> {
editorOpen.value = false
await load()
} catch (caught) {
formError.value = caught instanceof Error ? caught.message : '保存失败'
formError.value = describeError(caught)
} finally {
saving.value = false
}
@@ -133,7 +133,7 @@ async function resetPassword(): Promise<void> {
revealed.value = { username: target.username, password: result.data.password }
await load()
} catch (caught) {
toast.error('重置密码失败', caught instanceof Error ? caught.message : null)
toast.error('重置密码失败', describeError(caught))
} finally {
resetting.value = false
}
@@ -269,7 +269,7 @@ onMounted(() => {
placeholder="至少 8 位,首次登录强制修改"
/>
</div>
<div class="field switch-field">
<div v-if="editingId !== null" class="field switch-field">
<span class="mx-label">启用</span>
<span class="switch-row">
<label class="mx-switch">
@@ -281,6 +281,9 @@ onMounted(() => {
</div>
</div>
<p class="notice">
角色只有「管理员 / 录入员」两种;未登录访客的只读身份由系统默认提供,不需要建账号。
</p>
<p v-if="formError !== null" class="notice error">{{ formError }}</p>
<div class="editor-foot">