illegalityNameList.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <el-container>
  3. <el-main>
  4. <commonFormVue :form="form" :getExamCondition="getExamCondition">
  5. <el-col :span="6">
  6. <el-form-item label="违纪说明">
  7. <el-select
  8. class="form_search_width"
  9. size="small"
  10. v-model="form.disciplineType"
  11. clearable
  12. placeholder="全部"
  13. >
  14. <el-option
  15. v-for="item in disciplineTypeList"
  16. :key="item.name"
  17. :label="item.desc"
  18. :value="item.name"
  19. >
  20. </el-option>
  21. </el-select>
  22. </el-form-item>
  23. </el-col>
  24. </commonFormVue>
  25. <el-row>
  26. <el-col :span="24">
  27. <el-button
  28. @click="search"
  29. size="small"
  30. icon="el-icon-search"
  31. type="primary"
  32. >查询
  33. </el-button>
  34. <el-button size="small" @click="resetForm" style="margin-right:10px;">
  35. 重置
  36. </el-button>
  37. <commonExportVue
  38. v-show="currentPagePrivileges.BREACH_THE_PRINCIPLE_EXPORT"
  39. :form="form"
  40. :exportUrl="exportUrl"
  41. :exportFileName="exportFileName"
  42. ></commonExportVue>
  43. </el-col>
  44. </el-row>
  45. <el-row class="margin-top-10"
  46. ><el-col :span="24">
  47. <el-table
  48. v-loading="tableLoading"
  49. element-loading-text="数据加载中"
  50. ref="multipleTable"
  51. @selection-change="handleSelectionChange"
  52. :data="tableData"
  53. border
  54. >
  55. <el-table-column width="80" sortable label="考试ID">
  56. <template slot-scope="scope">
  57. <el-button
  58. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  59. @click="gotoCaptureDetail(scope.row.examRecordDataId)"
  60. type="text"
  61. >{{ scope.row.examRecordDataId }}
  62. </el-button>
  63. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">
  64. {{ scope.row.examRecordDataId }}
  65. </span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column
  69. width="80"
  70. sortable
  71. label="姓名"
  72. prop="studentName"
  73. >
  74. </el-table-column>
  75. <el-table-column sortable label="身份证号" prop="identityNumber">
  76. </el-table-column>
  77. <el-table-column sortable label="学号" prop="studentCode">
  78. </el-table-column>
  79. <el-table-column sortable label="课程" prop="courseName">
  80. </el-table-column>
  81. <el-table-column sortable label="课程层次" prop="courseLevel">
  82. </el-table-column>
  83. <el-table-column sortable label="校验次数" prop="faceTotalCount">
  84. </el-table-column>
  85. <el-table-column sortable label="成功次数" prop="faceSuccessCount">
  86. </el-table-column>
  87. <el-table-column
  88. sortable
  89. label="陌生人记录"
  90. prop="faceStrangerCount"
  91. >
  92. </el-table-column>
  93. <el-table-column
  94. sortable
  95. label="成功率(%)"
  96. prop="faceSuccessPercent"
  97. >
  98. </el-table-column>
  99. <el-table-column sortable label="违纪类型" prop="disciplineType">
  100. </el-table-column>
  101. </el-table>
  102. <div class="block">
  103. <el-pagination
  104. @size-change="handleSizeChange"
  105. @current-change="handleCurrentChange"
  106. :current-page.sync="form.pageNo"
  107. :page-sizes="[10, 30, 50, 100]"
  108. :page-size="form.pageSize"
  109. layout="total, sizes, prev, pager, next, jumper"
  110. :total="total"
  111. >
  112. </el-pagination></div></el-col
  113. ></el-row>
  114. </el-main>
  115. </el-container>
  116. </template>
  117. <script>
  118. import { mapState } from "vuex";
  119. import commonFormVue from "../component/commonForm.vue";
  120. import commonExportVue from "../component/commonExport.vue";
  121. import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
  122. import pagePrivilege from "../mixin/pagePrivilege.js";
  123. export default {
  124. components: { commonFormVue, commonExportVue },
  125. mixins: [pagePrivilege],
  126. data() {
  127. return {
  128. disciplineTypeList: DISCIPLINE_TYPE_LIST,
  129. total: 0,
  130. tableLoading: false,
  131. exportLoading: false,
  132. form: {
  133. examRecordDataId: null,
  134. hasStranger: null,
  135. courseId: null,
  136. courseLevel: null,
  137. examId: null,
  138. examRecordId: null,
  139. faceSuccessPercentLower: null,
  140. faceSuccessPercentUpper: null,
  141. livenessSuccessPercentLower: null,
  142. livenessSuccessPercentUpper: null,
  143. identityNumber: null,
  144. orgId: null,
  145. studentCode: null,
  146. studentName: null,
  147. isWarn: null,
  148. pageNo: 1,
  149. pageSize: 10
  150. },
  151. getExamCondition: {
  152. params: {
  153. name: "",
  154. examTypes: "ONLINE"
  155. },
  156. filterCondition: ""
  157. },
  158. tableData: [],
  159. exportUrl: "/api/ecs_oe_admin/exam/audit/discipline/list/export",
  160. exportFileName: "违纪名单",
  161. currentPagePrivileges: {
  162. BREACH_THE_PRINCIPLE_EXPORT: false,
  163. SNAPSHOT_DETAILS: false //详情查看
  164. }
  165. };
  166. },
  167. computed: {
  168. ...mapState({ user: state => state.user })
  169. },
  170. methods: {
  171. resetForm() {
  172. this.form = {
  173. examRecordDataId: null,
  174. hasStranger: null,
  175. courseId: null,
  176. courseLevel: null,
  177. examId: null,
  178. examRecordId: null,
  179. faceSuccessPercentLower: null,
  180. faceSuccessPercentUpper: null,
  181. livenessSuccessPercentLower: null,
  182. livenessSuccessPercentUpper: null,
  183. identityNumber: null,
  184. orgId: null,
  185. studentCode: null,
  186. studentName: null,
  187. isWarn: null,
  188. pageNo: 1,
  189. pageSize: 10
  190. };
  191. },
  192. search() {
  193. if (!this.form.examId) {
  194. this.$notify({
  195. title: "警告",
  196. message: "请选择考试批次",
  197. type: "warning",
  198. duration: 1000
  199. });
  200. return false;
  201. }
  202. this.tableLoading = true;
  203. var params = JSON.parse(JSON.stringify(this.form));
  204. this.$http
  205. .post("/api/ecs_oe_admin/exam/audit/discipline/list", params)
  206. .then(response => {
  207. if (response.data) {
  208. this.tableData = response.data.content;
  209. this.total = response.data.totalElements;
  210. this.form.pageNo = response.data.number + 1;
  211. } else {
  212. this.tableData = [];
  213. }
  214. this.tableLoading = false;
  215. this.$router.push({
  216. path: "/oe/illegalityNameList?" + new URLSearchParams(params)
  217. });
  218. });
  219. },
  220. selectable(row) {
  221. return row.isWarn;
  222. },
  223. handleSelectionChange(val) {
  224. this.multipleSelection = val;
  225. },
  226. /**
  227. * pagesize改变时触发
  228. */
  229. handleSizeChange(val) {
  230. this.form.pageSize = val;
  231. this.search();
  232. },
  233. /**
  234. * 当前页改变时触发
  235. */
  236. handleCurrentChange() {
  237. this.search();
  238. },
  239. gotoCaptureDetail(examRecordDataId) {
  240. this.$router.push({ path: "/oe/captureDetail/" + examRecordDataId });
  241. },
  242. backFill() {
  243. var formData = this.$route.query;
  244. if (formData && formData.examId) {
  245. for (var attr in formData) {
  246. var value = formData[attr];
  247. if (value && value != "null") {
  248. if (!isNaN(value)) {
  249. if (~~value == value) {
  250. value = parseInt(value);
  251. } else {
  252. value = parseFloat(value);
  253. }
  254. }
  255. this.form[attr] = value;
  256. }
  257. }
  258. this.search();
  259. }
  260. }
  261. },
  262. created() {
  263. this.form.rootOrgId = this.user.rootOrgId;
  264. this.backFill();
  265. }
  266. };
  267. </script>
  268. <style scoped>
  269. .el-row {
  270. position: static !important;
  271. }
  272. </style>
  273. <style scoped src="../style/common.css"></style>