awaitingAudit.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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-model="form.isWarn"
  22. clearable
  23. placeholder="全部"
  24. >
  25. <el-option value="true" label="是"></el-option>
  26. <el-option value="false" label="否"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="6">
  31. <el-form-item label="陌生人脸">
  32. <el-select
  33. class="form_search_width"
  34. size="small"
  35. v-model="form.hasStranger"
  36. clearable
  37. placeholder="全部"
  38. >
  39. <el-option value="true" label="有"></el-option>
  40. <el-option value="false" label="无"></el-option>
  41. </el-select>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="6">
  45. <el-form-item label="人脸识别">
  46. <el-input
  47. class="form_search_width_50"
  48. size="small"
  49. v-model="form.faceSuccessPercentLower"
  50. placeholder="下限"
  51. ></el-input>
  52. <span> - </span>
  53. <el-input
  54. class="form_search_width_50"
  55. size="small"
  56. v-model="form.faceSuccessPercentUpper"
  57. placeholder="上限"
  58. ></el-input>
  59. (成功率)
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="6">
  63. <el-form-item label="人脸比率">
  64. <el-row>
  65. <el-input
  66. class="form_search_width_50"
  67. size="small"
  68. v-model="form.livenessSuccessPercentLower"
  69. placeholder="下限"
  70. ></el-input>
  71. <span> - </span>
  72. <el-input
  73. class="form_search_width_50"
  74. size="small"
  75. v-model="form.livenessSuccessPercentUpper"
  76. placeholder="上限"
  77. ></el-input>
  78. (真实性)
  79. </el-row>
  80. </el-form-item>
  81. </el-col>
  82. </el-row>
  83. </commonFormVue>
  84. <el-col :span="8">
  85. <el-button
  86. @click="search"
  87. size="small"
  88. type="primary"
  89. icon="el-icon-search"
  90. >查询
  91. </el-button>
  92. <el-button
  93. size="small"
  94. type="primary"
  95. icon="el-icon-more"
  96. v-if="!showAllCondition"
  97. @click="showMoreCondition"
  98. >
  99. 更多查询
  100. </el-button>
  101. <el-button
  102. size="small"
  103. type="primary"
  104. v-if="showAllCondition"
  105. @click="showSimpleCondition"
  106. >
  107. 简单查询
  108. </el-button>
  109. <el-button
  110. size="small"
  111. icon="el-icon-refresh"
  112. @click="resetForm"
  113. class="margin-bottom-10"
  114. >
  115. 重置
  116. </el-button>
  117. </el-col>
  118. <el-row>
  119. <el-col>
  120. <div class="block-seperator"></div>
  121. <span>批量操作:</span>
  122. <el-dropdown
  123. class="button_left"
  124. v-show="currentPagePrivileges.PANEING_BATCHAUDIT"
  125. >
  126. <el-button size="small" type="primary">
  127. 批量审核 <i class="el-icon-arrow-down el-icon--right"></i>
  128. </el-button>
  129. <el-dropdown-menu slot="dropdown">
  130. <el-dropdown-item>
  131. <el-button
  132. size="mini"
  133. type="success"
  134. :disabled="batchAuditBtnDisabled"
  135. @click="batchAudit('pass')"
  136. >
  137. <i class="el-icon-success"></i> 通 &nbsp;&nbsp;过
  138. </el-button>
  139. </el-dropdown-item>
  140. <el-dropdown-item>
  141. <el-button
  142. size="mini"
  143. type="danger"
  144. :disabled="batchAuditBtnDisabled"
  145. @click="batchAudit('nopass')"
  146. >
  147. <i class="el-icon-error"></i> 不通过
  148. </el-button>
  149. </el-dropdown-item>
  150. </el-dropdown-menu>
  151. </el-dropdown></el-col
  152. >
  153. </el-row>
  154. <el-row class="margin-top-10">
  155. <el-col :span="24">
  156. <el-table
  157. v-loading="tableLoading"
  158. element-loading-text="数据加载中"
  159. ref="multipleTable"
  160. @selection-change="handleSelectionChange"
  161. :data="tableData"
  162. border
  163. resizable
  164. stripe
  165. >
  166. <el-table-column
  167. type="selection"
  168. width="55"
  169. :selectable="selectable"
  170. ></el-table-column>
  171. <el-table-column sortable label="考试ID">
  172. <template slot-scope="scope">
  173. <el-button
  174. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  175. @click="gotoCaptureDetail(scope.row.dataId)"
  176. type="text"
  177. >
  178. {{ scope.row.dataId }}
  179. </el-button>
  180. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">
  181. {{ scope.row.dataId }}
  182. </span>
  183. </template>
  184. </el-table-column>
  185. <el-table-column
  186. sortable
  187. label="姓名"
  188. prop="studentName"
  189. ></el-table-column>
  190. <el-table-column
  191. sortable
  192. label="身份证号"
  193. prop="identityNumber"
  194. ></el-table-column>
  195. <el-table-column
  196. sortable
  197. label="学号"
  198. prop="studentCode"
  199. ></el-table-column>
  200. <el-table-column
  201. sortable
  202. label="学习中心"
  203. prop="orgName"
  204. ></el-table-column>
  205. <el-table-column
  206. sortable
  207. label="课程"
  208. prop="courseName"
  209. ></el-table-column>
  210. <el-table-column
  211. sortable
  212. label="课程层次"
  213. prop="courseLevel"
  214. ></el-table-column>
  215. <el-table-column
  216. sortable
  217. label="校验次数"
  218. prop="faceTotalCount"
  219. ></el-table-column>
  220. <el-table-column
  221. sortable
  222. label="成功次数"
  223. prop="faceSuccessCount"
  224. ></el-table-column>
  225. <el-table-column
  226. sortable
  227. label="陌生人记录"
  228. prop="faceStrangerCount"
  229. ></el-table-column>
  230. <el-table-column
  231. sortable
  232. label="人脸识别成功率(%)"
  233. prop="faceSuccessPercent"
  234. ></el-table-column>
  235. <el-table-column
  236. sortable
  237. label="人脸真实性比率(%)"
  238. prop="baiduFaceLivenessSuccessPercent"
  239. ></el-table-column>
  240. <el-table-column
  241. :context="_self"
  242. label="操作"
  243. v-if="currentPagePrivileges.PENDING_OPERATE"
  244. fixed="right"
  245. width="120"
  246. >
  247. <div slot-scope="scope">
  248. <el-row class="operateRow">
  249. <el-col :span="24">
  250. <el-button
  251. v-if="scope.row.isWarn"
  252. size="mini"
  253. type="success"
  254. icon="el-icon-success"
  255. @click="auditPass(scope.row.dataId)"
  256. >通&nbsp;&nbsp;&nbsp;&nbsp;过
  257. </el-button>
  258. </el-col>
  259. </el-row>
  260. <el-row class="operateRow">
  261. <el-col :span="24">
  262. <el-button
  263. v-if="scope.row.isWarn"
  264. size="mini"
  265. type="danger"
  266. icon="el-icon-error"
  267. @click="openAuditDialog(scope.row.dataId)"
  268. >不通过
  269. </el-button>
  270. </el-col>
  271. </el-row>
  272. </div>
  273. </el-table-column>
  274. </el-table>
  275. <div class="block pull-right">
  276. <el-pagination
  277. @size-change="handleSizeChange"
  278. @current-change="handleCurrentChange"
  279. :current-page.sync="form.pageNo"
  280. :page-sizes="[10, 20, 50, 100]"
  281. :page-size="form.pageSize"
  282. layout="total, sizes, prev, pager, next, jumper"
  283. :total="total"
  284. ></el-pagination>
  285. </div>
  286. </el-col>
  287. </el-row>
  288. <el-dialog title="审核" :visible.sync="dialogFormVisible">
  289. <auditVue :auditForm="auditForm">
  290. <div class="dialog-footer">
  291. <el-button @click="dialogFormVisible = false">取 消</el-button>
  292. <el-button type="primary" @click="doAudit">确 定</el-button>
  293. </div>
  294. </auditVue>
  295. </el-dialog>
  296. </el-main>
  297. </el-container>
  298. </template>
  299. <script>
  300. import { mapState } from "vuex";
  301. import pagePrivilege from "../mixin/pagePrivilege.js";
  302. import commonFormVue from "../component/commonForm.vue";
  303. import auditVue from "../component/audit.vue";
  304. export default {
  305. mixins: [pagePrivilege],
  306. components: { commonFormVue, auditVue },
  307. data() {
  308. return {
  309. total: 0,
  310. tableLoading: false,
  311. exportLoading: false,
  312. dialogFormVisible: false,
  313. showAllCondition: false,
  314. form: {
  315. examRecordDataId: null,
  316. hasStranger: null,
  317. courseId: null,
  318. courseLevel: null,
  319. examId: null,
  320. examRecordId: null,
  321. faceSuccessPercentLower: null,
  322. faceSuccessPercentUpper: null,
  323. livenessSuccessPercentLower: null,
  324. livenessSuccessPercentUpper: null,
  325. identityNumber: null,
  326. orgId: null,
  327. studentCode: null,
  328. studentName: null,
  329. isWarn: null,
  330. pageNo: 1,
  331. pageSize: 10
  332. },
  333. auditForm: {
  334. examRecordDataId: null,
  335. disciplineType: "",
  336. disciplineDetail: "",
  337. isPass: null
  338. },
  339. getExamCondition: {
  340. params: {
  341. name: "",
  342. examTypes: "ONLINE",
  343. propertyKeys: "IS_FACE_ENABLE"
  344. },
  345. filterCondition: "IS_FACE_ENABLE"
  346. },
  347. tableData: [],
  348. multipleSelection: [],
  349. batchAuditBtnDisabled: true,
  350. currentPagePrivileges: {
  351. PANEING_BATCHAUDIT: false,
  352. PENDING_OPERATE: false,
  353. SNAPSHOT_DETAILS: false
  354. }
  355. };
  356. },
  357. computed: {
  358. ...mapState({ user: state => state.user })
  359. },
  360. methods: {
  361. resetForm() {
  362. this.form = {
  363. examRecordDataId: null,
  364. hasStranger: null,
  365. courseId: null,
  366. courseLevel: null,
  367. examId: null,
  368. examRecordId: null,
  369. faceSuccessPercentLower: null,
  370. faceSuccessPercentUpper: null,
  371. livenessSuccessPercentLower: null,
  372. livenessSuccessPercentUpper: null,
  373. identityNumber: null,
  374. orgId: null,
  375. studentCode: null,
  376. studentName: null,
  377. isWarn: null,
  378. pageNo: 1,
  379. pageSize: 10
  380. };
  381. },
  382. showMoreCondition() {
  383. this.showAllCondition = true;
  384. },
  385. showSimpleCondition() {
  386. this.$message("高级查询条件值已重置");
  387. this.resetForm();
  388. this.showAllCondition = false;
  389. },
  390. search() {
  391. if (!this.form.examId) {
  392. this.$notify({
  393. title: "警告",
  394. message: "请选择考试批次",
  395. type: "warning",
  396. duration: 1000
  397. });
  398. return false;
  399. }
  400. this.tableLoading = true;
  401. var params = JSON.parse(JSON.stringify(this.form));
  402. this.$http
  403. .post("/api/ecs_oe_admin/exam/record/waiting/audit/list", params)
  404. .then(response => {
  405. if (response.data) {
  406. this.tableData = response.data.content;
  407. this.total = response.data.totalElements;
  408. this.form.pageNo = response.data.number + 1;
  409. } else {
  410. this.tableData = [];
  411. }
  412. this.tableLoading = false;
  413. this.$router.push({
  414. path: "/oe/awaitingAudit?" + new URLSearchParams(params)
  415. });
  416. });
  417. },
  418. selectable(row) {
  419. return row.isWarn;
  420. },
  421. handleSelectionChange(val) {
  422. this.multipleSelection = val;
  423. },
  424. /**
  425. * pagesize改变时触发
  426. */
  427. handleSizeChange(val) {
  428. this.form.pageSize = val;
  429. this.search();
  430. },
  431. /**
  432. * 当前页改变时触发
  433. */
  434. handleCurrentChange(val) {
  435. this.form.pageNo = val;
  436. this.search();
  437. },
  438. batchAudit(operate) {
  439. var isPass = operate == "pass" ? true : false;
  440. this.$confirm("确定执行?", "提示", {
  441. confirmButtonText: "确定",
  442. cancelButtonText: "取消",
  443. type: "warning"
  444. })
  445. .then(() => {
  446. var examRecordDataIds = [];
  447. for (var i = 0; i < this.multipleSelection.length; i++) {
  448. examRecordDataIds.push(this.multipleSelection[i].dataId);
  449. }
  450. var param = new URLSearchParams({
  451. examRecordDataIds: examRecordDataIds,
  452. isPass: isPass
  453. });
  454. this.$http
  455. .post("/api/ecs_oe_admin/exam/audit/batch/audit", param)
  456. .then(() => {
  457. this.$notify({
  458. title: "成功",
  459. message: "操作成功",
  460. type: "success"
  461. });
  462. this.search();
  463. });
  464. })
  465. .catch(() => {});
  466. },
  467. openAuditDialog(examRecordDataId) {
  468. this.dialogFormVisible = true;
  469. this.auditForm = {
  470. examRecordDataId: examRecordDataId,
  471. disciplineType: "",
  472. disciplineDetail: "",
  473. isPass: false
  474. };
  475. },
  476. doAudit() {
  477. var param = new URLSearchParams(this.auditForm);
  478. this.$http
  479. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  480. .then(() => {
  481. this.$notify({
  482. title: "成功",
  483. message: "操作成功",
  484. type: "success"
  485. });
  486. this.dialogFormVisible = false;
  487. this.search();
  488. });
  489. },
  490. /**
  491. * 审核通过
  492. */
  493. auditPass(examRecordDataId) {
  494. var auditParams = {
  495. examRecordDataId: examRecordDataId,
  496. isPass: true
  497. };
  498. var param = new URLSearchParams(auditParams);
  499. this.$http
  500. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  501. .then(() => {
  502. this.search();
  503. this.$notify({
  504. title: "成功",
  505. message: "操作成功",
  506. type: "success"
  507. });
  508. });
  509. },
  510. gotoCaptureDetail(examRecordDataId) {
  511. this.$router.push({
  512. path: "/oe/captureDetail/" + examRecordDataId + "/awaitingAudit"
  513. });
  514. },
  515. backFill() {
  516. var formData = this.$route.query;
  517. if (formData && formData.examId) {
  518. for (var attr in formData) {
  519. var value = formData[attr];
  520. if (value && value != "null") {
  521. if (!isNaN(value)) {
  522. if (~~value == value) {
  523. value = parseInt(value);
  524. } else {
  525. value = parseFloat(value);
  526. }
  527. }
  528. this.form[attr] = value;
  529. }
  530. }
  531. this.search();
  532. }
  533. }
  534. },
  535. watch: {
  536. multipleSelection: function() {
  537. this.batchAuditBtnDisabled = !(this.multipleSelection.length > 0);
  538. }
  539. },
  540. created() {
  541. this.backFill();
  542. }
  543. };
  544. </script>
  545. <style scoped>
  546. .el-row {
  547. position: static !important;
  548. }
  549. .operateRow {
  550. margin-top: 2px;
  551. }
  552. .select-type {
  553. font-size: 8px;
  554. cursor: pointer;
  555. color: #409eff;
  556. }
  557. </style>
  558. <style scoped src="../style/common.css"></style>