<template>
  <div class="basic-info">
    <el-form :inline="true" :model="basicInfo" class="demo-form-inline" size="small">
      <el-row>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:Surname')">
            <span>{{ basicInfo.LastName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:FirstName')">
            <span>{{ basicInfo.FirstName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:ChineseName')">
            <span>{{ basicInfo.ChineseName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:ReviewerCode')">
            <span>{{ basicInfo.ReviewerCode }}</span>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:Sex')">
            <span v-if="isEnglish">{{ basicInfo.Sex === 0?'Male':'Female' }}</span>
            <span v-else>{{ basicInfo.Sex === 0?'男':'女' }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:Title')">
            <span v-if="isEnglish">
              {{ (Array.isArray(basicInfo.TitleList)&& basicInfo.TitleList.length > 0) ? basicInfo.TitleList.join(', ') : '' }}
            </span>
            <span v-else>
              {{ (Array.isArray(basicInfo.TitleCNList)&& basicInfo.TitleCNList.length > 0) ? basicInfo.TitleCNList.join(', ') : '' }}
            </span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:Phone')">
            <span>{{ basicInfo.Phone }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item :label="$t('resumeInfo:label:Email')">
            <span>{{ basicInfo.EMail }}</span>
          </el-form-item>
        </el-col>
      </el-row>

<!--      <el-row>-->
<!--        <el-col :span="6">-->
<!--          <el-form-item :label="$t('resumeInfo:label:WeChat')">-->
<!--            <span>{{ basicInfo.WeChat }}</span>-->
<!--          </el-form-item>-->
<!--        </el-col>-->
<!--      </el-row>-->
    </el-form>
  </div>
</template>
<script>

export default {
  props: {
    basicInfo: {
      type: Object,
      default() {
        return {}
      }
    },
    isEnglish: {
      type: Boolean
    }
  }
}
</script>
<style lang="scss">
.basic-info{
  padding:5px 15px;
  font-size:13px;
  .el-form-item--mini.el-form-item{
    margin-bottom: 0px;
  }
  .el-form-item--small.el-form-item{
    margin-bottom: 0px;
  }
  .el-form-item__content{
    font-size: 13px;
  }
  .el-form-item__label{
    font-size: 13px;
    color: #303133;
    font-weight: bold;
  }
}
</style>
