<template>
  <div id="lineTable" >
    <mx-table :prop-defines="propsDefine" :rows="tableList" border>
      <template #temp="{row}">
        <el-link  :underline="false" @click="toDetail(row)">
          {{row.collegeCode}}  {{row.universityName}}
        </el-link>
        <p v-if="row.collegeRemark">{{`(${row.collegeRemark})` }}</p>
      </template>
      <template #numReal="{row}">
         <p>{{row.numReal || '-'}}</p>
      </template>
    </mx-table>
  </div>
</template>
<script>
import MxSearchGroup from '@/components/MxSearch/mx-search-group'
import transferMixin from '@/components/mx-transfer-mixin'

export default {
  name: 'UniversitiesLineTable',
  components: {
    MxSearchGroup
  },
  mixins:[transferMixin],
  props: {
    tableList: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      propsDefine:{
        code:{
          label:'院校',
          slot:'temp',
          width:'200'
        },
        location:{
          label:'所在地'
        },
        year:{
          label:'年份'
        },
        batchName:{
          label:'批次/段'
        },
        course:{
          label:'选考要求'
        },
        score:{
          label:'投档分'
        },
        seat:{
          label:'投档分位次'
        },
        numReal:{
          label:'录取数',
          slot:'numReal'
        }
      },
    }
  },
  methods:{
    toDetail(item) {
      this.transferTo('/career/plan/UniversityDetail',{code:item.universityCode})
    },
  }
}
</script>

<style lang="scss">
#lineTable {
  .search {
    .el-input {
      .el-input__inner {
        border-radius: 50px;
      }
    }
  }
}

</style>
