groupInfo-row.vue
2.11 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
<template>
<div class="border-info gray" style="margin: 20px">
<el-row>
<el-col :lg="8">
<el-row :gutter="15">
<el-col :span="4">
<img class="w100" :src="fillImgUrl(groupInfo.imgUrl)"/>
</el-col>
<el-col :span="20">
<div class="item"><label>{{ language==0?'团体名称':'Team Name' }}</label>{{ groupInfo.name }}</div>
<div class="item"><label>{{ language==0?'团体类型':'Group type' }}</label>{{ groupInfo.typeStr }}</div>
</el-col>
</el-row>
</el-col>
<el-col :lg="8">
<div class="item"><label>{{ language==0?'负责人姓名':'Contact Person' }}</label>{{ groupInfo.contactPerson }}</div>
<div class="item"><label>{{ language==0?'参赛队名称':'Name of participating team' }}</label>{{ groupInfo.abreviations }}</div>
</el-col>
<el-col :lg="8">
<div class="item"><label>{{ language==0?'邮箱':'Email' }}</label>{{ groupInfo.contactEmail }}</div>
<div class="item"><label>{{ language==0?'详细地址':'Detailed Address' }}</label>{{ groupInfo.address }}</div>
</el-col>
</el-row>
</div>
</template>
<script setup>
import useUserStore from "@/store/modules/user";
import cache from "@/plugins/cache";
import {getGroup} from "@/api/match/CompetitionProject";
import * as match from "@/apiPc/match";
const language = ref(cache.local.get('language') || 0)
const props = defineProps({
groupId: {
type: Object,
required: false
},
matchId: {
type: String,
required: false
}
})
const user = useUserStore().user
const groupInfo = useUserStore().group
if(props.groupId){
if(props.matchId){
getGroupIdByCptId()
} else {
getGroupInfo()
}
}
function getGroupIdByCptId() {
match.getMyGroupForCpt(props.groupId, props.matchId).then(res=>{
groupInfo.value = res.data
})
}
function getGroupInfo() {
match.getGroupInfo().then(res => {
groupInfo.value = res.data
})
}
</script>
<style scoped lang="scss">
.border-info{
.item{margin: 5px 0;color: #4C5359; font-size: 14px;
label{font-size: 14px;margin-right: 14px}
}
}
</style>