alreadyAudited.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <template>
  2. <el-container>
  3. <el-main>
  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"
  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 sortable label="身份证号" prop="identityNumber">
  129. </el-table-column>
  130. <el-table-column sortable label="学号" prop="studentCode">
  131. </el-table-column>
  132. <el-table-column sortable label="课程" prop="courseName">
  133. </el-table-column>
  134. <el-table-column sortable label="课程层次" prop="courseLevel">
  135. </el-table-column>
  136. <el-table-column sortable label="校验次数" prop="faceTotalCount">
  137. </el-table-column>
  138. <el-table-column sortable label="成功次数" prop="faceSuccessCount">
  139. </el-table-column>
  140. <el-table-column
  141. sortable
  142. label="陌生人记录"
  143. prop="faceStrangerCount"
  144. >
  145. </el-table-column>
  146. <el-table-column
  147. sortable
  148. label="人脸识别成功率(%)"
  149. prop="faceSuccessPercent"
  150. >
  151. </el-table-column>
  152. <el-table-column sortable label="考试次数" prop="examOrder">
  153. </el-table-column>
  154. <el-table-column sortable label="审核说明" prop="disciplineType">
  155. </el-table-column>
  156. <el-table-column sortable label="审核结果" prop="status">
  157. </el-table-column>
  158. <el-table-column sortable label="审核人" prop="auditUserName">
  159. </el-table-column>
  160. </el-table>
  161. <div class="block pull-right">
  162. <el-pagination
  163. @size-change="handleSizeChange"
  164. @current-change="handleCurrentChange"
  165. :current-page.sync="form.pageNo"
  166. :page-sizes="[10, 20, 50, 100]"
  167. :page-size="form.pageSize"
  168. layout="total, sizes, prev, pager, next, jumper"
  169. :total="total"
  170. >
  171. </el-pagination></div></el-col
  172. ></el-row>
  173. </el-main>
  174. </el-container>
  175. </template>
  176. <script>
  177. import { mapState } from "vuex";
  178. import commonFormVue from "../component/commonForm.vue";
  179. import { AUDIT_EXPLAIN_LIST } from "../constants/constants";
  180. import pagePrivilege from "../mixin/pagePrivilege.js";
  181. export default {
  182. components: { commonFormVue },
  183. mixins: [pagePrivilege],
  184. data() {
  185. return {
  186. auditExplainList: AUDIT_EXPLAIN_LIST,
  187. total: 0,
  188. tableLoading: false,
  189. showAllCondition: false,
  190. form: {
  191. examRecordDataId: null,
  192. hasStranger: null,
  193. courseId: null,
  194. courseLevel: null,
  195. examId: null,
  196. faceSuccessPercentLower: null,
  197. faceSuccessPercentUpper: null,
  198. identityNumber: null,
  199. orgId: null,
  200. studentCode: null,
  201. studentName: null,
  202. isWarn: null,
  203. pageNo: 1,
  204. pageSize: 10,
  205. disciplineType: "",
  206. auditUserName: "",
  207. status: ""
  208. },
  209. getExamCondition: {
  210. params: {
  211. name: "",
  212. examTypes: "ONLINE",
  213. propertyKeys: "IS_FACE_ENABLE"
  214. },
  215. filterCondition: "IS_FACE_ENABLE"
  216. },
  217. tableData: [],
  218. currentPagePrivileges: {
  219. INVIGILATE_AUDIT_STATUS: false, //数据状态
  220. SNAPSHOT_DETAILS: false //详情查看
  221. }
  222. };
  223. },
  224. computed: {
  225. ...mapState({ user: state => state.user })
  226. },
  227. methods: {
  228. resetForm() {
  229. this.form = {
  230. examRecordDataId: null,
  231. hasStranger: null,
  232. courseId: null,
  233. courseLevel: null,
  234. examId: null,
  235. faceSuccessPercentLower: null,
  236. faceSuccessPercentUpper: null,
  237. identityNumber: null,
  238. orgId: null,
  239. studentCode: null,
  240. studentName: null,
  241. isWarn: null,
  242. pageNo: 1,
  243. pageSize: 10,
  244. disciplineType: "",
  245. auditUserName: "",
  246. status: ""
  247. };
  248. },
  249. showMoreCondition() {
  250. this.showAllCondition = true;
  251. },
  252. showSimpleCondition() {
  253. this.$notify({
  254. title: "提示",
  255. message: "高级查询条件值已重置",
  256. type: "info",
  257. duration: 2000
  258. });
  259. this.resetForm();
  260. this.showAllCondition = false;
  261. },
  262. search() {
  263. if (!this.form.examId) {
  264. this.$notify({
  265. title: "警告",
  266. message: "请选择考试批次",
  267. type: "warning",
  268. duration: 2000
  269. });
  270. return false;
  271. }
  272. this.tableLoading = true;
  273. var params = JSON.parse(JSON.stringify(this.form));
  274. this.$http
  275. .post("/api/ecs_oe_admin/exam/audit/list", params)
  276. .then(response => {
  277. if (response.data) {
  278. this.tableData = response.data.content;
  279. this.total = response.data.totalElements;
  280. this.form.pageNo = response.data.number + 1;
  281. } else {
  282. this.tableData = [];
  283. }
  284. this.tableLoading = false;
  285. this.$router.push({
  286. path: "/oe/alreadyAudited?" + new URLSearchParams(params)
  287. });
  288. });
  289. },
  290. selectable(row) {
  291. return row.isWarn;
  292. },
  293. handleSelectionChange(val) {
  294. this.multipleSelection = val;
  295. },
  296. /**
  297. * pagesize改变时触发
  298. */
  299. handleSizeChange(val) {
  300. this.form.pageSize = val;
  301. this.search();
  302. },
  303. /**
  304. * 当前页改变时触发
  305. */
  306. handleCurrentChange() {
  307. this.search();
  308. },
  309. gotoCaptureDetail(examRecordDataId) {
  310. this.$router.push({
  311. path: "/oe/captureDetail/" + examRecordDataId + "/alreadyAudited"
  312. });
  313. },
  314. backFill() {
  315. var formData = this.$route.query;
  316. if (formData && formData.examId) {
  317. for (var attr in formData) {
  318. var value = formData[attr];
  319. if (value && value != "null") {
  320. if (!isNaN(value)) {
  321. if (~~value == value) {
  322. value = parseInt(value);
  323. } else {
  324. value = parseFloat(value);
  325. }
  326. }
  327. this.form[attr] = value;
  328. }
  329. }
  330. this.search();
  331. }
  332. }
  333. },
  334. watch: {
  335. "currentPagePrivileges.INVIGILATE_AUDIT_STATUS": function(val) {
  336. this.form.status = val ? "" : "UN_PASS";
  337. }
  338. },
  339. created() {
  340. this.form.status = this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS
  341. ? ""
  342. : "UN_PASS";
  343. this.backFill();
  344. }
  345. };
  346. </script>
  347. <style scoped>
  348. .el-row {
  349. position: static !important;
  350. }
  351. .margin-top-10 {
  352. margin-top: 10px;
  353. }
  354. .select-type {
  355. font-size: 8px;
  356. cursor: pointer;
  357. color: #409eff;
  358. }
  359. </style>
  360. <style scoped src="../style/common.css"></style>