赛事报名
This commit is contained in:
parent
94a975a89e
commit
d5358f8526
@ -147,24 +147,26 @@
|
||||
</div>
|
||||
|
||||
<div class="athlete-list-panel">
|
||||
<ProTable ref="tableuu" :request-api="eventscorePageathletePost"
|
||||
:columns="columnsScore" :pagination="true" :tool-button="false" :initParam="scoreQueryParam" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
<template #tools>
|
||||
<el-button v-auth="'event:add'" type="primary" :loading="importingScore" @click="inScore"> 导入成绩 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="downloadTemplate"> 下载模板 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="openIssueCertificateDialog"> 发放证书 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="exportCertificate"> 导出证书 </el-button>
|
||||
<el-button v-auth="'event:add'" type="success" :loading="issuingPoints" @click="handleIssuePoints"> 发放积分 </el-button>
|
||||
</template>
|
||||
<template #index="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
<template #action="scope">
|
||||
<el-button size="small" text type="primary" @click="viewCertificate(scope.row.id)"> 查看证书
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
<div v-loading="isScoreTableLoading" style="width: 100%; height: 100%;">
|
||||
<ProTable ref="tableuu" :request-api="eventscorePageathletePost"
|
||||
:columns="columnsScore" :pagination="true" :tool-button="false" :initParam="scoreQueryParam" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
<template #tools>
|
||||
<el-button v-auth="'event:add'" type="primary" :loading="importingScore" @click="inScore"> 导入成绩 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="downloadTemplate"> 下载模板 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="openIssueCertificateDialog"> 发放证书 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="exportCertificate"> 导出证书 </el-button>
|
||||
<el-button v-auth="'event:add'" type="success" :loading="issuingPoints" @click="handleIssuePoints"> 发放积分 </el-button>
|
||||
</template>
|
||||
<template #index="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
<template #action="scope">
|
||||
<el-button size="small" text type="primary" @click="viewCertificate(scope.row.id)"> 查看证书
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -207,7 +209,7 @@
|
||||
<el-option
|
||||
v-for="template in certificateTemplateList"
|
||||
:key="template.id"
|
||||
:label="template.displayName || `模板 ${template.id} (v${template.version})`"
|
||||
:label="template.DisplayName || `模板 ${template.id} (v${template.version})`"
|
||||
:value="template.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -788,21 +790,14 @@ const allSure = async () => {
|
||||
//=================================成绩与证书==================================
|
||||
const user = ref('运动员')
|
||||
|
||||
// 加载状态
|
||||
const isScoreTableLoading = ref(false)
|
||||
|
||||
// 监听用户切换,确保切换到运动员页面时刷新数据
|
||||
watch(user, (newValue) => {
|
||||
if (newValue === '运动员') {
|
||||
nextTick(() => {
|
||||
refreshScoreTable()
|
||||
})
|
||||
} else if (newValue === '教练') {
|
||||
nextTick(() => {
|
||||
refreshScoreTable()
|
||||
})
|
||||
} else if (newValue === '领队') {
|
||||
nextTick(() => {
|
||||
refreshScoreTable()
|
||||
})
|
||||
}
|
||||
nextTick(() => {
|
||||
refreshScoreTable()
|
||||
})
|
||||
})
|
||||
|
||||
const columnsScore = ref([
|
||||
@ -848,6 +843,7 @@ const buildProjectGroupTree = (projects) => {
|
||||
const projectNode = {
|
||||
nodeKey: `project-${project.id}`,
|
||||
id: project.id,
|
||||
projectId: project.id,
|
||||
type: 'project',
|
||||
label: project.name,
|
||||
children: []
|
||||
@ -858,6 +854,7 @@ const buildProjectGroupTree = (projects) => {
|
||||
projectNode.children.push({
|
||||
nodeKey: `group-${project.id}-${idx}`,
|
||||
id: project.id,
|
||||
projectId: project.id,
|
||||
type: 'group',
|
||||
groupName: group.groupName,
|
||||
label: group.groupName
|
||||
@ -874,7 +871,7 @@ const buildProjectGroupTree = (projects) => {
|
||||
const handleTreeNodeClick = (data) => {
|
||||
selectedProjectGroup.value = data
|
||||
nextTick(() => {
|
||||
tableuu.value?.getTableList?.()
|
||||
refreshScoreTable()
|
||||
})
|
||||
}
|
||||
|
||||
@ -884,7 +881,7 @@ const resetSelectedGroup = () => {
|
||||
projectGroupTreeRef.value.setCurrentKey(null)
|
||||
}
|
||||
nextTick(() => {
|
||||
tableuu.value?.getTableList?.()
|
||||
refreshScoreTable()
|
||||
})
|
||||
}
|
||||
const columnsCoach = ref([
|
||||
@ -927,17 +924,22 @@ const columnsLeader = ref([
|
||||
])
|
||||
|
||||
const refreshScoreTable = () => {
|
||||
if (user.value === '运动员') {
|
||||
tableuu.value?.getTableList?.();
|
||||
return;
|
||||
}
|
||||
if (user.value === '教练') {
|
||||
tableCoach.value?.getTableList?.();
|
||||
return;
|
||||
}
|
||||
if (user.value === '领队') {
|
||||
tableLeader.value?.getTableList?.();
|
||||
}
|
||||
isScoreTableLoading.value = true
|
||||
nextTick(() => {
|
||||
try {
|
||||
if (user.value === '运动员') {
|
||||
tableuu.value?.getTableList?.()
|
||||
} else if (user.value === '教练') {
|
||||
tableCoach.value?.getTableList?.()
|
||||
} else if (user.value === '领队') {
|
||||
tableLeader.value?.getTableList?.()
|
||||
}
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
isScoreTableLoading.value = false
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const inScore = () => {
|
||||
|
||||
@ -300,19 +300,6 @@
|
||||
|
||||
<!-- 验证提示区域 -->
|
||||
<div class="validation-notes-section">
|
||||
<!-- 验证加载中提示 -->
|
||||
<el-alert
|
||||
v-if="validationLoading"
|
||||
title="正在验证队员信息..."
|
||||
type="info"
|
||||
:closable="false"
|
||||
style="margin-bottom: 12px;"
|
||||
>
|
||||
<template #icon>
|
||||
<el-icon class="is-loading"><Loading /></el-icon>
|
||||
</template>
|
||||
</el-alert>
|
||||
|
||||
<!-- 年龄性别不符合要求提示 -->
|
||||
<el-alert
|
||||
v-if="hasAnyValidationErrors()"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user