examDetail.vue 36 KB

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