examDetail.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <template>
  2. <el-container>
  3. <el-main class="el-main-padding">
  4. <commonFormVue :form="form" :getExamCondition="getExamCondition">
  5. <el-row v-show="showAllCondition">
  6. <el-col :span="6">
  7. <el-form-item label="采集人">
  8. <el-input
  9. class="form_search_width"
  10. size="small"
  11. v-model="form.infoCollector"
  12. placeholder="采集人"
  13. >
  14. </el-input>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="12">
  18. <el-form-item label="开考时间">
  19. <el-date-picker
  20. class="input"
  21. v-model="startExamDatetimeRange"
  22. type="datetimerange"
  23. start-placeholder="开始日期"
  24. range-separator="至"
  25. end-placeholder="结束日期"
  26. value-format="yyyy/MM/dd HH:mm:ss"
  27. :clearable="false"
  28. size="small"
  29. @change="changeStartExamDatetimeRange"
  30. >
  31. </el-date-picker>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. </commonFormVue>
  36. <el-col :span="24">
  37. <el-button
  38. @click="search('clickSelectBtn')"
  39. size="small"
  40. type="primary"
  41. icon="el-icon-search"
  42. >查询
  43. </el-button>
  44. <el-button
  45. size="small"
  46. type="primary"
  47. icon="el-icon-more"
  48. v-if="!showAllCondition"
  49. @click="showMoreCondition"
  50. >
  51. 高级查询
  52. </el-button>
  53. <el-button
  54. size="small"
  55. type="primary"
  56. v-if="showAllCondition"
  57. @click="showSimpleCondition"
  58. >
  59. 简单查询
  60. </el-button>
  61. <el-button
  62. size="small"
  63. icon="el-icon-refresh"
  64. @click="resetForm"
  65. class="margin-bottom-10"
  66. >
  67. 重置
  68. </el-button>
  69. </el-col>
  70. <el-row>
  71. <el-col v-show="currentPagePrivileges.EXAM_DETAIL_EXPORT">
  72. <div class="block-seperator"></div>
  73. <span>操作:</span>
  74. <commonExportVue
  75. :form="form"
  76. :exportUrl="exportUrl"
  77. :exportFileName="exportFileName"
  78. ></commonExportVue>
  79. </el-col>
  80. </el-row>
  81. <el-row class="margin-top-10"
  82. ><el-col :span="24">
  83. <el-table
  84. v-loading="tableLoading"
  85. element-loading-text="数据加载中"
  86. ref="multipleTable"
  87. @selection-change="handleSelectionChange"
  88. :data="tableData"
  89. border
  90. >
  91. <el-table-column label="考试ID" width="120">
  92. <template slot-scope="scope">
  93. <el-button
  94. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  95. @click="gotoCaptureDetail(scope.row.dataId)"
  96. type="text"
  97. >{{ scope.row.dataId }}
  98. </el-button>
  99. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">
  100. {{ scope.row.dataId }}
  101. </span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column
  105. sortable
  106. label="学习中心"
  107. prop="orgName"
  108. width="120"
  109. >
  110. </el-table-column>
  111. <el-table-column
  112. sortable
  113. label="姓名"
  114. prop="studentName"
  115. width="120"
  116. >
  117. </el-table-column>
  118. <el-table-column
  119. sortable
  120. label="身份证号"
  121. prop="identityNumber"
  122. width="120"
  123. >
  124. </el-table-column>
  125. <el-table-column
  126. sortable
  127. label="学号"
  128. prop="studentCode"
  129. width="120"
  130. >
  131. </el-table-column>
  132. <el-table-column
  133. sortable
  134. label="课程"
  135. prop="courseNameAndCode"
  136. width="120"
  137. >
  138. </el-table-column>
  139. <el-table-column
  140. sortable
  141. label="课程层次"
  142. prop="courseLevel"
  143. width="120"
  144. >
  145. </el-table-column>
  146. <el-table-column sortable label="年级" prop="grade" width="120">
  147. </el-table-column>
  148. <el-table-column sortable label="学生电话" prop="phone" width="120">
  149. </el-table-column>
  150. <el-table-column
  151. sortable
  152. label="采集人"
  153. prop="infoCollector"
  154. width="120"
  155. >
  156. </el-table-column>
  157. <el-table-column
  158. sortable
  159. label="考试次数"
  160. prop="examOrder"
  161. width="120"
  162. >
  163. </el-table-column>
  164. <el-table-column
  165. sortable
  166. label="开考时间"
  167. prop="paperStartTime"
  168. width="120"
  169. >
  170. </el-table-column>
  171. <el-table-column
  172. sortable
  173. label="交卷时间"
  174. prop="paperSubmitTime"
  175. width="120"
  176. >
  177. </el-table-column>
  178. <el-table-column
  179. sortable
  180. label="持续时间"
  181. prop="examTime"
  182. width="120"
  183. >
  184. </el-table-column>
  185. <el-table-column
  186. sortable
  187. label="校验成功率(%)"
  188. prop="faceSuccessPercent"
  189. width="150"
  190. >
  191. </el-table-column>
  192. <el-table-column
  193. sortable
  194. label="续考次数"
  195. prop="continuedCount"
  196. width="120"
  197. >
  198. </el-table-column>
  199. <el-table-column
  200. sortable
  201. label="卷面总分"
  202. prop="paperTotalScore"
  203. width="120"
  204. >
  205. </el-table-column>
  206. <el-table-column
  207. sortable
  208. label="是否违纪"
  209. prop="isIllegality"
  210. width="120"
  211. >
  212. </el-table-column>
  213. <el-table-column
  214. sortable
  215. label="是否提交"
  216. prop="isSubmit"
  217. width="120"
  218. >
  219. </el-table-column>
  220. <el-table-column fixed="right" label="详情" width="100">
  221. <template slot-scope="scope">
  222. <el-row
  223. class="operateRow"
  224. v-if="
  225. scope.row.examType == 'ONLINE' &&
  226. currentPagePrivileges.EXAM_QUERY_GETPAPER
  227. "
  228. >
  229. <el-col :span="24">
  230. <el-button
  231. size="mini"
  232. type="primary"
  233. icon="el-icon-view"
  234. plain
  235. @click="
  236. examPaperDetail(scope.row.courseId, scope.row.dataId)
  237. "
  238. >调&nbsp;卷
  239. </el-button>
  240. </el-col>
  241. </el-row>
  242. <el-row
  243. class="operateRow"
  244. v-if="
  245. scope.row.examType == 'ONLINE' &&
  246. currentPagePrivileges.REDO_AUDIT
  247. "
  248. >
  249. <el-col :span="24">
  250. <el-dropdown>
  251. <el-button
  252. size="mini"
  253. icon="el-icon-arrow-down"
  254. type="primary"
  255. plain
  256. >
  257. 重审
  258. </el-button>
  259. <el-dropdown-menu slot="dropdown">
  260. <el-dropdown-item>
  261. <el-button
  262. size="mini"
  263. type="success"
  264. @click="redoAudit(scope.row.dataId, 'pass')"
  265. icon="el-icon-success"
  266. >
  267. 通&nbsp;&nbsp;过
  268. </el-button>
  269. </el-dropdown-item>
  270. <el-dropdown-item>
  271. <el-button
  272. size="mini"
  273. type="danger"
  274. @click="redoAudit(scope.row.dataId, 'nopass')"
  275. icon="el-icon-error"
  276. >
  277. 不通过
  278. </el-button>
  279. </el-dropdown-item>
  280. </el-dropdown-menu>
  281. </el-dropdown>
  282. </el-col>
  283. </el-row>
  284. <el-row
  285. class="operateRow"
  286. v-if="
  287. scope.row.examType == 'OFFLINE' &&
  288. scope.row.offlineFileUrl &&
  289. currentPagePrivileges.EXAM_QUERY_GETPAPER
  290. "
  291. >
  292. <el-col :span="24">
  293. <el-button
  294. size="mini"
  295. type="primary"
  296. icon="el-icon-view"
  297. plain
  298. @click="downloadOfflineFile(scope.row.offlineFileUrl)"
  299. >调卷
  300. </el-button>
  301. </el-col>
  302. </el-row>
  303. </template>
  304. </el-table-column>
  305. </el-table>
  306. <div class="block pull-right">
  307. <el-pagination
  308. @size-change="handleSizeChange"
  309. @current-change="handleCurrentChange"
  310. :current-page.sync="form.pageNo"
  311. :page-sizes="[10, 20, 50, 100]"
  312. :page-size="form.pageSize"
  313. layout="total, sizes, prev, pager, next, jumper"
  314. :total="total"
  315. >
  316. </el-pagination></div></el-col
  317. ></el-row>
  318. <el-dialog title="审核" :visible.sync="dialogAuditFormVisible">
  319. <el-form :model="auditForm" ref="redoAuditForm">
  320. <el-form-item
  321. label="违纪类型"
  322. prop="disciplineType"
  323. :rules="[
  324. { required: true, message: '请选择违纪类型', trigger: 'change' }
  325. ]"
  326. >
  327. <el-select v-model="auditForm.disciplineType" placeholder="请选择">
  328. <el-option
  329. v-for="item in disciplineTypeList"
  330. :key="item.name"
  331. :label="item.desc"
  332. :value="item.name"
  333. >
  334. </el-option>
  335. </el-select>
  336. </el-form-item>
  337. <el-form-item label="详情描述" style="margin-top:15px;">
  338. <el-input
  339. v-model="auditForm.disciplineDetail"
  340. type="textarea"
  341. :autosize="{ minRows: 6, maxRows: 10 }"
  342. placeholder="请输入内容"
  343. >
  344. </el-input>
  345. </el-form-item>
  346. <div class="dialog-footer">
  347. <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
  348. <el-button type="primary" @click="doRedoAuditNoPass"
  349. >确 定</el-button
  350. >
  351. </div>
  352. </el-form>
  353. </el-dialog>
  354. </el-main>
  355. </el-container>
  356. </template>
  357. <script>
  358. import { mapState } from "vuex";
  359. import commonFormVue from "../component/commonForm.vue";
  360. import commonExportVue from "../component/commonExport.vue";
  361. import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
  362. import pagePrivilege from "../mixin/pagePrivilege.js";
  363. export default {
  364. components: { commonFormVue, commonExportVue },
  365. mixins: [pagePrivilege],
  366. data() {
  367. return {
  368. disciplineTypeList: DISCIPLINE_TYPE_LIST,
  369. total: 0,
  370. tableLoading: false,
  371. showAllCondition: false,
  372. startExamDatetimeRange: [],
  373. form: {
  374. examRecordDataId: null,
  375. hasStranger: null,
  376. courseId: null,
  377. courseLevel: null,
  378. examId: null,
  379. examRecordId: null,
  380. faceSuccessPercentLower: null,
  381. faceSuccessPercentUpper: null,
  382. identityNumber: null,
  383. orgId: null,
  384. studentCode: null,
  385. studentName: null,
  386. isWarn: null,
  387. pageNo: 1,
  388. pageSize: 10,
  389. rootOrgId: null,
  390. startTime: null,
  391. endTime: null,
  392. infoCollector: null
  393. },
  394. getExamCondition: {
  395. params: {
  396. name: "",
  397. examTypes: "ONLINE#OFFLINE"
  398. },
  399. filterCondition: ""
  400. },
  401. tableData: [],
  402. exportUrl: "/api/ecs_oe_admin/exam/record/detail/list/export",
  403. exportFileName: "考试明细",
  404. currentPagePrivileges: {
  405. EXAM_DETAIL_EXPORT: false, //导出
  406. SNAPSHOT_DETAILS: false, //详情查看
  407. EXAM_QUERY_GETPAPER: false, //调卷
  408. REDO_AUDIT: false //重新审核
  409. },
  410. dialogAuditFormVisible: false,
  411. auditForm: {
  412. examRecordDataId: null,
  413. disciplineType: "",
  414. disciplineDetail: "",
  415. isPass: null
  416. }
  417. };
  418. },
  419. computed: {
  420. ...mapState({ user: state => state.user })
  421. },
  422. methods: {
  423. resetForm() {
  424. this.form = {
  425. examRecordDataId: null,
  426. hasStranger: null,
  427. courseId: null,
  428. courseLevel: null,
  429. examId: null,
  430. examRecordId: null,
  431. faceSuccessPercentLower: null,
  432. faceSuccessPercentUpper: null,
  433. identityNumber: null,
  434. orgId: null,
  435. studentCode: null,
  436. studentName: null,
  437. isWarn: null,
  438. pageNo: 1,
  439. pageSize: 10,
  440. rootOrgId: null,
  441. startTime: null,
  442. endTime: null,
  443. infoCollector: null
  444. };
  445. this.startExamDatetimeRange = [];
  446. },
  447. showMoreCondition() {
  448. this.showAllCondition = true;
  449. },
  450. showSimpleCondition() {
  451. this.$notify({
  452. title: "提示",
  453. message: "高级查询条件值已重置",
  454. type: "info",
  455. duration: 2000
  456. });
  457. this.resetForm();
  458. this.showAllCondition = false;
  459. },
  460. changeStartExamDatetimeRange(e) {
  461. if (e && e.length > 0) {
  462. this.form.startTime = e[0];
  463. this.form.endTime = e[1];
  464. } else {
  465. this.form.startTime = "";
  466. this.form.endTime = "";
  467. }
  468. },
  469. search(type) {
  470. if (!this.form.examId) {
  471. this.$notify({
  472. title: "警告",
  473. message: "请选择考试批次",
  474. type: "warning",
  475. duration: 2000
  476. });
  477. return false;
  478. }
  479. if (type && type == "clickSelectBtn") {
  480. this.form.pageNo = 1;
  481. }
  482. this.tableLoading = true;
  483. var params = JSON.parse(JSON.stringify(this.form));
  484. this.$http
  485. .post("/api/ecs_oe_admin/exam/record/detail/list", params)
  486. .then(response => {
  487. if (response.data) {
  488. this.tableData = response.data.content;
  489. this.total = response.data.totalElements;
  490. this.form.pageNo = response.data.number + 1;
  491. } else {
  492. this.tableData = [];
  493. }
  494. this.tableLoading = false;
  495. this.$router.push({
  496. path: "/oe/examDetail?" + new URLSearchParams(params)
  497. });
  498. });
  499. },
  500. handleSelectionChange(val) {
  501. this.multipleSelection = val;
  502. },
  503. /**
  504. * pagesize改变时触发
  505. */
  506. handleSizeChange(val) {
  507. this.form.pageSize = val;
  508. this.search();
  509. },
  510. /**
  511. * 当前页改变时触发
  512. */
  513. handleCurrentChange() {
  514. this.search();
  515. },
  516. examPaperDetail(courseId, examRecordDataId) {
  517. window.open(
  518. "/admin/oe/examPaperDetail/" + courseId + "/" + examRecordDataId
  519. );
  520. },
  521. gotoCaptureDetail(examRecordDataId) {
  522. this.$router.push({
  523. path: "/oe/captureDetail/" + examRecordDataId + "/examDetail"
  524. });
  525. },
  526. downloadOfflineFile(url) {
  527. window.open(url);
  528. },
  529. redoAudit(examRecordDataId, isPass) {
  530. if (isPass != "pass") {
  531. this.dialogAuditFormVisible = true;
  532. this.auditForm.examRecordDataId = examRecordDataId;
  533. } else {
  534. //审核通过
  535. var redoAuditInfo = {
  536. examRecordDataIds: [examRecordDataId],
  537. isPass: true,
  538. disciplineType: "",
  539. disciplineDetail: ""
  540. };
  541. this.$http
  542. .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
  543. .then(() => {
  544. this.$notify({
  545. title: "成功",
  546. message: "操作成功",
  547. type: "success"
  548. });
  549. this.search();
  550. });
  551. }
  552. },
  553. doRedoAuditNoPass() {
  554. this.$refs["redoAuditForm"].validate(valid => {
  555. if (valid) {
  556. var redoAuditInfo = {
  557. examRecordDataIds: [this.auditForm.examRecordDataId],
  558. isPass: false,
  559. disciplineType: this.auditForm.disciplineType,
  560. disciplineDetail: this.auditForm.disciplineDetail
  561. };
  562. this.$http
  563. .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
  564. .then(() => {
  565. this.$notify({
  566. title: "成功",
  567. message: "操作成功",
  568. type: "success"
  569. });
  570. this.auditForm = {
  571. examRecordDataId: null,
  572. disciplineType: "",
  573. disciplineDetail: "",
  574. isPass: null
  575. };
  576. this.dialogAuditFormVisible = false;
  577. this.search();
  578. });
  579. } else {
  580. return false;
  581. }
  582. });
  583. },
  584. backFill() {
  585. var formData = this.$route.query;
  586. if (formData && formData.examId) {
  587. for (var attr in formData) {
  588. var value = formData[attr];
  589. if (value && value != "null") {
  590. if (!isNaN(value)) {
  591. if (~~value == value) {
  592. value = parseInt(value);
  593. } else {
  594. value = parseFloat(value);
  595. }
  596. }
  597. this.form[attr] = value;
  598. }
  599. }
  600. this.search();
  601. }
  602. }
  603. },
  604. created() {
  605. this.form.rootOrgId = this.user.rootOrgId;
  606. this.backFill();
  607. }
  608. };
  609. </script>
  610. <style scope>
  611. .el-date-editor.el-input,
  612. .el-date-editor.el-input__inner {
  613. width: auto !important;
  614. }
  615. </style>
  616. <style scoped src="../style/common.css"></style>