StudentLogDetailDialog.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <el-dialog
  3. class="student-log-detail-dialog"
  4. :visible.sync="modalIsShow"
  5. title="日志详情"
  6. width="1000px"
  7. top="94px"
  8. :close-on-click-modal="false"
  9. :close-on-press-escape="false"
  10. append-to-body
  11. @open="visibleChange"
  12. >
  13. <el-table ref="TableList" :data="dataList">
  14. <el-table-column prop="creatTime" label="发生时间"></el-table-column>
  15. <el-table-column prop="type" label="事件类型"></el-table-column>
  16. <el-table-column prop="remark" label="详情"></el-table-column>
  17. </el-table>
  18. <div class="part-page">
  19. <el-pagination
  20. background
  21. layout="prev, pager, next,total,sizes,jumper"
  22. :current-page="current"
  23. :total="total"
  24. :page-size="size"
  25. @size-change="toPage(1)"
  26. @current-change="toPage"
  27. >
  28. </el-pagination>
  29. </div>
  30. <div slot="footer"></div>
  31. </el-dialog>
  32. </template>
  33. <script>
  34. import { studentLogDetail } from "@/api/invigilation";
  35. export default {
  36. name: "student-log-detail-dialog",
  37. props: {
  38. detailId: {
  39. type: [String, Number],
  40. required: true,
  41. },
  42. },
  43. data() {
  44. return {
  45. modalIsShow: false,
  46. current: 1,
  47. total: 0,
  48. size: 10,
  49. dataList: [],
  50. };
  51. },
  52. methods: {
  53. visibleChange() {
  54. this.toPage(1);
  55. },
  56. async getList() {
  57. const datas = {
  58. examStudentId: this.detailId,
  59. pageNumber: this.current - 1,
  60. pageSize: this.size,
  61. };
  62. const res = await studentLogDetail(datas);
  63. this.dataList = res.data.data.records;
  64. this.total = res.data.data.total;
  65. },
  66. toPage(page) {
  67. this.current = page;
  68. this.getList();
  69. },
  70. cancel() {
  71. this.modalIsShow = false;
  72. },
  73. open() {
  74. this.modalIsShow = true;
  75. },
  76. },
  77. };
  78. </script>