<template>
  <el-card class="popular-card">
    <div slot="header" class="popular-header">
      <img src="../../assets/img/userRank.png" alt="hot-crowd" class="popular-header-img"/>
      <span class="popular-header-title">众测人员排行榜</span>
      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
    </div>
    <div class="popular-list">
      <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">
        <el-col :span="19">
          <img :src="item.photoUrl==null?defaultValue.image:item.photoUrl" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.id)">
          <div style="margin-left: 55px;cursor: pointer;" @click="goToDetail(item.id)">
            <div class="list-item-title single-line-title">
              {{item.name}}
            </div>
            <div class="list-item-info">

            </div>
          </div>
        </el-col>
        <el-col :span="5">
          <div class="project-people-number">
            {{item.taskCount}}次
          </div>
        </el-col>
      </el-row>
    </div>
  </el-card>
</template>

<script>
  import {defaultValue} from '@/js/index.js'

  export default {
    name: 'HotCrowd',
    props:['userRank'],
    data() {
      return{
        defaultValue: defaultValue,
      }
    },
    methods:{
        getMore(){
            this.$router.push({
                name: 'UserList',
            });
        },
        goToDetail(id) {
            this.$router.push({
                name: 'UserDetail',
              path:'user/detail',
                query: {id: id}
            })
        },
    }
  }
</script>

<style lang="scss">

</style>
