coachInfo-row.vue
2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<template>
<div class="border-info" style="margin: 20px" v-loading="loading">
<el-row>
<el-col :lg="8">
<div class="item"><label>{{ language == 0 ? '教练' : 'Coach' }}</label>
<span v-for="c in names.coachList">{{ c.realName}}, </span>
<span v-if="!names.coachList">--</span>
</div>
<div class="item"><label>{{ language == 0 ? '翻译' : 'Translator' }}</label>
<span v-for="c in names.translatorList">{{ c.realName }},</span>
<span v-if="!names.translatorList">--</span>
</div>
</el-col>
<el-col :lg="8">
<div class="item">
<label>{{ language == 0 ? '领队' : 'Team leader' }}</label>
<span v-for="c in names.leaderList">{{ c.realName }},</span>
<span v-if="!names.leaderList">--</span>
</div>
<div class="item">
<label>{{ language == 0 ? '官员' : 'Official' }}</label>
<span class="mr5" v-for="c in names.officialList">{{ c.realName }},</span>
<span v-if="!names.officialList">--</span>
</div>
</el-col>
<el-col :lg="8">
<div class="item">
<label>{{ language == 0 ? '队医' : 'Team doctor' }}</label>
<span class="mr5" v-for="c in names.teamDoctorList">
{{ c.realName }},
</span>
<span v-if="!names.teamDoctorList">--</span>
</div>
<div class="item">
<label>{{ language == 0 ? '其他' : 'Other' }}</label>
<span class="mr5" v-for="c in names.otherList">
{{ c.realName }},
</span>
<span v-if="names.otherList?.length==0">--</span>
</div>
</el-col>
</el-row>
</div>
</template>
<script setup>
import * as match from "@/apiPc/match";
import {onMounted} from "@vue/runtime-core";
import useUserStore from "@/store/modules/user";
const props = defineProps({
matchId: {
type: String,
required: true
}
})
const names = ref({})
const loading = ref(true)
import {useStorage} from "@vueuse/core/index";
const user = useUserStore().user
const group = useUserStore().group || {}
const language= useStorage('language',0)
onMounted(() => {
if (user.utype == '2') {
tuandui()
}
if(user.utype == '1'){
geren()
}
})
function geren() {
match.getChooseDoneSingleCoachs(props.matchId).then(res => {
names.value = res.data
loading.value = false
})
}
function tuandui() {
match.getChooseDoneGroupCoachs(props.matchId, group.id).then(res => {
names.value = res.data
loading.value = false
})
}
</script>
<style scoped lang="scss">
.border-info {
.item {
margin: 5px 0;
color: #4C5359;
font-size: 14px;
label {
font-size: 14px;
margin-right: 14px
}
}
}
</style>