CourseDetail.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <div>
  3. <LinkTitlesCustom :currentPaths="['评卷总览', '评卷进度', '课程详情']" />
  4. <section class="content">
  5. <div class="box box-info">
  6. <div class="box-body">
  7. <el-form
  8. :inline="true"
  9. :model="formSearch"
  10. label-position="right"
  11. label-width="60px"
  12. >
  13. <el-form-item label="登录名" class="pull-left">
  14. <el-input
  15. placeholder="登录名"
  16. v-model="formSearch.userLoginName"
  17. ></el-input>
  18. </el-form-item>
  19. <el-form-item label="姓名" class="pull-left">
  20. <el-input
  21. placeholder="姓名"
  22. v-model="formSearch.userName"
  23. ></el-input>
  24. </el-form-item>
  25. <el-form-item>
  26. <el-button
  27. size="small"
  28. type="primary"
  29. icon="el-icon-search"
  30. @click="searchSetting"
  31. >查询</el-button
  32. >
  33. <!--
  34. <el-button size="small" type="primary" icon="info" @click="exportMarker">导出</el-button>
  35. -->
  36. <el-button
  37. size="small"
  38. type="primary"
  39. icon="el-icon-arrow-left"
  40. @click="back"
  41. >返回</el-button
  42. >
  43. </el-form-item>
  44. </el-form>
  45. <div class="block-seperator"></div>
  46. <!-- 页面列表 -->
  47. <el-table
  48. stripe
  49. v-loading="loading"
  50. element-loading-text="拼命加载中"
  51. :data="tableData"
  52. border
  53. style="width: 100%"
  54. >
  55. <el-table-column label="姓名" width="200" prop="userName" />
  56. <el-table-column
  57. label="登录名"
  58. min-width="100"
  59. prop="userLoginName"
  60. />
  61. <el-table-column
  62. label="试卷类型"
  63. min-width="200"
  64. prop="markRangeName"
  65. />
  66. <el-table-column
  67. label="完成数量"
  68. min-width="100"
  69. prop="markedCount"
  70. sortable
  71. />
  72. <el-table-column
  73. label="最低分"
  74. min-width="100"
  75. prop="minScore"
  76. sortable
  77. />
  78. <el-table-column
  79. label="最高分"
  80. min-width="100"
  81. prop="maxScore"
  82. sortable
  83. />
  84. <el-table-column
  85. label="平均分"
  86. min-width="100"
  87. prop="avgScore"
  88. sortable
  89. />
  90. <el-table-column
  91. label="标准方差"
  92. min-width="100"
  93. prop="stdDev"
  94. sortable
  95. />
  96. </el-table>
  97. <div class="page pull-right">
  98. <el-pagination
  99. background
  100. @current-change="handleSettingCurrentChange"
  101. @size-change="handleSizeChange"
  102. :current-page="currentPage"
  103. :page-size="pageSize"
  104. :page-sizes="[10, 20, 50, 100]"
  105. layout="total, sizes, prev, pager, next, jumper"
  106. :total="total"
  107. ></el-pagination>
  108. </div>
  109. </div>
  110. </div>
  111. </section>
  112. </div>
  113. </template>
  114. <script>
  115. import { DATA_PROCESS_API } from "@/constants/constants";
  116. import { mapState } from "vuex";
  117. import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
  118. export default {
  119. data() {
  120. return {
  121. formSearch: {
  122. userLoginName: "",
  123. userName: ""
  124. },
  125. tableData: [],
  126. oldData: [],
  127. currentPage: 1,
  128. pageSize: 10,
  129. total: 10,
  130. loading: true,
  131. workId: "",
  132. examId: "",
  133. courseCode: ""
  134. };
  135. },
  136. components: {
  137. LinkTitlesCustom
  138. },
  139. methods: {
  140. handleSettingCurrentChange(val) {
  141. this.currentPage = val;
  142. this.searchSetting();
  143. },
  144. handleSizeChange(val) {
  145. this.pageSize = val;
  146. this.searchSetting();
  147. },
  148. pagingSetting() {
  149. var start = (this.currentPage - 1) * this.pageSize;
  150. var end =
  151. this.currentPage * this.pageSize < this.total
  152. ? this.currentPage * this.pageSize
  153. : this.total;
  154. var tempData = [];
  155. console.log(`当前页: ${this.currentPage},开始:${start},结束:${end}`);
  156. for (let i = start; i < end; i++) {
  157. tempData.push(this.tableData[i]);
  158. }
  159. this.tableData = tempData;
  160. },
  161. initSetting() {
  162. this.loading = true;
  163. this.$http
  164. .get(
  165. DATA_PROCESS_API +
  166. "/markTasks/all/0/" +
  167. this.pageSize +
  168. "?workId=" +
  169. this.workId +
  170. "&examId=" +
  171. this.examId +
  172. "&courseCode=" +
  173. this.courseCode
  174. )
  175. .then(response => {
  176. console.log(response);
  177. this.tableData = response.data.content;
  178. this.total = response.data.totalElements;
  179. this.loading = false;
  180. });
  181. },
  182. searchSetting() {
  183. this.loading = true;
  184. this.$http
  185. .get(
  186. DATA_PROCESS_API +
  187. "/markTasks/all/" +
  188. (this.currentPage - 1) +
  189. "/" +
  190. this.pageSize +
  191. "?workId=" +
  192. this.workId +
  193. "&examId=" +
  194. this.examId +
  195. "&courseCode=" +
  196. this.courseCode,
  197. { params: this.formSearch }
  198. )
  199. .then(response => {
  200. console.log(response);
  201. this.tableData = response.data.content;
  202. this.total = response.data.totalElements;
  203. this.loading = false;
  204. });
  205. },
  206. exportMarker() {
  207. window.location.href =
  208. "/api/ecs_data_process/markTasks/exportMarker?workId=" +
  209. this.workId +
  210. "&examId=" +
  211. this.examId +
  212. "&courseCode=" +
  213. this.courseCode;
  214. },
  215. back() {
  216. this.$router.back();
  217. // this.$router.push({
  218. // path: "/marking/mark_work_overview"
  219. // });
  220. }
  221. },
  222. computed: {
  223. ...mapState({ user: state => state.user })
  224. },
  225. created() {
  226. this.workId = this.$route.params.workId;
  227. this.examId = this.$route.params.examId;
  228. this.courseCode = this.$route.params.courseCode;
  229. this.initSetting();
  230. }
  231. };
  232. </script>
  233. <style lang="css" scoped>
  234. li {
  235. list-style-type: none;
  236. }
  237. .searchFrame {
  238. margin-right: 10px;
  239. margin-bottom: 10px;
  240. }
  241. .page{
  242. margin-top: 10px;
  243. }
  244. .f_button{
  245. display:block;
  246. width:57px;
  247. height:20px;
  248. border:1px solid #CCC;
  249. background:#FFF;
  250. font-size: small;
  251. }
  252. </style>