fix: change participantType to type to match backend field name

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
DevOps
2025-12-28 16:37:31 +08:00
parent ac7587ef7e
commit a6768c394a

View File

@@ -55,7 +55,7 @@
</el-form-item>
<el-form-item label="参赛类型">
<el-select
v-model="queryParams.participantType"
v-model="queryParams.type"
placeholder="请选择参赛类型"
clearable
style="width: 150px"
@@ -155,10 +155,10 @@
<span v-else-if="row.eventType === 4">对练</span>
</template>
</el-table-column>
<el-table-column prop="participantType" label="参赛类型" width="100" align="center">
<el-table-column prop="type" label="参赛类型" width="100" align="center">
<template #default="{ row }">
<el-tag v-if="row.participantType === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="row.participantType === 2" type="warning" size="small">集体</el-tag>
<el-tag v-if="row.type === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="row.type === 2" type="warning" size="small">集体</el-tag>
</template>
</el-table-column>
<el-table-column
@@ -315,9 +315,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="参赛类型" prop="participantType">
<el-form-item label="参赛类型" prop="type">
<el-select
v-model="form.participantType"
v-model="form.type"
placeholder="请选择参赛类型"
style="width: 100%"
>
@@ -441,8 +441,8 @@
<span v-else-if="detailData.eventType === 4">对练</span>
</el-descriptions-item>
<el-descriptions-item label="参赛类型">
<el-tag v-if="detailData.participantType === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="detailData.participantType === 2" type="warning" size="small">集体</el-tag>
<el-tag v-if="detailData.type === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="detailData.type === 2" type="warning" size="small">集体</el-tag>
</el-descriptions-item>
<el-descriptions-item label="报名费">
<span style="color: #f56c6c; font-weight: bold">
@@ -526,7 +526,7 @@ const queryParams = reactive({
projectName: '',
category: '',
eventType: '',
participantType: ''
type: ''
})
// 表单数据
@@ -537,7 +537,7 @@ const form = reactive({
projectName: '',
category: null,
eventType: null,
participantType: null,
type: null,
registrationFee: 0,
registrationStartTime: '',
registrationEndTime: '',
@@ -576,7 +576,7 @@ const rules = {
eventType: [
{ required: true, message: '请选择项目类型', trigger: 'change' }
],
participantType: [
type: [
{ required: true, message: '请选择参赛类型', trigger: 'change' }
],
registrationFee: [
@@ -651,7 +651,7 @@ const handleReset = () => {
projectName: '',
category: '',
eventType: '',
participantType: ''
type: ''
})
fetchData()
}
@@ -762,7 +762,7 @@ const resetForm = () => {
projectName: '',
category: null,
eventType: null,
participantType: null,
type: null,
registrationFee: 0,
registrationStartTime: '',
registrationEndTime: '',