MarkDetailQuality.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div class="mark-detail-quality">
  3. <div class="part-box part-box-filter part-box-flex">
  4. <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
  5. <el-form-item label="评阅题目">
  6. <el-select
  7. v-model="filter.questionId"
  8. placeholder="评阅题目"
  9. clearable
  10. >
  11. <el-option
  12. v-for="group in questions"
  13. :key="group.questionId"
  14. :value="group.questionId"
  15. :label="group.questionNumber"
  16. ></el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="评卷员">
  20. <el-input
  21. v-model.trim="filter.loginName"
  22. placeholder="评卷员姓名"
  23. clearable
  24. >
  25. </el-input>
  26. </el-form-item>
  27. <el-form-item label-width="0px">
  28. <el-button type="primary" @click="search">查询</el-button>
  29. </el-form-item>
  30. </el-form>
  31. <div class="part-box-action">
  32. <el-button type="primary" icon="el-icon-refresh-left" @click="toReset">
  33. 重新计算
  34. </el-button>
  35. <el-button type="primary" icon="el-icon-data-line" @click="toViewLine">
  36. 给分曲线
  37. </el-button>
  38. </div>
  39. </div>
  40. <div class="part-box part-box-pad">
  41. <el-table
  42. ref="TableList"
  43. :data="dataList"
  44. @selection-change="handleSelectionChange"
  45. >
  46. <el-table-column
  47. type="selection"
  48. fixed="left"
  49. width="55"
  50. align="center"
  51. ></el-table-column>
  52. <el-table-column prop="loginName" label="评卷员" min-width="100">
  53. <template slot-scope="scope">
  54. <el-tag size="medium">
  55. {{ scope.row.name }}({{ scope.row.loginName }})
  56. </el-tag>
  57. </template>
  58. </el-table-column>
  59. <el-table-column
  60. prop="questionNumber"
  61. label="评阅题目"
  62. width="120"
  63. ></el-table-column>
  64. <el-table-column
  65. prop="finishCount"
  66. label="完成任务数"
  67. width="100"
  68. ></el-table-column>
  69. <el-table-column prop="adoptionRate" label="评卷采用率" width="100">
  70. <span slot-scope="scope">{{ scope.row.adoptionRate || 0 }}%</span>
  71. </el-table-column>
  72. <el-table-column
  73. prop="avgSpeed"
  74. label="评卷速度(秒)"
  75. width="100"
  76. ></el-table-column>
  77. <el-table-column
  78. prop="avgScore"
  79. label="平均分"
  80. width="100"
  81. ></el-table-column>
  82. <el-table-column
  83. prop="maxScore"
  84. label="最高分"
  85. width="100"
  86. ></el-table-column>
  87. <el-table-column
  88. prop="minScore"
  89. label="最低分"
  90. width="100"
  91. ></el-table-column>
  92. </el-table>
  93. <div class="part-page">
  94. <el-pagination
  95. background
  96. layout="total, sizes, prev, pager, next, jumper"
  97. :pager-count="5"
  98. :current-page="current"
  99. :total="total"
  100. :page-size="size"
  101. @current-change="toPage"
  102. @size-change="pageSizeChange"
  103. >
  104. </el-pagination>
  105. </div>
  106. </div>
  107. <!-- QualityChartDialog -->
  108. <quality-chart-dialog
  109. ref="QualityChartDialog"
  110. :data="chartData"
  111. ></quality-chart-dialog>
  112. </div>
  113. </template>
  114. <script>
  115. import {
  116. markQualityListPage,
  117. markQualityUpdate,
  118. markGroupQuestions,
  119. } from "../../api";
  120. import QualityChartDialog from "./QualityChartDialog.vue";
  121. export default {
  122. name: "mark-detail-quality",
  123. props: {
  124. baseInfo: {
  125. type: Object,
  126. default() {
  127. return {};
  128. },
  129. },
  130. },
  131. components: { QualityChartDialog },
  132. data() {
  133. return {
  134. filter: {
  135. questionId: "",
  136. loginName: "",
  137. },
  138. current: 1,
  139. size: this.GLOBAL.pageSize,
  140. total: 0,
  141. dataList: [],
  142. multipleSelection: [],
  143. chartData: {},
  144. questions: [],
  145. };
  146. },
  147. mounted() {
  148. this.getQuestions();
  149. this.search();
  150. },
  151. methods: {
  152. async getQuestions() {
  153. const res = await markGroupQuestions({
  154. examId: this.baseInfo.examId,
  155. paperNumber: this.baseInfo.paperNumber,
  156. });
  157. this.questions = res || [];
  158. },
  159. async getList() {
  160. const datas = {
  161. ...this.filter,
  162. examId: this.baseInfo.examId,
  163. paperNumber: this.baseInfo.paperNumber,
  164. pageNumber: this.current,
  165. pageSize: this.size,
  166. };
  167. const data = await markQualityListPage(datas);
  168. this.dataList = data.records;
  169. this.total = data.total;
  170. },
  171. toPage(page) {
  172. this.current = page;
  173. this.getList();
  174. },
  175. search() {
  176. this.toPage(1);
  177. },
  178. handleSelectionChange(val) {
  179. this.multipleSelection = val.map((item) => item.markUserQuestionId);
  180. },
  181. async toReset(row) {
  182. const confirm = await this.$confirm("确定要重新计算吗?", "提示", {
  183. type: "warning",
  184. }).catch(() => {});
  185. if (confirm !== "confirm") return;
  186. await markQualityUpdate({
  187. examId: this.baseInfo.examId,
  188. paperNumber: this.baseInfo.paperNumber,
  189. questionId: this.filter.questionId || undefined,
  190. });
  191. this.$message.success("操作成功!");
  192. this.getList();
  193. },
  194. toViewLine() {
  195. if (!this.filter.questionId) {
  196. this.$message.error("请先选择评阅题目");
  197. return;
  198. }
  199. this.chartData = {
  200. examId: this.baseInfo.examId,
  201. paperNumber: this.baseInfo.paperNumber,
  202. questionId: this.filter.questionId,
  203. };
  204. this.$refs.QualityChartDialog.open();
  205. },
  206. },
  207. };
  208. </script>