scoring.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <div class="app-container">
  3. <form-search
  4. :searchformShow="{ subjectid: '', gradeid: '', semester: '', exam: '' }"
  5. @handleQuery="handleQuery"
  6. @resetQuery="resetQuery"
  7. ></form-search>
  8. <evaluation-title
  9. title="测评试卷"
  10. :subTitle="`共有${total}个内容`"
  11. ></evaluation-title>
  12. <el-row :gutter="10">
  13. <el-col
  14. class="evaluation-card-wrapper"
  15. v-for="(item, idx) in dataList"
  16. :key="idx"
  17. :xs="12"
  18. :sm="8"
  19. :md="8"
  20. :lg="6"
  21. :xl="6"
  22. >
  23. <evaluation-card
  24. @click.native="detail(item)"
  25. :title="item.name"
  26. :sub-title="item.subjectName"
  27. :state-options="mxGlobal.MergeEvalInspectionStates(item.stateStr)"
  28. :state="item.stateStr"
  29. :proportion="item.scoringType == 1 ? '自阅卷' : '老师阅卷'"
  30. ></evaluation-card>
  31. </el-col>
  32. </el-row>
  33. <pagination
  34. v-show="total > 0"
  35. :total="total"
  36. :page.sync="queryParams.pageNum"
  37. :limit.sync="queryParams.pageSize"
  38. :page-size="20"
  39. @pagination="getList"
  40. />
  41. </div>
  42. </template>
  43. <script>
  44. import { getEvaluationForTest } from '@/api/webApi/studentEvaluating'
  45. import Treeselect from '@riophae/vue-treeselect'
  46. import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  47. import IconSelect from '@/components/IconSelect'
  48. import transferMixin from '@/components/mx-transfer-mixin'
  49. export default {
  50. mixins: [transferMixin],
  51. name: 'Menu',
  52. components: { Treeselect, IconSelect },
  53. data() {
  54. return {
  55. total: 0,
  56. // 遮罩层
  57. loading: true,
  58. // 显示状态数据字典
  59. visibleOptions: [],
  60. // 菜单状态数据字典
  61. statusOptions: [],
  62. // 查询参数
  63. queryParams: {
  64. classId: '',
  65. catalogId: '1',
  66. pageNum: 1,
  67. pageSize: 20
  68. },
  69. dataList: [],
  70. viewName: ''
  71. }
  72. },
  73. created() {
  74. this.viewName = this.$route.name
  75. this.handleQuery()
  76. },
  77. methods: {
  78. detail(item) {
  79. if (item.evaluationClassId) {
  80. this.transferTo('/evaluating/answer', { evaluationClassId: item.evaluationClassId })
  81. } else {
  82. this.$message.error(item.stateStr + '状态不能查看试卷!')
  83. }
  84. },
  85. /** 测评列表 */
  86. getList() {
  87. this.loading = true
  88. let Ajax = {
  89. catalogId: this.queryParams.catalogId,
  90. pageNum: this.queryParams.pageNum,
  91. pageSize: this.queryParams.pageSize,
  92. subjectId: this.queryParams.subjectid,
  93. gradeId: this.queryParams.gradeid,
  94. termId: this.queryParams.semester,
  95. typeId: this.queryParams.exam,
  96. examineeType: '1' // 区分"测评"页
  97. }
  98. getEvaluationForTest(Ajax)
  99. .then((response) => {
  100. this.dataList = response.rows
  101. this.total = response.total
  102. this.loading = false
  103. })
  104. .catch((err) => {
  105. this.loading = false
  106. })
  107. },
  108. /** 搜索按钮操作 */
  109. handleQuery(data = {}) {
  110. this.queryParams.gradeid = data.gradeid
  111. this.queryParams.subjectid = data.subjectid
  112. this.queryParams.semester = data.semester
  113. this.queryParams.exam = data.exam
  114. this.getList()
  115. },
  116. handleSizeChange(val) {
  117. console.log(`每页 ${val} 条`)
  118. },
  119. handleCurrentChange(val) {
  120. console.log(`当前页: ${val}`)
  121. },
  122. /** 重置按钮操作 */
  123. resetQuery(data) {
  124. this.handleQuery()
  125. }
  126. }
  127. }
  128. </script>