awaitingAudit.vue 18 KB

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