ReportException.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div class="report-exception">
  3. <el-table ref="TableList" :data="dataList">
  4. <el-table-column type="index" label="排序"></el-table-column>
  5. <el-table-column prop="examName" label="批次名称(ID)"></el-table-column>
  6. <el-table-column prop="examActivityId" label="场次ID"></el-table-column>
  7. <el-table-column prop="examroom" label="考场名称(代码)">
  8. <span slot-scope="scope"
  9. >{{ scope.row.roomName }}({{ scope.row.roomCode }})</span
  10. >
  11. </el-table-column>
  12. <el-table-column prop="identity" label="证件号"></el-table-column>
  13. <el-table-column prop="name" label="姓名"></el-table-column>
  14. <el-table-column prop="courseCode" label="科目名称(代码)">
  15. <span slot-scope="scope"
  16. >{{ scope.row.courseName }}({{ scope.row.courseCode }})</span
  17. ></el-table-column
  18. >
  19. <el-table-column prop="exceptionCount" label="次数"></el-table-column>
  20. <el-table-column
  21. prop="exceptionTotalTime"
  22. label="累积持续时长(单位:分钟)"
  23. ></el-table-column>
  24. <el-table-column label="操作">
  25. <template slot-scope="scope">
  26. <el-button
  27. class="btn-table-icon"
  28. type="primary"
  29. icon="icon icon-view"
  30. @click="toDetail(scope.row)"
  31. >详情</el-button
  32. >
  33. </template>
  34. </el-table-column>
  35. </el-table>
  36. <div class="part-page">
  37. <el-pagination
  38. background
  39. layout="prev, pager, next,total,sizes,jumper"
  40. :current-page="current"
  41. :total="total"
  42. :page-size="size"
  43. @size-change="toPage(1)"
  44. @current-change="toPage"
  45. >
  46. </el-pagination>
  47. </div>
  48. <exception-detail-dialog
  49. :detail-id="detailId"
  50. ref="ExceptionDetailDialog"
  51. ></exception-detail-dialog>
  52. </div>
  53. </template>
  54. <script>
  55. import { reportExceptionData } from "@/api/invigilation";
  56. import ExceptionDetailDialog from "./ExceptionDetailDialog";
  57. export default {
  58. name: "report-exception",
  59. components: { ExceptionDetailDialog },
  60. props: {
  61. filter: {
  62. type: Object,
  63. default() {
  64. return {};
  65. },
  66. },
  67. },
  68. data() {
  69. return {
  70. current: 1,
  71. total: 0,
  72. size: 10,
  73. dataList: [],
  74. detailId: "",
  75. };
  76. },
  77. mounted() {
  78. this.getData();
  79. },
  80. methods: {
  81. async getList() {
  82. const datas = {
  83. ...this.filter,
  84. pageNumber: this.current - 1,
  85. pageSize: this.size,
  86. };
  87. const res = await reportExceptionData(datas);
  88. this.dataList = res.data.data.records;
  89. this.total = res.data.data.total;
  90. },
  91. toPage(page) {
  92. this.current = page;
  93. this.getList();
  94. },
  95. getData() {
  96. this.toPage(1);
  97. },
  98. toDetail(row) {
  99. this.detailId = row.examStudentId;
  100. this.$refs.ExceptionDetailDialog.open();
  101. },
  102. },
  103. };
  104. </script>