groupInfo-row.vue 2.11 KB
<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>