diff --git a/src/views/match/manage/work.vue b/src/views/match/manage/work.vue index 43fe497..5b56a99 100644 --- a/src/views/match/manage/work.vue +++ b/src/views/match/manage/work.vue @@ -84,7 +84,11 @@ - + + 运动员 + 教练 + 领队 + @@ -101,9 +105,24 @@ - + + + + + + + @@ -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 = () => {