examDetail.vue 34 KB

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