<template>
  <el-card class="box-card-component">
    <div style="position:relative;">
      <mallki class-name="mallki-text" text="用户基本信息"/>

      <el-form style="padding-top:35px;margin-top: 10px"
                status-icon ref="ruleForm" label-width="120px" class="demo-ruleForm">
        <el-form-item label="用户头像:">
          <el-avatar :size="70" :src="info.photoUrl"></el-avatar>
        </el-form-item>
        <el-form-item label="用户姓名:">
          {{info.name}}
        </el-form-item>
        <el-form-item label="所在城市:">
          {{info.province}} {{info.city}}
        </el-form-item>
        <el-form-item label="所在单位:">
          {{info.unit}}
        </el-form-item>
        <el-form-item label="注册时间:">
          {{info.createTime}}
        </el-form-item>
      </el-form>
    </div>
  </el-card>
</template>

<script>
import { mapGetters } from 'vuex'
import Mallki from '@/components/TextHoverEffect/Mallki'

export default {
  components: { Mallki },
  props:['info'],
  filters: {
    statusFilter (status) {
      const statusMap = {
        success: 'success',
        pending: 'danger'
      }
      return statusMap[status]
    }
  },
  data() {
    return {
      statisticsData: {
        article_count: 1024,
        pageviews_count: 1024
      }
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'avatar',
      'roles'
    ])
  }
}
</script>

<style lang="scss" >
.box-card-component{
  .el-card__header {
    padding: 0px!important;
  }
}
</style>
<style lang="scss" scoped>
.box-card-component {
  .box-card-header {
    position: relative;
    height: 220px;
    img {
      width: 100%;
      height: 100%;
      transition: all 0.2s linear;
      &:hover {
        transform: scale(1.1, 1.1);
        filter: contrast(130%);
      }
    }
  }
  .mallki-text {
    position: absolute;
    top: 0px;
    left: 0px;
    font-size: 20px;
    font-weight: bold;
  }
  .panThumb {
    z-index: 100;
    height: 70px!important;
    width: 70px!important;
    position: absolute!important;
    top: -45px;
    left: 0px;
    border: 5px solid #ffffff;
    background-color: #fff;
    margin: auto;
    box-shadow: none!important;
    ::v-deep .pan-info {
      box-shadow: none!important;
    }
  }
  .progress-item {
    margin-bottom: 10px;
    font-size: 14px;
  }
  @media only screen and (max-width: 1510px){
    .mallki-text{
      display: none;
    }
  }
}
</style>
