fix: 项目管理表格显示所属赛事名称
This commit is contained in:
@@ -128,12 +128,11 @@
|
|||||||
min-width="180"
|
min-width="180"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="所属赛事" min-width="150" show-overflow-tooltip>
|
||||||
prop="competitionName"
|
<template #default="{ row }">
|
||||||
label="所属赛事"
|
{{ getCompetitionName(row.competitionId) }}
|
||||||
min-width="150"
|
</template>
|
||||||
show-overflow-tooltip
|
</el-table-column>
|
||||||
/>
|
|
||||||
<el-table-column prop="category" label="分组类别" width="100" align="center">
|
<el-table-column prop="category" label="分组类别" width="100" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.category || '-' }}</span>
|
<span>{{ row.category || '-' }}</span>
|
||||||
@@ -419,7 +418,7 @@
|
|||||||
{{ detailData.projectName }}
|
{{ detailData.projectName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属赛事">
|
<el-descriptions-item label="所属赛事">
|
||||||
{{ detailData.competitionName }}
|
{{ getCompetitionName(detailData.competitionId) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="分组类别">
|
<el-descriptions-item label="分组类别">
|
||||||
<el-tag v-if="detailData.category === 1" type="primary">男子</el-tag>
|
<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) => {
|
const formatDate = (date) => {
|
||||||
if (!date) return '-'
|
if (!date) return '-'
|
||||||
|
|||||||
Reference in New Issue
Block a user