awaitingAudit.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <template>
  2. <el-container>
  3. <el-main>
  4. <commonFormVue :form="form" :getExamCondition="getExamCondition">
  5. <el-col :span="8">
  6. <el-form-item label="考试ID">
  7. <el-input v-model="form.examRecordDataId"></el-input>
  8. </el-form-item>
  9. </el-col>
  10. <el-col :span="8">
  11. <el-form-item label="需要审核">
  12. <el-select v-model="form.isWarn" clearable placeholder="全部">
  13. <el-option value="true" label="是"></el-option>
  14. <el-option value="false" label="否"></el-option>
  15. </el-select>
  16. </el-form-item>
  17. </el-col>
  18. <el-col :span="8">
  19. <el-form-item label="陌生人脸">
  20. <el-select v-model="form.hasStranger" clearable placeholder="全部">
  21. <el-option value="true" label="有"></el-option>
  22. <el-option value="false" label="无"></el-option>
  23. </el-select>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :span="8">
  27. <el-form-item label="人脸识别成功率">
  28. <el-row>
  29. <el-col :span="10">
  30. <el-input
  31. size="mini"
  32. v-model="form.faceSuccessPercentLower"
  33. label="下限"
  34. ></el-input>
  35. </el-col>
  36. <el-col :span="2">&nbsp;</el-col>
  37. <el-col :span="10">
  38. <el-input
  39. size="mini"
  40. v-model="form.faceSuccessPercentUpper"
  41. label="上限"
  42. ></el-input>
  43. </el-col>
  44. </el-row>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="8">
  48. <el-form-item label="人脸真实性比率">
  49. <el-row>
  50. <el-col :span="10">
  51. <el-input
  52. size="mini"
  53. v-model="form.livenessSuccessPercentLower"
  54. label="下限"
  55. ></el-input>
  56. </el-col>
  57. <el-col :span="2">&nbsp;</el-col>
  58. <el-col :span="10">
  59. <el-input
  60. size="mini"
  61. v-model="form.livenessSuccessPercentUpper"
  62. label="上限"
  63. ></el-input>
  64. </el-col>
  65. </el-row>
  66. </el-form-item>
  67. </el-col>
  68. </commonFormVue>
  69. <el-row>
  70. <el-col :span="24">
  71. <el-button @click="search" size="medium" type="primary"
  72. >查询</el-button
  73. >
  74. </el-col>
  75. </el-row>
  76. <el-row v-show="currentPagePrivileges.PANEING_BATCHAUDIT">
  77. <el-col :span="24" style="text-align: right;">
  78. <el-button-group>
  79. <el-button
  80. type="primary"
  81. :disabled="batchAuditBtnDisabled"
  82. @click="batchAudit('pass');"
  83. >通过</el-button
  84. >
  85. <el-button
  86. type="primary"
  87. :disabled="batchAuditBtnDisabled"
  88. @click="batchAudit('nopass');"
  89. >不通过</el-button
  90. >
  91. </el-button-group>
  92. </el-col>
  93. </el-row>
  94. <el-row class="margin-top-10">
  95. <el-col :span="24">
  96. <el-table
  97. v-loading="tableLoading"
  98. element-loading-text="数据加载中"
  99. ref="multipleTable"
  100. @selection-change="handleSelectionChange"
  101. :data="tableData"
  102. border
  103. >
  104. <el-table-column
  105. type="selection"
  106. width="55"
  107. :selectable="selectable"
  108. ></el-table-column>
  109. <el-table-column sortable label="考试ID">
  110. <template slot-scope="scope">
  111. <el-button
  112. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  113. @click="gotoCaptureDetail(scope.row.dataId);"
  114. type="text"
  115. >{{ scope.row.dataId }}
  116. </el-button>
  117. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">
  118. {{ scope.row.dataId }}
  119. </span>
  120. </template>
  121. </el-table-column>
  122. <el-table-column
  123. sortable
  124. label="姓名"
  125. prop="studentName"
  126. ></el-table-column>
  127. <el-table-column
  128. sortable
  129. label="身份证号"
  130. prop="identityNumber"
  131. ></el-table-column>
  132. <el-table-column
  133. sortable
  134. label="学号"
  135. prop="studentCode"
  136. ></el-table-column>
  137. <el-table-column
  138. sortable
  139. label="学习中心"
  140. prop="orgName"
  141. ></el-table-column>
  142. <el-table-column
  143. sortable
  144. label="课程"
  145. prop="courseName"
  146. ></el-table-column>
  147. <el-table-column
  148. sortable
  149. label="课程层次"
  150. prop="courseLevel"
  151. ></el-table-column>
  152. <el-table-column
  153. sortable
  154. label="校验次数"
  155. prop="faceTotalCount"
  156. ></el-table-column>
  157. <el-table-column
  158. sortable
  159. label="成功次数"
  160. prop="faceSuccessCount"
  161. ></el-table-column>
  162. <el-table-column
  163. sortable
  164. label="陌生人记录"
  165. prop="faceStrangerCount"
  166. ></el-table-column>
  167. <el-table-column
  168. sortable
  169. label="人脸识别成功率(%)"
  170. prop="faceSuccessPercent"
  171. ></el-table-column>
  172. <el-table-column
  173. sortable
  174. label="人脸真实性比率(%)"
  175. prop="baiduFaceLivenessSuccessPercent"
  176. ></el-table-column>
  177. <el-table-column
  178. label="操作"
  179. v-if="currentPagePrivileges.PENDING_OPERATE"
  180. >
  181. <template slot-scope="scope">
  182. <el-button
  183. v-if="scope.row.isWarn"
  184. size="mini"
  185. type="success"
  186. icon="el-icon-success"
  187. @click="auditPass(scope.row.dataId);"
  188. >通过</el-button
  189. >
  190. <el-button
  191. v-if="scope.row.isWarn"
  192. size="mini"
  193. type="danger"
  194. icon="el-icon-error"
  195. @click="openAuditDialog(scope.row.dataId);"
  196. >不通过</el-button
  197. >
  198. </template>
  199. </el-table-column>
  200. </el-table>
  201. <div class="block">
  202. <el-pagination
  203. @size-change="handleSizeChange"
  204. @current-change="handleCurrentChange"
  205. :current-page.sync="form.pageNo"
  206. :page-sizes="[10, 30, 50, 100]"
  207. :page-size="form.pageSize"
  208. layout="total, sizes, prev, pager, next, jumper"
  209. :total="total"
  210. ></el-pagination>
  211. </div>
  212. </el-col>
  213. </el-row>
  214. <el-dialog title="审核" :visible.sync="dialogFormVisible">
  215. <auditVue :auditForm="auditForm">
  216. <div class="dialog-footer">
  217. <el-button @click="dialogFormVisible = false;">取 消</el-button>
  218. <el-button type="primary" @click="doAudit">确 定</el-button>
  219. </div>
  220. </auditVue>
  221. </el-dialog>
  222. </el-main>
  223. </el-container>
  224. </template>
  225. <script>
  226. import { mapState } from "vuex";
  227. import commonFormVue from "../component/commonForm.vue";
  228. import auditVue from "../component/audit.vue";
  229. import pagePrivilege from "../mixin/pagePrivilege.js";
  230. export default {
  231. components: { commonFormVue, auditVue },
  232. mixins: [pagePrivilege],
  233. data() {
  234. return {
  235. total: 0,
  236. tableLoading: false,
  237. exportLoading: false,
  238. dialogFormVisible: false,
  239. form: {
  240. examRecordDataId: null,
  241. hasStranger: null,
  242. courseId: null,
  243. courseLevel: null,
  244. examId: null,
  245. examRecordId: null,
  246. faceSuccessPercentLower: null,
  247. faceSuccessPercentUpper: null,
  248. livenessSuccessPercentLower: null,
  249. livenessSuccessPercentUpper: null,
  250. identityNumber: null,
  251. orgId: null,
  252. studentCode: null,
  253. studentName: null,
  254. isWarn: null,
  255. pageNo: 1,
  256. pageSize: 10
  257. },
  258. auditForm: {
  259. examRecordDataId: null,
  260. disciplineType: "",
  261. disciplineDetail: "",
  262. isPass: null
  263. },
  264. getExamCondition: {
  265. params: {
  266. name: "",
  267. examTypes: "ONLINE",
  268. propertyKeys: "IS_FACE_ENABLE"
  269. },
  270. filterCondition: "IS_FACE_ENABLE"
  271. },
  272. tableData: [],
  273. multipleSelection: [],
  274. batchAuditBtnDisabled: true,
  275. currentPagePrivileges: {
  276. PANEING_BATCHAUDIT: false,
  277. PENDING_OPERATE: false,
  278. SNAPSHOT_DETAILS: false
  279. }
  280. };
  281. },
  282. computed: {
  283. ...mapState({ user: state => state.user })
  284. },
  285. methods: {
  286. search() {
  287. if (!this.form.examId) {
  288. this.$notify({
  289. title: "警告",
  290. message: "请选择考试批次",
  291. type: "warning",
  292. duration: 1000
  293. });
  294. return false;
  295. }
  296. this.tableLoading = true;
  297. var params = this.form;
  298. this.$http
  299. .post("/api/ecs_oe_admin/exam/record/waiting/audit/list", this.form)
  300. .then(response => {
  301. if (response.data) {
  302. this.tableData = response.data.content;
  303. this.total = response.data.totalElements;
  304. } else {
  305. this.tableData = [];
  306. }
  307. this.tableLoading = false;
  308. this.$router.push({
  309. path: "/oe/awaitingAudit?" + new URLSearchParams(params)
  310. });
  311. });
  312. },
  313. selectable(row) {
  314. return row.isWarn;
  315. },
  316. handleSelectionChange(val) {
  317. this.multipleSelection = val;
  318. },
  319. /**
  320. * pagesize改变时触发
  321. */
  322. handleSizeChange(val) {
  323. this.form.pageSize = val;
  324. this.search();
  325. },
  326. /**
  327. * 当前页改变时触发
  328. */
  329. handleCurrentChange(val) {
  330. this.form.pageNo = val;
  331. this.search();
  332. },
  333. batchAudit(operate) {
  334. var isPass = operate == "pass" ? true : false;
  335. this.$confirm("确定执行?", "提示", {
  336. confirmButtonText: "确定",
  337. cancelButtonText: "取消",
  338. type: "warning"
  339. })
  340. .then(() => {
  341. var examRecordDataIds = [];
  342. for (var i = 0; i < this.multipleSelection.length; i++) {
  343. examRecordDataIds.push(this.multipleSelection[i].dataId);
  344. }
  345. var param = new URLSearchParams({
  346. examRecordDataIds: examRecordDataIds,
  347. isPass: isPass
  348. });
  349. this.$http
  350. .post("/api/ecs_oe_admin/exam/audit/batch/audit", param)
  351. .then(() => {
  352. this.$notify({
  353. title: "成功",
  354. message: "操作成功",
  355. type: "success"
  356. });
  357. this.search();
  358. });
  359. })
  360. .catch(() => {});
  361. },
  362. openAuditDialog(examRecordDataId) {
  363. this.dialogFormVisible = true;
  364. this.auditForm = {
  365. examRecordDataId: examRecordDataId,
  366. disciplineType: "",
  367. disciplineDetail: "",
  368. isPass: false
  369. };
  370. },
  371. doAudit() {
  372. var param = new URLSearchParams(this.auditForm);
  373. this.$http
  374. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  375. .then(() => {
  376. this.$notify({
  377. title: "成功",
  378. message: "操作成功",
  379. type: "success"
  380. });
  381. this.dialogFormVisible = false;
  382. this.search();
  383. });
  384. },
  385. /**
  386. * 审核通过
  387. */
  388. auditPass(examRecordDataId) {
  389. var auditParams = {
  390. examRecordDataId: examRecordDataId,
  391. isPass: true
  392. };
  393. var param = new URLSearchParams(auditParams);
  394. this.$http
  395. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  396. .then(() => {
  397. this.search();
  398. this.$notify({
  399. title: "成功",
  400. message: "操作成功",
  401. type: "success"
  402. });
  403. });
  404. },
  405. gotoCaptureDetail(examRecordDataId) {
  406. this.$router.push({ path: "/oe/captureDetail/" + examRecordDataId });
  407. }
  408. },
  409. watch: {
  410. multipleSelection: function() {
  411. this.batchAuditBtnDisabled = !(this.multipleSelection.length > 0);
  412. }
  413. },
  414. created() {
  415. var formData = this.$route.query;
  416. if (formData && formData.examId) {
  417. for (var attr in formData) {
  418. var value = formData[attr];
  419. if (value && value != "null") {
  420. if (!isNaN(value)) {
  421. if (~~value == value) {
  422. value = parseInt(value);
  423. } else {
  424. value = parseFloat(value);
  425. }
  426. }
  427. this.form[attr] = value;
  428. }
  429. }
  430. this.search();
  431. }
  432. }
  433. };
  434. </script>
  435. <style scoped>
  436. .el-row {
  437. position: static !important;
  438. }
  439. .margin-top-10 {
  440. margin-top: 10px;
  441. }
  442. </style>