groupInfo-row.vue
2.82 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
<template>
<div class="border-info gray" style="margin: 20px">
<el-row>
<el-col :lg="8">
<el-row :gutter="15">
<el-col :span="4" v-if="groupInfo.imgUrl">
<img class="w100" :src="fillImgUrl(groupInfo.imgUrl)"/>
</el-col>
<el-col :span="20">
<div class="item" v-if="groupInfo.type=='4'"><label>{{ language==0?'代表队':'Represent' }}</label>{{ groupInfo.name?.substring(0,3) }}</div>
<div class="item" v-if="groupInfo.type!='4'"><label>{{ language==0?'团体名称':'Team name' }}</label>{{ groupInfo.name?.substring(0,3) }}</div>
<div class="item"><label>{{ language==0?'团体类型':'Group type' }}</label>
<text v-if="groupInfo.type=='0'">{{language==0?'普通院校':'School'}}</text>
<text v-if="groupInfo.type=='1'">{{language==0?'专业舞蹈学校':'Professional dance school'}}</text>
<text v-if="groupInfo.type=='2'">{{language==0?'培训机构/俱乐部':'Company/Club'}}</text>
<text v-if="groupInfo.type=='3'">{{language==0?'地方协会':'Local Association'}}</text>
<text v-if="groupInfo.type=='4'">{{language==0?'国家协会':'National Association'}}</text>
</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" v-if="groupInfo.type!='4'"><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 * as match from "@/apiPc/match";
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const props = defineProps({
groupId: {
type: Object,
required: false
},
matchId: {
type: String,
required: false
}
})
const user = useUserStore().user
const group = useUserStore().group
const groupInfo = ref({})
if(props.matchId){
getGroupIdByCptId()
} else {
getGroupInfo()
}
function getGroupIdByCptId() {
match.getMyGroupForCpt(props.groupId || group.id, 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>