<template>
  <div>
    <div class="mb10">
      <el-card style="color: #5E5E5E;" ref="navBar">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item :to="{ path: '/career/plan/CareerEva'}">生涯规划</el-breadcrumb-item>
          <el-breadcrumb-item>测评记录</el-breadcrumb-item>
        </el-breadcrumb>
      </el-card>
    </div>
    <el-card>
      <el-table :data="tableData" script border v-loading="loading">
        <el-table-column prop="id" width="100" label="ID" align="center"></el-table-column>
        <el-table-column prop="createTime" width="180" label="测试时间" align="center"></el-table-column>
        <el-table-column prop="scorer" label="现实型" align="center"></el-table-column>
        <el-table-column prop="scorei" label="调查型"  align="center"></el-table-column>
        <el-table-column prop="scorea" label="艺术型"  align="center"></el-table-column>
        <el-table-column prop="scores" label="社会型" align="center"></el-table-column>
        <el-table-column prop="scoree" label="企业型"  align="center"></el-table-column>
        <el-table-column prop="scorec" label="常规型" align="center"></el-table-column>
        <el-table-column label="评测结果"  align="center">
          <template slot-scope="scope">
            <el-link type="primary" :underline="false"> {{scope.row.ruleCode}}</el-link>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        style="margin-top:10px;"
        :page-sizes="[10,20,30,40,50,60,70,80,90,100]"
        :page-size=tableParams.limit
        layout="prev,pager,next,jumper,total,sizes"
        :total="tableParams.examRecordTotal"
        @current-change="currentChange"
        @size-change="sizeChange"
      >
      </el-pagination>
    </el-card>

  </div>
</template>

<script>
  import { selectReportList} from '@/api/webApi/career-evalua'
  export default {
    name: "CareerHollandReportList",
    data(){
      return {
        tableParams:{
          examRecordTotal:0,
          pageSize:1,
          limit:20
        },
        tableData:[],
        loading:false
      }
    },
    watch:{
      '$route':{
        immediate:true,
        handler(val){
          this.getReportList();
        }
      }
    },
    methods:{
      goDetails(id){
        // this.$router.push({ name: 'UniversityDetail', params: { id: id } })
      },
      sizeChange(e){
        //每页条数
        this.tableParams.limit=e
        this.getReportList()
      },
      currentChange(e){
        //页数
        this.tableParams.pageSize=e
        this.getReportList()
      },
      getReportList(){
        this.loading=true
        const params={
          pageNum:this.tableParams.pageSize,  //页数
          pageSize:this.tableParams.limit  //每页的数量
        }
        selectReportList(params).then(res=>{
          this.tableData=res.rows
          this.tableParams.examRecordTotal=res.total
          this.loading=false
        })
      }
    }
  }
</script>

<style lang="scss">
  #univerTable{
    .el-table .descending .sort-caret.descending{
      border-top-color:#ffffff;
    }
    .el-table .ascending .sort-caret.ascending{
      border-bottom-color:#ffffff;
    }
  }
</style>

