成绩与证书:教练和领队分开显示
This commit is contained in:
parent
dad13093a4
commit
2f5581ca19
@ -84,7 +84,11 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成绩与证书" name="fourth">
|
||||
<el-segmented v-model="user" :options="userList" style="margin-bottom: 10px" />
|
||||
<el-radio-group v-model="user" style="margin-bottom: 10px">
|
||||
<el-radio-button value="运动员">运动员</el-radio-button>
|
||||
<el-radio-button value="教练">教练</el-radio-button>
|
||||
<el-radio-button value="领队">领队</el-radio-button>
|
||||
</el-radio-group>
|
||||
<ProTable v-if="user == '运动员'" ref="tableuu" :request-api="eventscorePageathletePost"
|
||||
:columns="columnsScore" :pagination="true" :tool-button="false" :initParam="initParam" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
@ -101,9 +105,24 @@
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
<ProTable v-else ref="tablenn" :request-api="eventscorePagecoachleaderPost" :columns="columnsLeader"
|
||||
:pagination="true" :tool-button="false" :initParam="initParam" toolButton preserve-expanded-content
|
||||
@selectionChange="selection">
|
||||
<ProTable v-if="user == '教练'" ref="tableCoach" :request-api="eventscorePagecoachleaderPost"
|
||||
:columns="columnsCoach" :pagination="true" :tool-button="false" :initParam="initParamCoach" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
<template #tools>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="allSure"> 发放证书 </el-button>
|
||||
</template>
|
||||
<template #index="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
<template #action="scope">
|
||||
<el-button size="small" text type="primary" @click="onLookBook(scope.row.id)"> 查看证书
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
<ProTable v-if="user == '领队'" ref="tableLeader" :request-api="eventscorePagecoachleaderPost"
|
||||
:columns="columnsLeader" :pagination="true" :tool-button="false" :initParam="initParamLeader" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
<template #tools>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="allSure"> 发放证书 </el-button>
|
||||
</template>
|
||||
@ -150,7 +169,8 @@ const eventlist = ref([]);
|
||||
const importingScore = ref(false);
|
||||
const scoreFileInputRef = ref(null);
|
||||
const tableuu = ref();
|
||||
const tablenn = ref();
|
||||
const tableCoach = ref();
|
||||
const tableLeader = ref();
|
||||
// 表单数据(响应式对象)
|
||||
const formData = ref({
|
||||
// 步骤1:基本信息
|
||||
@ -239,6 +259,18 @@ const initParam = ref({
|
||||
id: '',
|
||||
})
|
||||
|
||||
const initParamCoach = computed(() => ({
|
||||
refresh: initParam.value.refresh,
|
||||
id: initParam.value.id,
|
||||
personType: 'Coach'
|
||||
}))
|
||||
|
||||
const initParamLeader = computed(() => ({
|
||||
refresh: initParam.value.refresh,
|
||||
id: initParam.value.id,
|
||||
personType: 'Leader'
|
||||
}))
|
||||
|
||||
const columns = reactive([
|
||||
{
|
||||
width: '120px',
|
||||
@ -372,7 +404,6 @@ const allSure = async () => {
|
||||
//=================================成绩与证书==================================
|
||||
const user = ref('运动员')
|
||||
|
||||
const userList = ref(['运动员', '教练/领队'])
|
||||
const columnsScore = ref([
|
||||
{ prop: 'index', label: '序号', align: 'center', type: 'selection' },
|
||||
{ prop: 'name', label: '姓名', width: '120px', },
|
||||
@ -392,9 +423,28 @@ const columnsScore = ref([
|
||||
{ prop: 'unitName', label: '单位', },
|
||||
{ prop: 'action', label: '操作', align: 'center', width: 140, fixed: 'right' }
|
||||
])
|
||||
const columnsCoach = ref([
|
||||
{ prop: 'index', label: '序号', align: 'center', type: 'selection' },
|
||||
{ prop: 'name', label: '教练姓名', width: '120px', search: { el: 'input' }, },
|
||||
{ prop: 'age', label: '年龄', width: '120px', },
|
||||
{
|
||||
prop: 'gender',
|
||||
label: '性别',
|
||||
search: {
|
||||
el: 'select',
|
||||
},
|
||||
enum: [
|
||||
{ label: '男', value: 0 },
|
||||
{ label: '女', value: 1 },
|
||||
],
|
||||
},
|
||||
{ prop: 'idCard', label: '身份证号', },
|
||||
{ prop: 'phone', label: '联系电话', search: { el: 'input' }, },
|
||||
{ prop: 'action', label: '操作', align: 'center', width: 140, fixed: 'right' }
|
||||
])
|
||||
const columnsLeader = ref([
|
||||
{ prop: 'index', label: '序号', align: 'center', type: 'selection' },
|
||||
{ prop: 'name', label: '姓名', width: '120px', search: { el: 'input' }, },
|
||||
{ prop: 'name', label: '领队姓名', width: '120px', search: { el: 'input' }, },
|
||||
{ prop: 'age', label: '年龄', width: '120px', },
|
||||
{
|
||||
prop: 'gender',
|
||||
@ -417,7 +467,13 @@ const refreshScoreTable = () => {
|
||||
tableuu.value?.reset?.();
|
||||
return;
|
||||
}
|
||||
tablenn.value?.reset?.();
|
||||
if (user.value === '教练') {
|
||||
tableCoach.value?.reset?.();
|
||||
return;
|
||||
}
|
||||
if (user.value === '领队') {
|
||||
tableLeader.value?.reset?.();
|
||||
}
|
||||
};
|
||||
|
||||
const inScore = () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user