alreadyAudited.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <el-container>
  3. <el-main class="el-main-padding">
  4. <commonFormVue :form="form" :getExamCondition="getExamCondition">
  5. <el-row v-show="showAllCondition">
  6. <el-col :span="6">
  7. <el-form-item label="考试ID">
  8. <el-input
  9. class="form_search_width"
  10. size="small"
  11. v-model="form.examRecordDataId"
  12. placeholder="考试ID"
  13. ></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="6">
  17. <el-form-item label="审核结果">
  18. <el-select
  19. class="form_search_width"
  20. size="small"
  21. v-if="currentPagePrivileges.INVIGILATE_AUDIT_STATUS"
  22. v-model="form.status"
  23. clearable
  24. placeholder="全部"
  25. >
  26. <el-option value="PASS" label="通过"></el-option>
  27. <el-option value="UN_PASS" label="不通过"></el-option>
  28. </el-select>
  29. <el-input
  30. v-if="!currentPagePrivileges.INVIGILATE_AUDIT_STATUS"
  31. placeholder="不通过"
  32. :disabled="true"
  33. >
  34. </el-input>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="6">
  38. <el-form-item label="审核说明">
  39. <el-select
  40. class="form_search_width"
  41. size="small"
  42. v-model="form.disciplineType"
  43. clearable
  44. placeholder="全部"
  45. >
  46. <el-option
  47. v-for="item in auditExplainList"
  48. :key="item.name"
  49. :label="item.desc"
  50. :value="item.name"
  51. >
  52. </el-option>
  53. </el-select>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="6">
  57. <el-form-item label="审核人">
  58. <el-input
  59. class="form_search_width"
  60. size="small"
  61. v-model="form.auditUserName"
  62. placeholder="审核人"
  63. >
  64. </el-input>
  65. </el-form-item>
  66. </el-col>
  67. </el-row>
  68. </commonFormVue>
  69. <el-col :span="24">
  70. <el-button
  71. @click="search('clickSelectBtn')"
  72. size="small"
  73. type="primary"
  74. icon="el-icon-search"
  75. >查询
  76. </el-button>
  77. <el-button
  78. size="small"
  79. type="primary"
  80. icon="el-icon-more"
  81. v-if="!showAllCondition"
  82. @click="showMoreCondition"
  83. >
  84. 高级查询
  85. </el-button>
  86. <el-button
  87. size="small"
  88. type="primary"
  89. v-if="showAllCondition"
  90. @click="showSimpleCondition"
  91. >
  92. 简单查询
  93. </el-button>
  94. <el-button
  95. size="small"
  96. icon="el-icon-refresh"
  97. @click="resetForm"
  98. class="margin-bottom-10"
  99. >
  100. 重置
  101. </el-button>
  102. </el-col>
  103. <el-row class="margin-top-10"
  104. ><el-col :span="24">
  105. <el-table
  106. v-loading="tableLoading"
  107. element-loading-text="数据加载中"
  108. ref="multipleTable"
  109. @selection-change="handleSelectionChange"
  110. :data="tableData"
  111. border
  112. >
  113. <el-table-column label="考试ID">
  114. <template slot-scope="scope">
  115. <el-button
  116. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  117. @click="gotoCaptureDetail(scope.row.examRecordDataId)"
  118. type="text"
  119. >{{ scope.row.examRecordDataId }}
  120. </el-button>
  121. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">
  122. {{ scope.row.examRecordDataId }}
  123. </span>
  124. </template>
  125. </el-table-column>
  126. <el-table-column sortable label="姓名" prop="studentName">
  127. </el-table-column>
  128. <el-table-column
  129. sortable
  130. label="身份证号"
  131. prop="identityNumber"
  132. width="120"
  133. >
  134. </el-table-column>
  135. <el-table-column
  136. sortable
  137. label="学号"
  138. prop="studentCode"
  139. width="120"
  140. >
  141. </el-table-column>
  142. <el-table-column
  143. sortable
  144. label="课程"
  145. prop="courseName"
  146. width="120"
  147. >
  148. </el-table-column>
  149. <el-table-column
  150. sortable
  151. label="课程层次"
  152. prop="courseLevel"
  153. width="120"
  154. >
  155. </el-table-column>
  156. <el-table-column
  157. sortable
  158. label="校验次数"
  159. prop="faceTotalCount"
  160. width="120"
  161. >
  162. </el-table-column>
  163. <el-table-column
  164. sortable
  165. label="成功次数"
  166. prop="faceSuccessCount"
  167. width="120"
  168. >
  169. </el-table-column>
  170. <el-table-column
  171. sortable
  172. label="陌生人记录"
  173. prop="faceStrangerCount"
  174. width="120"
  175. >
  176. </el-table-column>
  177. <el-table-column
  178. sortable
  179. label="人脸识别成功率(%)"
  180. prop="faceSuccessPercent"
  181. width="180"
  182. >
  183. </el-table-column>
  184. <el-table-column
  185. sortable
  186. label="考试次数"
  187. prop="examOrder"
  188. width="120"
  189. >
  190. </el-table-column>
  191. <el-table-column
  192. sortable
  193. label="审核说明"
  194. prop="disciplineType"
  195. width="120"
  196. >
  197. </el-table-column>
  198. <el-table-column
  199. sortable
  200. label="审核结果"
  201. prop="status"
  202. width="120"
  203. >
  204. </el-table-column>
  205. <el-table-column
  206. sortable
  207. label="审核人"
  208. prop="auditUserName"
  209. width="120"
  210. >
  211. </el-table-column>
  212. </el-table>
  213. <div class="block pull-right">
  214. <el-pagination
  215. @size-change="handleSizeChange"
  216. @current-change="handleCurrentChange"
  217. :current-page.sync="form.pageNo"
  218. :page-sizes="[10, 20, 50, 100]"
  219. :page-size="form.pageSize"
  220. layout="total, sizes, prev, pager, next, jumper"
  221. :total="total"
  222. >
  223. </el-pagination></div></el-col
  224. ></el-row>
  225. </el-main>
  226. </el-container>
  227. </template>
  228. <script>
  229. import { mapState } from "vuex";
  230. import commonFormVue from "../component/commonForm.vue";
  231. import { AUDIT_EXPLAIN_LIST } from "../constants/constants";
  232. import pagePrivilege from "../mixin/pagePrivilege.js";
  233. export default {
  234. components: { commonFormVue },
  235. mixins: [pagePrivilege],
  236. data() {
  237. return {
  238. auditExplainList: AUDIT_EXPLAIN_LIST,
  239. total: 0,
  240. tableLoading: false,
  241. showAllCondition: false,
  242. form: {
  243. examRecordDataId: null,
  244. hasStranger: null,
  245. courseId: null,
  246. courseLevel: null,
  247. examId: null,
  248. faceSuccessPercentLower: null,
  249. faceSuccessPercentUpper: null,
  250. identityNumber: null,
  251. orgId: null,
  252. studentCode: null,
  253. studentName: null,
  254. isWarn: null,
  255. pageNo: 1,
  256. pageSize: 10,
  257. disciplineType: "",
  258. auditUserName: "",
  259. status: ""
  260. },
  261. getExamCondition: {
  262. params: {
  263. name: "",
  264. examTypes: "ONLINE",
  265. propertyKeys: "IS_FACE_ENABLE"
  266. },
  267. filterCondition: "IS_FACE_ENABLE"
  268. },
  269. tableData: [],
  270. currentPagePrivileges: {
  271. INVIGILATE_AUDIT_STATUS: false, //数据状态
  272. SNAPSHOT_DETAILS: false //详情查看
  273. }
  274. };
  275. },
  276. computed: {
  277. ...mapState({ user: state => state.user })
  278. },
  279. methods: {
  280. resetForm() {
  281. this.form = {
  282. examRecordDataId: null,
  283. hasStranger: null,
  284. courseId: null,
  285. courseLevel: null,
  286. examId: null,
  287. faceSuccessPercentLower: null,
  288. faceSuccessPercentUpper: null,
  289. identityNumber: null,
  290. orgId: null,
  291. studentCode: null,
  292. studentName: null,
  293. isWarn: null,
  294. pageNo: 1,
  295. pageSize: 10,
  296. disciplineType: "",
  297. auditUserName: "",
  298. status: ""
  299. };
  300. },
  301. showMoreCondition() {
  302. this.showAllCondition = true;
  303. },
  304. showSimpleCondition() {
  305. this.$notify({
  306. title: "提示",
  307. message: "高级查询条件值已重置",
  308. type: "info",
  309. duration: 2000
  310. });
  311. this.resetForm();
  312. this.showAllCondition = false;
  313. },
  314. search(type) {
  315. if (!this.form.examId) {
  316. this.$notify({
  317. title: "警告",
  318. message: "请选择考试批次",
  319. type: "warning",
  320. duration: 2000
  321. });
  322. return false;
  323. }
  324. if (type && type == "clickSelectBtn") {
  325. this.form.pageNo = 1;
  326. }
  327. this.tableLoading = true;
  328. var params = JSON.parse(JSON.stringify(this.form));
  329. this.$http
  330. .post("/api/ecs_oe_admin/exam/audit/list", params)
  331. .then(response => {
  332. if (response.data) {
  333. this.tableData = response.data.content;
  334. this.total = response.data.totalElements;
  335. this.form.pageNo = response.data.number + 1;
  336. } else {
  337. this.tableData = [];
  338. }
  339. this.tableLoading = false;
  340. this.$router.push({
  341. path: "/oe/alreadyAudited?" + new URLSearchParams(params)
  342. });
  343. });
  344. },
  345. selectable(row) {
  346. return row.isWarn;
  347. },
  348. handleSelectionChange(val) {
  349. this.multipleSelection = val;
  350. },
  351. /**
  352. * pagesize改变时触发
  353. */
  354. handleSizeChange(val) {
  355. this.form.pageSize = val;
  356. this.search();
  357. },
  358. /**
  359. * 当前页改变时触发
  360. */
  361. handleCurrentChange() {
  362. this.search();
  363. },
  364. gotoCaptureDetail(examRecordDataId) {
  365. this.$router.push({
  366. path: "/oe/captureDetail/" + examRecordDataId + "/alreadyAudited"
  367. });
  368. },
  369. backFill() {
  370. var formData = this.$route.query;
  371. if (formData && formData.examId) {
  372. for (var attr in formData) {
  373. var value = formData[attr];
  374. if (value && value != "null") {
  375. if (!isNaN(value)) {
  376. if (~~value == value) {
  377. value = parseInt(value);
  378. } else {
  379. value = parseFloat(value);
  380. }
  381. }
  382. this.form[attr] = value;
  383. }
  384. }
  385. this.search();
  386. }
  387. }
  388. },
  389. watch: {
  390. "currentPagePrivileges.INVIGILATE_AUDIT_STATUS": function(val) {
  391. this.form.status = val ? "" : "UN_PASS";
  392. }
  393. },
  394. created() {
  395. this.form.status = this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS
  396. ? ""
  397. : "UN_PASS";
  398. this.backFill();
  399. }
  400. };
  401. </script>
  402. <style scoped src="../style/common.css"></style>