awaitingAudit.vue 32 KB

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