alreadyAudited.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045
  1. <template>
  2. <el-container>
  3. <el-main class="el-main-padding">
  4. <commonFormVue :form="form" :get-exam-condition="getExamCondition">
  5. <el-row v-show="showAllCondition">
  6. <el-col :span="6">
  7. <el-form-item label="考试记录ID">
  8. <el-input
  9. v-model="form.examRecordDataId"
  10. class="form_search_width"
  11. size="small"
  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. v-if="currentPagePrivileges.INVIGILATE_AUDIT_STATUS"
  20. v-model="form.status"
  21. class="form_search_width"
  22. size="small"
  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. size="small"
  32. class="form_search_width"
  33. placeholder="不通过"
  34. :disabled="true"
  35. ></el-input>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :span="6">
  39. <el-form-item label="审核说明">
  40. <el-select
  41. v-model="form.disciplineType"
  42. filterable
  43. remote
  44. :remote-method="getDisciplineTypeList"
  45. clearable
  46. class="form_search_width"
  47. placeholder="全部"
  48. size="small"
  49. @clear="getDisciplineTypeList"
  50. >
  51. <el-option
  52. v-for="item in disciplineTypeList"
  53. :key="item.code"
  54. :label="item.name"
  55. :value="item.code"
  56. ></el-option>
  57. </el-select>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="6">
  61. <el-form-item label="审核人">
  62. <el-input
  63. v-model="form.auditUserName"
  64. :disabled="form.auditType === '1'"
  65. class="form_search_width"
  66. size="small"
  67. placeholder="审核人"
  68. ></el-input>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="12">
  72. <el-form-item label="审核时间">
  73. <el-date-picker
  74. v-model="auditExamDatetimeRange"
  75. class="input"
  76. type="datetimerange"
  77. start-placeholder="开始日期"
  78. range-separator="至"
  79. end-placeholder="结束日期"
  80. value-format="yyyy/MM/dd HH:mm:ss"
  81. :clearable="false"
  82. size="small"
  83. @change="changeAuditExamDatetimeRange"
  84. ></el-date-picker>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="6">
  88. <el-form-item label="切屏次数">
  89. <el-input
  90. v-model="form.switchScreenCountStart"
  91. style="width: 80px"
  92. size="small"
  93. ></el-input>
  94. <el-input
  95. v-model="form.switchScreenCountEnd"
  96. style="width: 80px"
  97. size="small"
  98. ></el-input>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :span="6">
  102. <el-form-item label="审核类型">
  103. <el-select
  104. v-model="form.auditType"
  105. class="form_search_width"
  106. size="small"
  107. clearable
  108. placeholder="全部"
  109. >
  110. <el-option value="1" label="系统审核"></el-option>
  111. <el-option value="0" label="人工审核"></el-option>
  112. </el-select>
  113. </el-form-item>
  114. </el-col>
  115. <el-col :span="12">
  116. <el-form-item label="开考时间">
  117. <el-date-picker
  118. v-model="startExamDatetimeRange"
  119. class="input"
  120. type="datetimerange"
  121. start-placeholder="开始日期"
  122. range-separator="至"
  123. end-placeholder="结束日期"
  124. value-format="yyyy/MM/dd HH:mm:ss"
  125. :clearable="false"
  126. size="small"
  127. @change="changeStartExamDatetimeRange"
  128. ></el-date-picker>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="12">
  132. <el-form-item label="交卷时间">
  133. <el-date-picker
  134. v-model="endExamDatetimeRange"
  135. class="input"
  136. type="datetimerange"
  137. start-placeholder="开始日期"
  138. range-separator="至"
  139. end-placeholder="结束日期"
  140. value-format="yyyy/MM/dd HH:mm:ss"
  141. :clearable="false"
  142. size="small"
  143. @change="changeEndExamDatetimeRange"
  144. ></el-date-picker>
  145. </el-form-item>
  146. </el-col>
  147. <!-- <el-col :span="6">
  148. <el-form-item label="Ip">
  149. <el-input
  150. v-model="form.ip"
  151. class="form_search_width"
  152. size="small"
  153. placeholder="Ip"
  154. ></el-input>
  155. </el-form-item>
  156. </el-col>-->
  157. </el-row>
  158. </commonFormVue>
  159. <el-col :span="24">
  160. <el-button
  161. size="small"
  162. type="primary"
  163. icon="el-icon-search"
  164. @click="search('clickSelectBtn')"
  165. >查询</el-button
  166. >
  167. <el-button
  168. v-if="!showAllCondition"
  169. size="small"
  170. type="primary"
  171. icon="el-icon-more"
  172. @click="showMoreCondition"
  173. >高级查询</el-button
  174. >
  175. <el-button
  176. v-if="showAllCondition"
  177. size="small"
  178. type="primary"
  179. @click="showSimpleCondition"
  180. >简单查询</el-button
  181. >
  182. <el-button
  183. size="small"
  184. icon="el-icon-refresh"
  185. class="margin-bottom-10"
  186. @click="resetForm"
  187. >重置</el-button
  188. >
  189. </el-col>
  190. <el-row>
  191. <el-col>
  192. <div class="block-seperator"></div>
  193. <span>操作:</span>
  194. <el-button
  195. type="primary"
  196. size="small"
  197. icon="el-icon-download"
  198. @click="exportData"
  199. >导出</el-button
  200. >
  201. <el-dropdown
  202. v-show="currentPagePrivileges.ALREADY_AUDITED_REDO_AUDIT"
  203. >
  204. <el-button
  205. style="margin-left: 10px"
  206. icon="el-icon-arrow-down"
  207. type="primary"
  208. :disabled="noBatchSelected"
  209. size="small"
  210. >重审</el-button
  211. >
  212. <el-dropdown-menu slot="dropdown">
  213. <el-dropdown-item>
  214. <el-button
  215. size="mini"
  216. type="success"
  217. icon="el-icon-success"
  218. @click="redoAuditBatch('pass')"
  219. >通&nbsp;&nbsp;过</el-button
  220. >
  221. </el-dropdown-item>
  222. <el-dropdown-item>
  223. <el-button
  224. size="mini"
  225. type="danger"
  226. icon="el-icon-error"
  227. @click="redoAuditBatch('nopass')"
  228. >不通过</el-button
  229. >
  230. </el-dropdown-item>
  231. </el-dropdown-menu>
  232. </el-dropdown>
  233. <el-button
  234. v-if="form.updateTimeDesc !== true"
  235. style="margin-left: 10px"
  236. icon="el-icon-sort"
  237. size="small"
  238. @click="sortByUpdateTimeDesc(true)"
  239. >排序</el-button
  240. >
  241. <el-button
  242. v-if="form.updateTimeDesc === true"
  243. style="margin-left: 10px"
  244. icon="el-icon-bottom"
  245. type="primary"
  246. size="small"
  247. @click="sortByUpdateTimeDesc(false)"
  248. >更新时间排序</el-button
  249. >
  250. </el-col>
  251. </el-row>
  252. <el-row class="margin-top-10">
  253. <el-col :span="24">
  254. <el-table
  255. ref="multipleTable"
  256. v-loading="tableLoading"
  257. element-loading-text="数据加载中"
  258. :data="tableData"
  259. border
  260. @selection-change="handleSelectionChange"
  261. >
  262. <el-table-column type="selection" width="40"></el-table-column>
  263. <el-table-column label="考试记录ID" width="95">
  264. <template slot-scope="scope">
  265. <el-button
  266. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  267. type="text"
  268. @click="gotoCaptureDetail(scope.row.examRecordDataId)"
  269. >{{ scope.row.examRecordDataId }}</el-button
  270. >
  271. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">{{
  272. scope.row.examRecordDataId
  273. }}</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column
  277. min-width="100"
  278. label="姓名"
  279. prop="studentName"
  280. ></el-table-column>
  281. <el-table-column
  282. label="身份证号"
  283. prop="identityNumber"
  284. min-width="100"
  285. ></el-table-column>
  286. <el-table-column
  287. label="学号"
  288. prop="studentCode"
  289. min-width="100"
  290. ></el-table-column>
  291. <el-table-column
  292. label="课程"
  293. prop="courseName"
  294. min-width="90"
  295. ></el-table-column>
  296. <el-table-column
  297. label="课程层次"
  298. prop="courseLevel"
  299. width="80"
  300. ></el-table-column>
  301. <el-table-column
  302. label="校验次数"
  303. prop="faceTotalCount"
  304. width="80"
  305. ></el-table-column>
  306. <el-table-column
  307. label="成功次数"
  308. prop="faceSuccessCount"
  309. width="80"
  310. ></el-table-column>
  311. <el-table-column
  312. label="陌生人次数"
  313. prop="faceStrangerCount"
  314. width="95"
  315. ></el-table-column>
  316. <el-table-column
  317. label="人脸比对(%)"
  318. prop="faceSuccessPercent"
  319. width="100"
  320. ></el-table-column>
  321. <el-table-column
  322. label="切屏次数"
  323. prop="switchScreenCount"
  324. width="80"
  325. ></el-table-column>
  326. <el-table-column
  327. label="考试次数"
  328. prop="examOrder"
  329. width="80"
  330. ></el-table-column>
  331. <el-table-column label="场次" min-width="90">
  332. <template slot-scope="scope">
  333. <el-popover trigger="hover" placement="left">
  334. <div style="font-size: 18px; font-family: 新宋体">
  335. <tr>
  336. <td style="color: green">场次序号</td>
  337. <td style="color: purple; padding-left: 20px">
  338. {{ scope.row.examStageOrder }}
  339. </td>
  340. </tr>
  341. <tr>
  342. <td style="color: green">开始时间</td>
  343. <td style="color: purple; padding-left: 20px">
  344. {{ scope.row.startTime }}
  345. </td>
  346. </tr>
  347. <tr>
  348. <td style="color: green">结束时间</td>
  349. <td style="color: purple; padding-left: 20px">
  350. {{ scope.row.endTime }}
  351. </td>
  352. </tr>
  353. </div>
  354. <div slot="reference" class="name-wrapper">
  355. <span>{{ scope.row.examStageOrder }}</span>
  356. </div>
  357. </el-popover>
  358. </template>
  359. </el-table-column>
  360. <el-table-column
  361. label="开考时间"
  362. prop="paperStartTime"
  363. width="180"
  364. ></el-table-column>
  365. <el-table-column
  366. label="交卷时间"
  367. prop="paperSubmitTime"
  368. width="180"
  369. ></el-table-column>
  370. <el-table-column
  371. label="审核说明"
  372. prop="disciplineType"
  373. width="150"
  374. ></el-table-column>
  375. <el-table-column
  376. label="审核人"
  377. prop="auditUserName"
  378. width="120"
  379. ></el-table-column>
  380. <el-table-column
  381. label="审核时间"
  382. prop="paperAuditTime"
  383. width="180"
  384. ></el-table-column>
  385. <el-table-column label="IP" prop="ip" width="125">
  386. <template slot-scope="scope">
  387. {{ showShortIpsStr(scope.row.ip, ",") }}
  388. </template>
  389. </el-table-column>
  390. <el-table-column
  391. fixed="right"
  392. label="审核结果"
  393. prop="status"
  394. width="80"
  395. ></el-table-column>
  396. </el-table>
  397. <div class="block pull-right">
  398. <el-pagination
  399. :current-page.sync="form.pageNo"
  400. :page-sizes="[10, 20, 50, 100, 200, 300]"
  401. :page-size="form.pageSize"
  402. layout="total, sizes, prev, pager, next, jumper"
  403. :total="total"
  404. @size-change="handleSizeChange"
  405. @current-change="handleCurrentChange"
  406. ></el-pagination>
  407. </div>
  408. </el-col>
  409. </el-row>
  410. <el-dialog
  411. title="重审"
  412. width="400px"
  413. :visible.sync="dialogAuditFormVisible"
  414. @closed="auditDialogClosed"
  415. >
  416. <el-form ref="redoAuditForm" :model="auditForm">
  417. <el-form-item
  418. label="违纪类型"
  419. prop="illegallyTypeId"
  420. :rules="[
  421. { required: true, message: '请选择违纪类型', trigger: 'change' },
  422. ]"
  423. >
  424. <el-select
  425. v-model="auditForm.illegallyTypeId"
  426. filterable
  427. remote
  428. :remote-method="getDisciplineTypeList"
  429. clearable
  430. placeholder="请选择"
  431. size="small"
  432. @clear="getDisciplineTypeList"
  433. >
  434. <el-option
  435. v-for="item in disciplineTypeList"
  436. :key="item.id"
  437. :label="item.name"
  438. :value="item.id"
  439. ></el-option>
  440. </el-select>
  441. </el-form-item>
  442. <el-form-item label="详情描述" style="margin-top: 15px">
  443. <el-input
  444. v-model="auditForm.disciplineDetail"
  445. type="textarea"
  446. :autosize="{ minRows: 3, maxRows: 5 }"
  447. placeholder="请输入内容"
  448. ></el-input>
  449. </el-form-item>
  450. <div class="dialog-footer margin-top-10 text-center">
  451. <el-button type="primary" @click="doRedoAuditNoPass"
  452. >确 定</el-button
  453. >
  454. <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
  455. </div>
  456. </el-form>
  457. </el-dialog>
  458. <el-dialog
  459. title="考试记录详情"
  460. width="1250px"
  461. :visible.sync="examRecordDataDialog"
  462. @close="examRecordDataDialogClose"
  463. >
  464. <ExamRecordDetail
  465. :exam-record-data-id="curSelectedExamRecordDataId"
  466. :show-audit-button="curSelectedShowAuditButton"
  467. :need-loading="needLoading"
  468. @changeExamRecordData="changeExamRecordData"
  469. @auditExamRecordData="auditExamRecordData"
  470. ></ExamRecordDetail>
  471. </el-dialog>
  472. </el-main>
  473. </el-container>
  474. </template>
  475. <script>
  476. import { mapState } from "vuex";
  477. import commonFormVue from "../component/commonForm.vue";
  478. import { AUDIT_EXPLAIN_LIST } from "../constants/constants";
  479. import pagePrivilege from "../mixin/pagePrivilege.js";
  480. import _ from "lodash";
  481. import { showShortIpsStr } from "@/utils/utils.js";
  482. export default {
  483. components: { commonFormVue },
  484. mixins: [pagePrivilege],
  485. data() {
  486. return {
  487. showShortIpsStr,
  488. curSelectedExamRecordDataId: null,
  489. curSelectedShowAuditButton: false,
  490. needLoading: false,
  491. examRecordDataDialog: false,
  492. toNext: false,
  493. curTotalPages: 0,
  494. auditExplainList: AUDIT_EXPLAIN_LIST,
  495. total: 0,
  496. tableLoading: false,
  497. showAllCondition: false,
  498. form: {
  499. switchScreenCountStart: null,
  500. switchScreenCountEnd: null,
  501. examRecordDataId: null,
  502. hasStranger: null,
  503. courseId: null,
  504. courseLevel: null,
  505. examId: null,
  506. examStageId: null,
  507. faceSuccessPercentLower: null,
  508. faceSuccessPercentUpper: null,
  509. identityNumber: null,
  510. orgId: null,
  511. studentCode: null,
  512. studentName: null,
  513. isWarn: null,
  514. pageNo: 1,
  515. pageSize: 10,
  516. disciplineType: "",
  517. auditUserName: "",
  518. auditType: "",
  519. status: "",
  520. ORG_FIND_ALL: false, //查询所有机构
  521. startTime: null, //开考时间起
  522. endTime: null, //开考时间止
  523. submitStartTime: null, //交卷时间起
  524. submitEndTime: null, //交卷时间止
  525. auditStartTime: null, //审核时间起
  526. auditEndTime: null, //审核时间止
  527. ip: null, //Ip
  528. updateTimeDesc: null,
  529. },
  530. exportUrl: "/api/ecs_oe_admin/exam/audit/export/async",
  531. getExamCondition: {
  532. params: {
  533. name: "",
  534. examTypes: "ONLINE#ONLINE_HOMEWORK",
  535. propertyKeys: "IS_FACE_ENABLE",
  536. },
  537. filterCondition: "IS_FACE_ENABLE",
  538. },
  539. tableData: [],
  540. currentPagePrivileges: {
  541. INVIGILATE_AUDIT_STATUS: false, //数据状态
  542. SNAPSHOT_DETAILS: false, //详情查看
  543. ALREADY_AUDITED_REDO_AUDIT: false, //重新审核
  544. },
  545. getPermissionStatus: false, //获取权限状态
  546. disciplineTypeList: [],
  547. startExamDatetimeRange: [],
  548. endExamDatetimeRange: [],
  549. auditExamDatetimeRange: [],
  550. isOnlineExam: false,
  551. dialogAuditFormVisible: false,
  552. selectedIds: [],
  553. auditForm: {
  554. examRecordDataIds: [],
  555. illegallyTypeId: null,
  556. disciplineDetail: "",
  557. isPass: null,
  558. },
  559. };
  560. },
  561. computed: {
  562. ...mapState({ user: (state) => state.user }),
  563. noBatchSelected() {
  564. if (!this.isOnlineExam) {
  565. return true;
  566. }
  567. if (this.selectedIds.length === 0) {
  568. return true;
  569. } else {
  570. return false;
  571. }
  572. },
  573. },
  574. watch: {
  575. //监控权限是否获取完成
  576. getPermissionStatus: function (val) {
  577. if (val) {
  578. //需求调整20200924:经沟通暂时注释此需求
  579. // if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
  580. // this.form.status = "UN_PASS";
  581. // }
  582. // this.backFill();
  583. }
  584. },
  585. },
  586. created() {
  587. // this.backFill();
  588. this.getDisciplineTypeList("");
  589. },
  590. methods: {
  591. checkParam() {
  592. var reg = /(^0$)|(^[1-9][0-9]*$)/;
  593. if (this.form.switchScreenCountStart) {
  594. if (!reg.test(this.form.switchScreenCountStart)) {
  595. this.$notify({
  596. title: "警告",
  597. message: "切屏次数起始值错误",
  598. type: "warning",
  599. duration: 2000,
  600. });
  601. return false;
  602. }
  603. }
  604. if (this.form.switchScreenCountEnd) {
  605. if (!reg.test(this.form.switchScreenCountEnd)) {
  606. this.$notify({
  607. title: "警告",
  608. message: "切屏次数截止值错误",
  609. type: "warning",
  610. duration: 2000,
  611. });
  612. return false;
  613. }
  614. }
  615. return true;
  616. },
  617. doRedoAuditNoPass() {
  618. this.$refs["redoAuditForm"].validate((valid) => {
  619. if (valid) {
  620. var redoAuditInfo = {
  621. examRecordDataIds: this.auditForm.examRecordDataIds,
  622. isPass: false,
  623. illegallyTypeId: this.auditForm.illegallyTypeId,
  624. disciplineDetail: this.auditForm.disciplineDetail,
  625. };
  626. this.$http
  627. .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
  628. .then(() => {
  629. this.$notify({
  630. title: "成功",
  631. message: "操作成功",
  632. type: "success",
  633. });
  634. this.doRedoAuditNoPassPostProcess();
  635. this.search();
  636. })
  637. .catch((res) => {
  638. var errorMsg = "操作失败";
  639. if (res.response && res.response.data) {
  640. errorMsg = res.response.data.desc;
  641. }
  642. this.doRedoAuditNoPassPostProcess();
  643. this.$notify({
  644. title: "提示",
  645. message: errorMsg,
  646. type: "error",
  647. });
  648. });
  649. } else {
  650. return false;
  651. }
  652. });
  653. },
  654. doRedoAuditNoPassPostProcess() {
  655. this.auditForm = {
  656. examRecordDataId: null,
  657. illegallyTypeId: null,
  658. disciplineDetail: "",
  659. isPass: null,
  660. };
  661. this.$refs["redoAuditForm"].resetFields();
  662. this.dialogAuditFormVisible = false;
  663. },
  664. auditDialogClosed() {
  665. this.$refs["redoAuditForm"].resetFields();
  666. },
  667. redoAuditBatch(isPass) {
  668. this.auditForm.examRecordDataIds = this.selectedIds;
  669. if (isPass != "pass") {
  670. this.dialogAuditFormVisible = true;
  671. } else {
  672. //审核通过
  673. var redoAuditInfo = {
  674. examRecordDataIds: this.auditForm.examRecordDataIds,
  675. isPass: true,
  676. illegallyTypeId: null,
  677. disciplineDetail: "",
  678. };
  679. this.$http
  680. .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
  681. .then(() => {
  682. this.$notify({
  683. title: "成功",
  684. message: "操作成功",
  685. type: "success",
  686. });
  687. this.search();
  688. })
  689. .catch((res) => {
  690. var errorMsg = "操作失败";
  691. if (res.response && res.response.data) {
  692. errorMsg = res.response.data.desc;
  693. }
  694. this.$notify({
  695. title: "提示",
  696. message: errorMsg,
  697. type: "error",
  698. });
  699. });
  700. }
  701. },
  702. resetForm() {
  703. this.form = {
  704. examRecordDataId: null,
  705. hasStranger: null,
  706. courseId: null,
  707. courseLevel: null,
  708. examId: null,
  709. examStageId: null,
  710. faceSuccessPercentLower: null,
  711. faceSuccessPercentUpper: null,
  712. identityNumber: null,
  713. orgId: this.form.ORG_FIND_ALL ? null : this.form.orgId,
  714. studentCode: null,
  715. studentName: null,
  716. isWarn: null,
  717. pageNo: 1,
  718. pageSize: 10,
  719. disciplineType: "",
  720. auditUserName: "",
  721. status: "",
  722. ORG_FIND_ALL: this.form.ORG_FIND_ALL,
  723. startTime: null, //开考时间起
  724. endTime: null, //开考时间止
  725. submitStartTime: null, //交卷时间起
  726. submitEndTime: null, //交卷时间止
  727. auditStartTime: null, //审核时间起
  728. auditEndTime: null, //审核时间止
  729. updateTimeDesc: null,
  730. };
  731. this.startExamDatetimeRange = [];
  732. this.endExamDatetimeRange = [];
  733. this.auditExamDatetimeRange = [];
  734. },
  735. showMoreCondition() {
  736. this.showAllCondition = true;
  737. },
  738. sortByUpdateTimeDesc(value) {
  739. this.form.updateTimeDesc = value && value === true;
  740. },
  741. showSimpleCondition() {
  742. this.$notify({
  743. title: "提示",
  744. message: "高级查询条件值已重置",
  745. type: "info",
  746. duration: 2000,
  747. });
  748. this.resetForm();
  749. this.showAllCondition = false;
  750. },
  751. async search(type) {
  752. if (!this.form.examId) {
  753. this.$notify({
  754. title: "警告",
  755. message: "请选择考试",
  756. type: "warning",
  757. duration: 2000,
  758. });
  759. return false;
  760. }
  761. if (!this.checkParam()) {
  762. return false;
  763. }
  764. if (type && type == "clickSelectBtn") {
  765. this.form.pageNo = 1;
  766. }
  767. this.tableLoading = true;
  768. var params = JSON.parse(JSON.stringify(this.form));
  769. // if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
  770. // params.status = "UN_PASS";
  771. // }
  772. await this.$http
  773. .post("/api/ecs_oe_admin/exam/audit/list", params)
  774. .then((response) => {
  775. if (response.data) {
  776. this.tableData = response.data.content;
  777. this.total = response.data.totalElements;
  778. this.form.pageNo = response.data.number + 1;
  779. this.curTotalPages = response.data.totalPages;
  780. } else {
  781. this.tableData = [];
  782. }
  783. this.tableLoading = false;
  784. // this.$router.push({
  785. // path: "/oe/alreadyAudited?" + new URLSearchParams(params),
  786. // });
  787. });
  788. },
  789. selectable(row) {
  790. return row.isWarn;
  791. },
  792. handleSelectionChange(row) {
  793. this.selectedIds = [];
  794. row.forEach((element) => {
  795. if (element.examType == "ONLINE") {
  796. this.isOnlineExam = true;
  797. } else {
  798. this.isOnlineExam = false;
  799. }
  800. this.selectedIds.push(element.examRecordDataId);
  801. });
  802. },
  803. /**
  804. * pagesize改变时触发
  805. */
  806. handleSizeChange(val) {
  807. this.form.pageSize = val;
  808. this.search();
  809. },
  810. /**
  811. * 当前页改变时触发
  812. */
  813. handleCurrentChange(val) {
  814. this.form.pageNo = val;
  815. this.search();
  816. },
  817. curSelectedRow(examRecordDataId) {
  818. for (let n = 0; n < this.tableData.length; n++) {
  819. let row = this.tableData[n];
  820. if (examRecordDataId === row.examRecordDataId) {
  821. this.$refs["multipleTable"]?.toggleRowSelection(row, true);
  822. } else {
  823. this.$refs["multipleTable"]?.toggleRowSelection(row, false);
  824. }
  825. }
  826. },
  827. examRecordDataDialogClose() {
  828. this.examRecordDataDialog = false;
  829. },
  830. examRecordDataDialogOpen(examRecordDataId, showAuditButton) {
  831. this.examRecordDataDialog = true;
  832. this.curSelectedShowAuditButton = showAuditButton;
  833. this.curSelectedExamRecordDataId = examRecordDataId;
  834. this.curSelectedRow(examRecordDataId);
  835. },
  836. async changeExamRecordData(isNext) {
  837. // console.log("isNext:" + isNext);
  838. let curId = null;
  839. let isFirst = false;
  840. let isLast = false;
  841. let rowSize = this.tableData.length;
  842. for (let n = 0; n < rowSize; n++) {
  843. isFirst = n === 0;
  844. isLast = n === rowSize - 1;
  845. let row = this.tableData[n];
  846. if (this.curSelectedExamRecordDataId === row.examRecordDataId) {
  847. curId = row.examRecordDataId;
  848. if (isNext) {
  849. if (!isLast) {
  850. curId = this.tableData[n + 1].examRecordDataId;
  851. } else {
  852. if (this.form.pageNo < this.curTotalPages) {
  853. // 跳到下一页
  854. curId = null;
  855. this.form.pageNo = this.form.pageNo + 1;
  856. console.log("+++>toPage:" + this.form.pageNo);
  857. this.needLoading = true;
  858. await this.search();
  859. this.needLoading = false;
  860. if (this.tableData.length > 0) {
  861. curId = this.tableData[0].examRecordDataId;
  862. }
  863. } else {
  864. this.$message({
  865. message: "当前数据为最后一条!",
  866. type: "warning",
  867. showClose: true,
  868. });
  869. }
  870. }
  871. } else {
  872. if (!isFirst) {
  873. curId = this.tableData[n - 1].examRecordDataId;
  874. } else {
  875. if (this.form.pageNo > 1) {
  876. // 跳到上一页
  877. curId = null;
  878. this.form.pageNo = this.form.pageNo - 1;
  879. console.log("--->toPage:" + this.form.pageNo);
  880. this.needLoading = true;
  881. await this.search();
  882. this.needLoading = false;
  883. if (this.tableData.length > 0) {
  884. curId =
  885. this.tableData[this.tableData.length - 1].examRecordDataId;
  886. }
  887. } else {
  888. this.$message({
  889. message: "当前数据为第一条!",
  890. type: "warning",
  891. showClose: true,
  892. });
  893. }
  894. }
  895. }
  896. break;
  897. }
  898. }
  899. if (curId) {
  900. this.curSelectedExamRecordDataId = curId;
  901. this.curSelectedRow(curId);
  902. } else {
  903. this.examRecordDataDialogClose();
  904. }
  905. },
  906. auditExamRecordData(isPass) {
  907. console.log("isPass:" + isPass);
  908. },
  909. gotoCaptureDetail(examRecordDataId) {
  910. this.examRecordDataDialogOpen(examRecordDataId, false);
  911. // this.$router.push({
  912. // path: "/oe/captureDetail/" + examRecordDataId + "/alreadyAudited",
  913. // });
  914. },
  915. backFill() {
  916. var formData = this.$route.query;
  917. if (formData && formData.examId) {
  918. for (var attr in formData) {
  919. var value = formData[attr];
  920. if (value && value != "null") {
  921. //是数字 且 长度小于15
  922. if (!isNaN(value) && value.toString().length < 15) {
  923. value = _.toNumber(value);
  924. }
  925. this.form[attr] = value;
  926. }
  927. }
  928. this.search();
  929. }
  930. },
  931. getDisciplineTypeList(name) {
  932. if (!name) {
  933. name = "";
  934. }
  935. this.$http
  936. .get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
  937. params: { name },
  938. })
  939. .then((response) => {
  940. if (response.data) {
  941. //排除断电和机器故障
  942. this.disciplineTypeList = response.data.filter(
  943. (v) =>
  944. !(v.rootOrgId == -1 && v.code == "POWER_FAILURE") &&
  945. !(v.rootOrgId == -1 && v.code == "MACHINE_STOPPAGE")
  946. );
  947. }
  948. });
  949. },
  950. exportData() {
  951. if (!this.form.examId) {
  952. this.$notify({
  953. title: "警告",
  954. message: "请选择考试",
  955. type: "warning",
  956. duration: 1000,
  957. });
  958. return false;
  959. }
  960. if (!this.checkParam()) {
  961. return false;
  962. }
  963. this.$confirm("确定执行导出?", "提示", {
  964. confirmButtonText: "确定",
  965. cancelButtonText: "取消",
  966. type: "warning",
  967. }).then(() => {
  968. this.form.rootOrgId = this.user.rootOrgId;
  969. this.form.creator = this.user.userId;
  970. this.$http
  971. .get(
  972. this.exportUrl +
  973. "?$key=" +
  974. this.user.key +
  975. "&$token=" +
  976. this.user.token,
  977. {
  978. params: {
  979. query: this.form,
  980. },
  981. }
  982. )
  983. .then(() => {
  984. this.$notify({
  985. type: "success",
  986. message: "正在后台导出中,请稍后到“导出任务列表”中下载!",
  987. });
  988. })
  989. .catch((error) => {
  990. this.$notify({
  991. type: "error",
  992. message: error.response.data.desc,
  993. });
  994. });
  995. });
  996. },
  997. changeStartExamDatetimeRange(e) {
  998. if (e && e.length > 0) {
  999. this.form.startTime = e[0];
  1000. this.form.endTime = e[1];
  1001. } else {
  1002. this.form.startTime = "";
  1003. this.form.endTime = "";
  1004. }
  1005. },
  1006. changeEndExamDatetimeRange(e) {
  1007. if (e && e.length > 0) {
  1008. this.form.submitStartTime = e[0];
  1009. this.form.submitEndTime = e[1];
  1010. } else {
  1011. this.form.submitStartTime = "";
  1012. this.form.submitEndTime = "";
  1013. }
  1014. },
  1015. changeAuditExamDatetimeRange(e) {
  1016. if (e && e.length > 0) {
  1017. this.form.auditStartTime = e[0];
  1018. this.form.auditEndTime = e[1];
  1019. } else {
  1020. this.form.auditStartTime = "";
  1021. this.form.auditEndTime = "";
  1022. }
  1023. },
  1024. },
  1025. };
  1026. </script>
  1027. <style scoped src="../style/common.css"></style>