<template>
  <el-dialog
    class="student-log-detail-dialog"
    :visible.sync="modalIsShow"
    title="日志详情"
    width="1000px"
    top="94px"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    append-to-body
    @open="visibleChange"
  >
    <el-table ref="TableList" :data="dataList" border stripe>
      <el-table-column prop="creatTime" label="发生时间"></el-table-column>
      <el-table-column prop="type" label="事件类型"></el-table-column>
      <el-table-column prop="content" label="详情"></el-table-column>
    </el-table>
    <div class="part-page">
      <el-pagination
        background
        layout="prev, pager, next,total,sizes,jumper"
        :current-page="current"
        :total="total"
        :page-size="size"
        @current-change="toPage"
      >
      </el-pagination>
    </div>
    <div slot="footer"></div>
  </el-dialog>
</template>

<script>
// import { updateCourse } from "../api";

export default {
  name: "student-log-detail-dialog",
  props: {
    detailId: {
      type: [String, Number],
      required: true,
    },
  },
  data() {
    return {
      modalIsShow: false,
      current: 1,
      total: 0,
      size: 10,
      dataList: [
        {
          id: 1,
          creatTime: "2020-08-02 15:12:24",
          type: "进入考试",
          content: "MAC地址：",
        },
        {
          id: 2,
          creatTime: "2020-08-02 15:12:24",
          type: "网络断开",
          content: "系统自动重试2次，网络已恢复",
        },
        {
          id: 3,
          creatTime: "2020-08-02 15:12:24",
          type: "重新登录",
          content: "MAC地址：",
        },
      ],
    };
  },
  methods: {
    visibleChange() {
      this.getList();
    },
    getList() {},
    toPage() {},
    cancel() {
      this.modalIsShow = false;
    },
    open() {
      this.modalIsShow = true;
    },
  },
};
</script>
