ClassMarkProgressDialog.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <el-dialog
  3. class="class-mark-progress-dialog"
  4. :visible.sync="modalIsShow"
  5. :title="data.className"
  6. top="10vh"
  7. width="500px"
  8. :close-on-click-modal="false"
  9. :close-on-press-escape="false"
  10. append-to-body
  11. @opened="visibleChange"
  12. @close="closeHandle"
  13. >
  14. <el-table :data="dataList">
  15. <el-table-column
  16. prop="groupQuestions"
  17. label="评阅题目"
  18. width="120"
  19. ></el-table-column>
  20. <el-table-column
  21. prop="taskCount"
  22. label="任务总数"
  23. width="100"
  24. ></el-table-column>
  25. <el-table-column
  26. prop="markedCount"
  27. label="完成总数"
  28. width="100"
  29. ></el-table-column>
  30. <el-table-column prop="loginName" label="评卷员" min-width="100">
  31. <template slot-scope="scope">
  32. {{ scope.row.name }}({{ scope.row.loginName }})
  33. </template>
  34. </el-table-column>
  35. </el-table>
  36. <div slot="footer"></div>
  37. </el-dialog>
  38. </template>
  39. <script>
  40. import { markProgressClassQuestionListPage } from "../../api";
  41. export default {
  42. name: "class-mark-progress-dialog",
  43. props: {
  44. data: {
  45. type: Object,
  46. default() {
  47. return {};
  48. },
  49. },
  50. },
  51. data() {
  52. return {
  53. modalIsShow: false,
  54. dataList: [],
  55. };
  56. },
  57. methods: {
  58. visibleChange() {
  59. this.initData();
  60. },
  61. closeHandle() {
  62. this.dataList = [];
  63. },
  64. cancel() {
  65. this.modalIsShow = false;
  66. },
  67. open() {
  68. this.modalIsShow = true;
  69. },
  70. async initData() {
  71. const res = await markProgressClassQuestionListPage(this.data);
  72. this.dataList = res || [];
  73. },
  74. },
  75. };
  76. </script>