MarkDetailProgress.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <div class="mark-detail-progress">
  3. <div class="box-justify part-box part-box-pad">
  4. <el-breadcrumb separator="|">
  5. <el-breadcrumb-item
  6. >考生人数:{{ summary.studentCount }}</el-breadcrumb-item
  7. >
  8. <el-breadcrumb-item
  9. >已扫描人数:{{ summary.uploadCount }}</el-breadcrumb-item
  10. >
  11. <el-breadcrumb-item
  12. >缺考人数:{{ summary.absentCount }}</el-breadcrumb-item
  13. >
  14. <el-breadcrumb-item
  15. >阅卷进度:{{ summary.percent || 0 }}%</el-breadcrumb-item
  16. >
  17. </el-breadcrumb>
  18. <div>
  19. <el-button type="primary" @click="initData">查询</el-button>
  20. <el-button
  21. type="primary"
  22. :loading="downloading"
  23. icon="el-icon-download"
  24. @click="toExport"
  25. >导出评卷员工作量</el-button
  26. >
  27. </div>
  28. </div>
  29. <div v-if="openMarkClass" class="part-box part-box-pad">
  30. <div class="part-box-head">
  31. <h3>班级评卷进度</h3>
  32. </div>
  33. <el-form label-position="left" label-width="0" inline>
  34. <el-form-item>
  35. <el-input
  36. v-model.trim="filter.className"
  37. placeholder="班级"
  38. clearable
  39. >
  40. </el-input>
  41. </el-form-item>
  42. <el-form-item>
  43. <el-button type="primary" @click="getList(1)">查询</el-button>
  44. </el-form-item>
  45. </el-form>
  46. <el-table ref="TableList" :data="classList">
  47. <el-table-column
  48. prop="className"
  49. label="班级"
  50. min-width="200"
  51. ></el-table-column>
  52. <el-table-column
  53. class-name="action-column"
  54. label="评卷员"
  55. align="center"
  56. min-width="100"
  57. >
  58. <template slot-scope="scope">
  59. <el-button
  60. class="btn-primary"
  61. type="text"
  62. @click="toMarker(scope.row)"
  63. >{{ scope.row.markerCount }}</el-button
  64. >
  65. </template>
  66. </el-table-column>
  67. <el-table-column
  68. prop="taskCount"
  69. label="任务总数"
  70. min-width="100"
  71. ></el-table-column>
  72. <el-table-column
  73. prop="markedCount"
  74. label="完成总数"
  75. min-width="100"
  76. ></el-table-column>
  77. <el-table-column
  78. prop="leftCount"
  79. label="剩余总数"
  80. min-width="100"
  81. ></el-table-column>
  82. <el-table-column prop="percent" label="评卷进度" min-width="100">
  83. <span slot-scope="scope">{{ scope.row.percent || 0 }}%</span>
  84. </el-table-column>
  85. <el-table-column
  86. class-name="action-column"
  87. label="待仲裁数"
  88. width="100"
  89. align="center"
  90. fixed="right"
  91. >
  92. <template slot-scope="scope">
  93. <el-button
  94. class="btn-primary"
  95. type="text"
  96. @click="toArbitrate(scope.row)"
  97. >{{ scope.row.arbitrateCount }}</el-button
  98. >
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. class-name="action-column"
  103. label="操作"
  104. width="100"
  105. align="center"
  106. fixed="right"
  107. >
  108. <template slot-scope="scope">
  109. <el-button
  110. class="btn-primary"
  111. type="text"
  112. @click="toDetail(scope.row)"
  113. >查看详情</el-button
  114. >
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <div class="part-page">
  119. <el-pagination
  120. background
  121. layout="total, sizes, prev, pager, next, jumper"
  122. :pager-count="5"
  123. :current-page="current"
  124. :total="total"
  125. :page-size="size"
  126. @current-change="toPage"
  127. @size-change="pageSizeChange"
  128. >
  129. </el-pagination>
  130. </div>
  131. </div>
  132. <div class="part-box part-box-pad">
  133. <div class="part-box-head">
  134. <h3>题目评卷进度</h3>
  135. </div>
  136. <el-table ref="TableList" :data="questionList">
  137. <el-table-column
  138. prop="questionNumber"
  139. label="评阅题目"
  140. width="120"
  141. ></el-table-column>
  142. <el-table-column
  143. class-name="action-column"
  144. label="评卷员"
  145. align="center"
  146. min-width="100"
  147. >
  148. <template slot-scope="scope">
  149. <el-button
  150. class="btn-primary"
  151. type="text"
  152. @click="toMarker(scope.row)"
  153. >{{ scope.row.markerCount }}</el-button
  154. >
  155. </template>
  156. </el-table-column>
  157. <el-table-column
  158. prop="taskCount"
  159. label="任务总数"
  160. width="100"
  161. ></el-table-column>
  162. <el-table-column
  163. prop="markedCount"
  164. label="完成总数"
  165. width="100"
  166. ></el-table-column>
  167. <el-table-column
  168. prop="leftCount"
  169. label="剩余总数"
  170. width="100"
  171. ></el-table-column>
  172. <el-table-column
  173. prop="currentCount"
  174. label="正在评卷"
  175. width="100"
  176. ></el-table-column>
  177. <el-table-column prop="percent" label="评卷进度" width="100">
  178. <span slot-scope="scope">{{ scope.row.percent || 0 }}%</span>
  179. </el-table-column>
  180. <el-table-column
  181. class-name="action-column"
  182. label="待仲裁数"
  183. width="100"
  184. align="center"
  185. fixed="right"
  186. >
  187. <template slot-scope="scope">
  188. <el-button
  189. class="btn-primary"
  190. type="text"
  191. @click="toArbitrate(scope.row)"
  192. >{{ scope.row.arbitrateCount }}</el-button
  193. >
  194. </template>
  195. </el-table-column>
  196. </el-table>
  197. </div>
  198. <class-mark-progress-dialog
  199. ref="ClassMarkProgressDialog"
  200. :data="curClass"
  201. />
  202. </div>
  203. </template>
  204. <script>
  205. import {
  206. markProgressSummary,
  207. markProgressClassListPage,
  208. markProgressMarkerExport,
  209. } from "../../api";
  210. import { downloadByApi } from "@/plugins/download";
  211. import ClassMarkProgressDialog from "./ClassMarkProgressDialog.vue";
  212. export default {
  213. name: "mark-detail-progress",
  214. components: {
  215. ClassMarkProgressDialog,
  216. },
  217. props: {
  218. baseInfo: {
  219. type: Object,
  220. default() {
  221. return {};
  222. },
  223. },
  224. },
  225. data() {
  226. return {
  227. filter: {
  228. className: "",
  229. },
  230. size: this.GLOBAL.pageSize,
  231. current: 1,
  232. total: 0,
  233. classList: [],
  234. curClass: {},
  235. summary: {},
  236. questionList: [],
  237. curRow: {},
  238. openMarkClass: false,
  239. downloading: false,
  240. };
  241. },
  242. mounted() {
  243. this.initData();
  244. },
  245. methods: {
  246. async initData() {
  247. await this.getSummary();
  248. if (this.openMarkClass) this.toPage(1);
  249. },
  250. async getSummary() {
  251. const res = await markProgressSummary({
  252. examId: this.baseInfo.examId,
  253. paperNumber: this.baseInfo.paperNumber,
  254. });
  255. this.summary = res.totalInfo || {
  256. studentCount: "",
  257. uploadCount: "",
  258. absentCount: "",
  259. percent: "",
  260. };
  261. this.questionList = res.groupInfo || [];
  262. this.openMarkClass = res.openMarkClass;
  263. },
  264. async getList() {
  265. const datas = {
  266. examId: this.baseInfo.examId,
  267. paperNumber: this.baseInfo.paperNumber,
  268. ...this.filter,
  269. pageNumber: this.current,
  270. pageSize: this.size,
  271. };
  272. const data = await markProgressClassListPage(datas);
  273. if (!data) return;
  274. this.classList = data.records;
  275. this.total = data.total;
  276. },
  277. toPage(page) {
  278. this.current = page;
  279. this.getList();
  280. },
  281. toArbitrate(row) {
  282. if (row.className) this.$ls.set("preset-className", row.className);
  283. this.$ls.set("preset-questionId", row.questionId);
  284. this.$emit("to-menu", "arbitration");
  285. },
  286. toMarker(row) {
  287. if (row.className) this.$ls.set("preset-className", row.className);
  288. this.$ls.set("preset-questionId", row.questionId);
  289. this.$emit("to-menu", "marker");
  290. },
  291. async toExport() {
  292. if (this.downloading) return;
  293. this.downloading = true;
  294. const res = await downloadByApi(() => {
  295. return markProgressMarkerExport({
  296. examId: this.baseInfo.examId,
  297. courseId: this.baseInfo.courseId,
  298. paperNumber: this.baseInfo.paperNumber,
  299. });
  300. }).catch((e) => {
  301. this.$message.error(e || "下载失败,请重新尝试!");
  302. });
  303. this.downloading = false;
  304. if (!res) return;
  305. this.$message.success("下载成功!");
  306. },
  307. toDetail(row) {
  308. this.curClass = row;
  309. this.$refs.ClassMarkProgressDialog.open();
  310. },
  311. },
  312. };
  313. </script>