absent.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <el-container>
  3. <el-main class="el-main-padding">
  4. <commonFormVue
  5. :form="form"
  6. :getExamCondition="getExamCondition"
  7. ></commonFormVue>
  8. <el-col :span="6">
  9. <el-button
  10. @click="search('clickSelectBtn')"
  11. size="small"
  12. icon="el-icon-search"
  13. type="primary"
  14. >查询</el-button
  15. >
  16. <el-button size="small" icon="el-icon-refresh" @click="resetForm"
  17. >重置</el-button
  18. >
  19. </el-col>
  20. <el-row>
  21. <el-col v-show="currentPagePrivileges.ABSENT_EXPORT">
  22. <div class="block-seperator"></div>
  23. <span>操作:</span>
  24. <commonExportVue
  25. :form="form"
  26. :exportUrl="exportUrl"
  27. :exportFileName="exportFileName"
  28. ></commonExportVue>
  29. </el-col>
  30. </el-row>
  31. <el-row class="margin-top-10">
  32. <el-col :span="24">
  33. <el-table
  34. v-loading="tableLoading"
  35. element-loading-text="数据加载中"
  36. :data="tableData"
  37. border
  38. >
  39. <el-table-column
  40. sortable
  41. label="课程"
  42. prop="courseName"
  43. ></el-table-column>
  44. <el-table-column
  45. sortable
  46. label="课程层次"
  47. prop="courseLevel"
  48. ></el-table-column>
  49. <el-table-column
  50. sortable
  51. label="学习中心"
  52. prop="orgName"
  53. ></el-table-column>
  54. <el-table-column
  55. sortable
  56. label="姓名"
  57. prop="studentName"
  58. ></el-table-column>
  59. <el-table-column
  60. sortable
  61. label="身份证号"
  62. prop="identityNumber"
  63. ></el-table-column>
  64. <el-table-column
  65. sortable
  66. label="学号"
  67. prop="studentCode"
  68. ></el-table-column>
  69. </el-table>
  70. </el-col>
  71. </el-row>
  72. <div class="page pull-right">
  73. <el-pagination
  74. @size-change="handleSizeChange"
  75. @current-change="handleCurrentChange"
  76. :current-page.sync="form.pageNo"
  77. :page-sizes="[10, 20, 50, 100, 200, 300]"
  78. :page-size="form.pageSize"
  79. layout="total, sizes, prev, pager, next, jumper"
  80. :total="total"
  81. ></el-pagination>
  82. </div>
  83. </el-main>
  84. </el-container>
  85. </template>
  86. <script>
  87. import { mapState } from "vuex";
  88. import commonFormVue from "../component/commonForm.vue";
  89. import commonExportVue from "../component/commonExport.vue";
  90. import pagePrivilege from "../mixin/pagePrivilege.js";
  91. export default {
  92. components: { commonFormVue, commonExportVue },
  93. mixins: [pagePrivilege],
  94. data() {
  95. return {
  96. total: 0,
  97. tableLoading: false,
  98. exportLoading: false,
  99. form: {
  100. examRecordDataId: null,
  101. courseId: null,
  102. courseLevel: null,
  103. examId: null,
  104. examStageId: null,
  105. identityNumber: null,
  106. orgId: null,
  107. studentCode: null,
  108. studentName: null,
  109. pageNo: 1,
  110. pageSize: 10,
  111. rootOrgId: "",
  112. auditStatus: null,
  113. ORG_FIND_ALL: false //查询所有机构l
  114. },
  115. getExamCondition: {
  116. params: { name: "", examTypes: "ONLINE#OFFLINE#ONLINE_HOMEWORK" },
  117. filterCondition: "OVERDUE"
  118. },
  119. tableData: [],
  120. exportUrl: "/api/ecs_oe_admin/exam/student/unfinished/list/export",
  121. exportFileName: "缺考登记",
  122. currentPagePrivileges: { ABSENT_EXPORT: false }
  123. };
  124. },
  125. computed: {
  126. ...mapState({ user: state => state.user })
  127. },
  128. methods: {
  129. resetForm() {
  130. this.form = {
  131. examRecordDataId: null,
  132. courseId: null,
  133. courseLevel: null,
  134. examId: null,
  135. examStageId: null,
  136. identityNumber: null,
  137. orgId: this.form.ORG_FIND_ALL ? null : this.form.orgId,
  138. studentCode: null,
  139. studentName: null,
  140. pageNo: 1,
  141. pageSize: 10,
  142. rootOrgId: "",
  143. auditStatus: null,
  144. ORG_FIND_ALL: this.form.ORG_FIND_ALL
  145. };
  146. },
  147. search(type) {
  148. if (!this.form.examId) {
  149. this.$notify({
  150. title: "警告",
  151. message: "请选择考试",
  152. type: "warning",
  153. duration: 1000
  154. });
  155. return false;
  156. }
  157. if (type && type == "clickSelectBtn") {
  158. this.form.pageNo = 1;
  159. }
  160. this.tableLoading = true;
  161. this.$http
  162. .post("/api/ecs_oe_admin/exam/student/unfinished/list", this.form)
  163. .then(response => {
  164. if (response.data) {
  165. this.tableData = response.data.content;
  166. this.total = response.data.totalElements;
  167. } else {
  168. this.tableData = [];
  169. }
  170. this.tableLoading = false;
  171. });
  172. },
  173. /**
  174. * pagesize改变时触发
  175. */
  176. handleSizeChange(val) {
  177. this.form.pageSize = val;
  178. this.search();
  179. },
  180. /**
  181. * 当前页改变时触发
  182. */
  183. handleCurrentChange() {
  184. this.search();
  185. }
  186. },
  187. created() {}
  188. };
  189. </script>
  190. <style scoped src="../style/common.css"></style>