|
@@ -15,6 +15,7 @@ import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'elem
|
|
|
import { Delete, Edit, Plus, RefreshRight, Search, UserFilled, View } from '@element-plus/icons-vue'
|
|
import { Delete, Edit, Plus, RefreshRight, Search, UserFilled, View } from '@element-plus/icons-vue'
|
|
|
import { computed, onMounted, reactive, ref } from 'vue'
|
|
import { computed, onMounted, reactive, ref } from 'vue'
|
|
|
import { useLoginUserStore } from '@/store'
|
|
import { useLoginUserStore } from '@/store'
|
|
|
|
|
+import { formatTime } from '@/util/format-time'
|
|
|
|
|
|
|
|
const api = getContestController()
|
|
const api = getContestController()
|
|
|
const problemApi = getProblemController()
|
|
const problemApi = getProblemController()
|
|
@@ -51,8 +52,6 @@ const statusTag = (status?: ContestVo['status']) => {
|
|
|
const statusLabel = (status?: ContestVo['status']) =>
|
|
const statusLabel = (status?: ContestVo['status']) =>
|
|
|
statusOptions.find((s) => s.value === status)?.label || status || '-'
|
|
statusOptions.find((s) => s.value === status)?.label || status || '-'
|
|
|
|
|
|
|
|
-const formatTime = (t?: string) => (t ? t.replace('T', ' ').slice(0, 16) : '-')
|
|
|
|
|
-
|
|
|
|
|
// ---------- 搜索 ----------
|
|
// ---------- 搜索 ----------
|
|
|
const searchForm = reactive({
|
|
const searchForm = reactive({
|
|
|
title: '',
|
|
title: '',
|
|
@@ -620,7 +619,9 @@ onMounted(fetchData)
|
|
|
<el-table-column prop="id" label="ID" width="80" align="center" />
|
|
<el-table-column prop="id" label="ID" width="80" align="center" />
|
|
|
<el-table-column prop="userId" label="用户ID" width="100" align="center" />
|
|
<el-table-column prop="userId" label="用户ID" width="100" align="center" />
|
|
|
<el-table-column prop="username" label="用户名" min-width="160" />
|
|
<el-table-column prop="username" label="用户名" min-width="160" />
|
|
|
- <el-table-column prop="createdAt" label="报名时间" width="180" align="center" />
|
|
|
|
|
|
|
+ <el-table-column label="报名时间" width="180" align="center">
|
|
|
|
|
+ <template #default="{ row }">{{ formatTime(row.createdAt) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<el-empty v-if="!regLoading && !regTable.length" description="暂无报名" :image-size="60" />
|
|
<el-empty v-if="!regLoading && !regTable.length" description="暂无报名" :image-size="60" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|