TargetReportManage.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <div class="target-report-manage">
  3. <div class="part-box part-box-filter part-box-flex">
  4. <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
  5. <template v-if="checkPrivilege('condition', 'condition')">
  6. <secp-select
  7. v-model="filter"
  8. defaultSelectExam
  9. @exam-default="search"
  10. ></secp-select>
  11. </template>
  12. <el-form-item label-width="0px">
  13. <el-button
  14. v-if="checkPrivilege('button', 'select')"
  15. type="primary"
  16. @click="search"
  17. >查询</el-button
  18. >
  19. </el-form-item>
  20. </el-form>
  21. </div>
  22. <div class="part-box part-box-pad">
  23. <el-table ref="TableList" :data="dataList">
  24. <el-table-column
  25. type="index"
  26. label="序号"
  27. width="70"
  28. :index="indexMethod"
  29. ></el-table-column>
  30. <el-table-column label="课程(代码)">
  31. <template slot-scope="scope">
  32. {{ scope.row.courseName | defaultFieldFilter }}({{
  33. scope.row.courseCode | defaultFieldFilter
  34. }})
  35. </template>
  36. </el-table-column>
  37. <el-table-column
  38. prop="paperNumber"
  39. label="试卷编码"
  40. min-width="200"
  41. ></el-table-column>
  42. <el-table-column
  43. class-name="action-column"
  44. label="操作"
  45. width="140"
  46. fixed="right"
  47. >
  48. <template slot-scope="scope">
  49. <el-button
  50. v-if="checkPrivilege('link', 'preview')"
  51. class="btn-primary"
  52. type="text"
  53. @click="toDetail(scope.row)"
  54. >管理成绩</el-button
  55. >
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. <div class="part-page">
  60. <el-pagination
  61. background
  62. layout="total, sizes, prev, pager, next, jumper"
  63. :pager-count="5"
  64. :current-page="current"
  65. :total="total"
  66. :page-size="size"
  67. @current-change="toPage"
  68. @size-change="pageSizeChange"
  69. >
  70. </el-pagination>
  71. </div>
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import { targetScoreListPage } from "../api";
  77. export default {
  78. name: "target-report-manage",
  79. data() {
  80. return {
  81. filter: {
  82. semesterId: "",
  83. examId: "",
  84. courseCode: "",
  85. },
  86. current: 1,
  87. size: this.GLOBAL.pageSize,
  88. total: 0,
  89. dataList: [],
  90. curRow: {},
  91. };
  92. },
  93. methods: {
  94. async getList() {
  95. if (!this.checkPrivilege("list", "list")) return;
  96. const datas = {
  97. ...this.filter,
  98. pageNumber: this.current,
  99. pageSize: this.size,
  100. };
  101. const data = await targetScoreListPage(datas);
  102. this.dataList = data.records;
  103. this.total = data.total;
  104. },
  105. toPage(page) {
  106. this.current = page;
  107. this.getList();
  108. },
  109. search() {
  110. this.toPage(1);
  111. },
  112. toDetail(row) {
  113. this.curRow = row;
  114. },
  115. },
  116. };
  117. </script>