<template>
  <div>
    <a-table :columns="columns" :data-source="dataList">
      <template slot="date" slot-scope="text, record, index">
        全天<a-button style="margin-left: 6px;" type="primary" size="small">进入考试</a-button>
      </template>
    </a-table>
  </div>
</template>

<script>
import { reqSimulateTestList } from '@/api/mycourse/index'
export default {
  data () {
    return {
      columns: [
        { dataIndex: 'courseName', title: '课程' },
        { dataIndex: 'type', title: '考核方式' },
        { dataIndex: 'examType', title: '考试方式' },
        { dataIndex: 'subType', title: '提交形式' },
        { dataIndex: 'date', title: '考试时间段', scopedSlots: { customRender: 'date' } },
        { dataIndex: 'time', title: '考试时长' }
      ],
      dataList: [
      ]
    }
  },
  mounted () {
    this.initData()
  },
  methods: {
    initData () {
      const { person } = this.$store.state.user
      reqSimulateTestList({ personId: person.id, projectId: this.$route.query.courseId }).then(res => {
        // console.log('模拟', res)
        this.dataList = res.data
      })
    }
  }
}
</script>

<style></style>
