fix: 项目管理表格显示所属赛事名称
This commit is contained in:
@@ -128,12 +128,11 @@
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="competitionName"
|
||||
label="所属赛事"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="所属赛事" min-width="150" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ getCompetitionName(row.competitionId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="category" label="分组类别" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.category || '-' }}</span>
|
||||
@@ -419,7 +418,7 @@
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属赛事">
|
||||
{{ detailData.competitionName }}
|
||||
{{ getCompetitionName(detailData.competitionId) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="分组类别">
|
||||
<el-tag v-if="detailData.category === 1" type="primary">男子</el-tag>
|
||||
@@ -839,6 +838,13 @@ const handleExport = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 根据ID获取赛事名称
|
||||
const getCompetitionName = (competitionId) => {
|
||||
if (!competitionId) return '-'
|
||||
const competition = competitionList.value.find(item => item.id === competitionId)
|
||||
return competition ? competition.competitionName : '-'
|
||||
}
|
||||
|
||||
// 格式化日期
|
||||
const formatDate = (date) => {
|
||||
if (!date) return '-'
|
||||
|
||||
Reference in New Issue
Block a user