alreadyAudited.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  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="考试ID">
  8. <el-input
  9. class="form_search_width"
  10. size="small"
  11. v-model="form.examRecordDataId"
  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. class="form_search_width"
  20. size="small"
  21. v-if="currentPagePrivileges.INVIGILATE_AUDIT_STATUS"
  22. v-model="form.status"
  23. clearable
  24. placeholder="全部"
  25. >
  26. <el-option value="PASS" label="通过"></el-option>
  27. <el-option value="UN_PASS" label="不通过"></el-option>
  28. </el-select>
  29. <el-input
  30. size="small"
  31. class="form_search_width"
  32. v-if="!currentPagePrivileges.INVIGILATE_AUDIT_STATUS"
  33. placeholder="不通过"
  34. :disabled="true"
  35. ></el-input>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :span="6">
  39. <el-form-item label="审核说明">
  40. <el-select
  41. v-model="form.disciplineType"
  42. filterable
  43. remote
  44. :remote-method="getDisciplineTypeList"
  45. clearable
  46. class="form_search_width"
  47. @clear="getDisciplineTypeList"
  48. placeholder="全部"
  49. size="small"
  50. >
  51. <el-option
  52. v-for="item in disciplineTypeList"
  53. :key="item.code"
  54. :label="item.name"
  55. :value="item.code"
  56. ></el-option>
  57. </el-select>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="6">
  61. <el-form-item label="审核人">
  62. <el-input
  63. class="form_search_width"
  64. size="small"
  65. v-model="form.auditUserName"
  66. placeholder="审核人"
  67. ></el-input>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="12">
  71. <el-form-item label="开考时间">
  72. <el-date-picker
  73. class="input"
  74. v-model="startExamDatetimeRange"
  75. type="datetimerange"
  76. start-placeholder="开始日期"
  77. range-separator="至"
  78. end-placeholder="结束日期"
  79. value-format="yyyy/MM/dd HH:mm:ss"
  80. :clearable="false"
  81. size="small"
  82. @change="changeStartExamDatetimeRange"
  83. ></el-date-picker>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="12">
  87. <el-form-item label="交卷时间">
  88. <el-date-picker
  89. class="input"
  90. v-model="endExamDatetimeRange"
  91. type="datetimerange"
  92. start-placeholder="开始日期"
  93. range-separator="至"
  94. end-placeholder="结束日期"
  95. value-format="yyyy/MM/dd HH:mm:ss"
  96. :clearable="false"
  97. size="small"
  98. @change="changeStartExamDatetimeRange"
  99. ></el-date-picker>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="12">
  103. <el-form-item label="审核时间">
  104. <el-date-picker
  105. class="input"
  106. v-model="AuditExamDatetimeRange"
  107. type="datetimerange"
  108. start-placeholder="开始日期"
  109. range-separator="至"
  110. end-placeholder="结束日期"
  111. value-format="yyyy/MM/dd HH:mm:ss"
  112. :clearable="false"
  113. size="small"
  114. @change="changeAuditExamDatetimeRange"
  115. ></el-date-picker>
  116. </el-form-item>
  117. </el-col>
  118. </el-row>
  119. </commonFormVue>
  120. <el-col :span="24">
  121. <el-button
  122. @click="search('clickSelectBtn')"
  123. size="small"
  124. type="primary"
  125. icon="el-icon-search"
  126. >查询</el-button
  127. >
  128. <el-button
  129. size="small"
  130. type="primary"
  131. icon="el-icon-more"
  132. v-if="!showAllCondition"
  133. @click="showMoreCondition"
  134. >高级查询</el-button
  135. >
  136. <el-button
  137. size="small"
  138. type="primary"
  139. v-if="showAllCondition"
  140. @click="showSimpleCondition"
  141. >简单查询</el-button
  142. >
  143. <el-button
  144. size="small"
  145. icon="el-icon-refresh"
  146. @click="resetForm"
  147. class="margin-bottom-10"
  148. >重置</el-button
  149. >
  150. </el-col>
  151. <el-row class="margin-top-10">
  152. <el-col :span="24">
  153. <el-table
  154. v-loading="tableLoading"
  155. element-loading-text="数据加载中"
  156. ref="multipleTable"
  157. @selection-change="handleSelectionChange"
  158. :data="tableData"
  159. border
  160. >
  161. <el-table-column label="考试ID">
  162. <template slot-scope="scope">
  163. <el-button
  164. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  165. @click="gotoCaptureDetail(scope.row.examRecordDataId)"
  166. type="text"
  167. >{{ scope.row.examRecordDataId }}</el-button
  168. >
  169. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">{{
  170. scope.row.examRecordDataId
  171. }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. sortable
  176. label="姓名"
  177. prop="studentName"
  178. ></el-table-column>
  179. <el-table-column
  180. sortable
  181. label="身份证号"
  182. prop="identityNumber"
  183. width="120"
  184. ></el-table-column>
  185. <el-table-column
  186. sortable
  187. label="学号"
  188. prop="studentCode"
  189. width="120"
  190. ></el-table-column>
  191. <el-table-column
  192. sortable
  193. label="课程"
  194. prop="courseName"
  195. width="120"
  196. ></el-table-column>
  197. <el-table-column
  198. sortable
  199. label="课程层次"
  200. prop="courseLevel"
  201. width="120"
  202. ></el-table-column>
  203. <el-table-column
  204. sortable
  205. label="校验次数"
  206. prop="faceTotalCount"
  207. width="120"
  208. ></el-table-column>
  209. <el-table-column
  210. sortable
  211. label="成功次数"
  212. prop="faceSuccessCount"
  213. width="120"
  214. ></el-table-column>
  215. <el-table-column
  216. sortable
  217. label="陌生人记录"
  218. prop="faceStrangerCount"
  219. width="120"
  220. ></el-table-column>
  221. <el-table-column
  222. sortable
  223. label="人脸识别成功率(%)"
  224. prop="faceSuccessPercent"
  225. width="180"
  226. ></el-table-column>
  227. <el-table-column
  228. sortable
  229. label="考试次数"
  230. prop="examOrder"
  231. width="120"
  232. ></el-table-column>
  233. <el-table-column
  234. sortable
  235. label="开考时间"
  236. prop="paperStartTime"
  237. width="120"
  238. ></el-table-column>
  239. <el-table-column
  240. sortable
  241. label="交卷时间"
  242. prop="paperSubmitTime"
  243. width="120"
  244. ></el-table-column>
  245. <el-table-column
  246. sortable
  247. label="审核说明"
  248. prop="disciplineType"
  249. width="120"
  250. ></el-table-column>
  251. <el-table-column
  252. sortable
  253. label="审核结果"
  254. prop="status"
  255. width="120"
  256. ></el-table-column>
  257. <el-table-column
  258. sortable
  259. label="审核人"
  260. prop="auditUserName"
  261. width="180"
  262. ></el-table-column>
  263. <el-table-column
  264. sortable
  265. label="审核时间"
  266. prop="paperAuditTime"
  267. width="120"
  268. ></el-table-column>
  269. </el-table>
  270. <div class="block pull-right">
  271. <el-pagination
  272. @size-change="handleSizeChange"
  273. @current-change="handleCurrentChange"
  274. :current-page.sync="form.pageNo"
  275. :page-sizes="[10, 20, 50, 100, 200, 300]"
  276. :page-size="form.pageSize"
  277. layout="total, sizes, prev, pager, next, jumper"
  278. :total="total"
  279. ></el-pagination>
  280. </div>
  281. </el-col>
  282. </el-row>
  283. </el-main>
  284. </el-container>
  285. </template>
  286. <script>
  287. import { mapState } from "vuex";
  288. import commonFormVue from "../component/commonForm.vue";
  289. import { AUDIT_EXPLAIN_LIST } from "../constants/constants";
  290. import pagePrivilege from "../mixin/pagePrivilege.js";
  291. import _ from "lodash";
  292. export default {
  293. components: { commonFormVue },
  294. mixins: [pagePrivilege],
  295. data() {
  296. return {
  297. auditExplainList: AUDIT_EXPLAIN_LIST,
  298. total: 0,
  299. tableLoading: false,
  300. showAllCondition: false,
  301. form: {
  302. examRecordDataId: null,
  303. hasStranger: null,
  304. courseId: null,
  305. courseLevel: null,
  306. examId: null,
  307. examStageId: null,
  308. faceSuccessPercentLower: null,
  309. faceSuccessPercentUpper: null,
  310. identityNumber: null,
  311. orgId: null,
  312. studentCode: null,
  313. studentName: null,
  314. isWarn: null,
  315. pageNo: 1,
  316. pageSize: 10,
  317. disciplineType: "",
  318. auditUserName: "",
  319. status: "",
  320. ORG_FIND_ALL: false, //查询所有机构
  321. startTime: null, //开考时间起
  322. endTime: null, //开考时间止
  323. submitStartTime: null, //交卷时间起
  324. submitEndTime: null, //交卷时间止
  325. auditStartTime: null, //审核时间起
  326. auditEndTime: null //审核时间止
  327. },
  328. getExamCondition: {
  329. params: {
  330. name: "",
  331. examTypes: "ONLINE#ONLINE_HOMEWORK",
  332. propertyKeys: "IS_FACE_ENABLE"
  333. },
  334. filterCondition: "IS_FACE_ENABLE"
  335. },
  336. tableData: [],
  337. currentPagePrivileges: {
  338. INVIGILATE_AUDIT_STATUS: false, //数据状态
  339. SNAPSHOT_DETAILS: false //详情查看
  340. },
  341. getPermissionStatus: false, //获取权限状态
  342. disciplineTypeList: [],
  343. startExamDatetimeRange: [],
  344. endExamDatetimeRange: [],
  345. auditExamDatetimeRange: []
  346. };
  347. },
  348. computed: {
  349. ...mapState({ user: state => state.user })
  350. },
  351. methods: {
  352. resetForm() {
  353. this.form = {
  354. examRecordDataId: null,
  355. hasStranger: null,
  356. courseId: null,
  357. courseLevel: null,
  358. examId: null,
  359. examStageId: null,
  360. faceSuccessPercentLower: null,
  361. faceSuccessPercentUpper: null,
  362. identityNumber: null,
  363. orgId: this.form.ORG_FIND_ALL ? null : this.form.orgId,
  364. studentCode: null,
  365. studentName: null,
  366. isWarn: null,
  367. pageNo: 1,
  368. pageSize: 10,
  369. disciplineType: "",
  370. auditUserName: "",
  371. status: "",
  372. ORG_FIND_ALL: this.form.ORG_FIND_ALL,
  373. startTime: null, //开考时间起
  374. endTime: null, //开考时间止
  375. submitStartTime: null, //交卷时间起
  376. submitEndTime: null, //交卷时间止
  377. auditStartTime: null, //审核时间起
  378. auditEndTime: null //审核时间止
  379. };
  380. this.startExamDatetimeRange = [];
  381. this.endExamDatetimeRange = [];
  382. this.auditExamDatetimeRange = [];
  383. },
  384. showMoreCondition() {
  385. this.showAllCondition = true;
  386. },
  387. showSimpleCondition() {
  388. this.$notify({
  389. title: "提示",
  390. message: "高级查询条件值已重置",
  391. type: "info",
  392. duration: 2000
  393. });
  394. this.resetForm();
  395. this.showAllCondition = false;
  396. },
  397. search(type) {
  398. if (!this.form.examId) {
  399. this.$notify({
  400. title: "警告",
  401. message: "请选择考试批次",
  402. type: "warning",
  403. duration: 2000
  404. });
  405. return false;
  406. }
  407. if (type && type == "clickSelectBtn") {
  408. this.form.pageNo = 1;
  409. }
  410. this.tableLoading = true;
  411. var params = JSON.parse(JSON.stringify(this.form));
  412. if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
  413. params.status = "UN_PASS";
  414. }
  415. this.$http
  416. .post("/api/ecs_oe_admin/exam/audit/list", params)
  417. .then(response => {
  418. if (response.data) {
  419. this.tableData = response.data.content;
  420. this.total = response.data.totalElements;
  421. this.form.pageNo = response.data.number + 1;
  422. } else {
  423. this.tableData = [];
  424. }
  425. this.tableLoading = false;
  426. this.$router.push({
  427. path: "/oe/alreadyAudited?" + new URLSearchParams(params)
  428. });
  429. });
  430. },
  431. selectable(row) {
  432. return row.isWarn;
  433. },
  434. handleSelectionChange(val) {
  435. this.multipleSelection = val;
  436. },
  437. /**
  438. * pagesize改变时触发
  439. */
  440. handleSizeChange(val) {
  441. this.form.pageSize = val;
  442. this.search();
  443. },
  444. /**
  445. * 当前页改变时触发
  446. */
  447. handleCurrentChange() {
  448. this.search();
  449. },
  450. gotoCaptureDetail(examRecordDataId) {
  451. this.$router.push({
  452. path: "/oe/captureDetail/" + examRecordDataId + "/alreadyAudited"
  453. });
  454. },
  455. backFill() {
  456. var formData = this.$route.query;
  457. if (formData && formData.examId) {
  458. for (var attr in formData) {
  459. var value = formData[attr];
  460. if (value && value != "null") {
  461. //是数字 且 长度小于15
  462. if (!isNaN(value) && value.toString().length < 15) {
  463. value = _.toNumber(value);
  464. }
  465. this.form[attr] = value;
  466. }
  467. }
  468. this.search();
  469. }
  470. },
  471. getDisciplineTypeList(name) {
  472. if (!name) {
  473. name = "";
  474. }
  475. this.$http
  476. .get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
  477. params: { name }
  478. })
  479. .then(response => {
  480. if (response.data) {
  481. //排除断电和机器故障
  482. this.disciplineTypeList = response.data.filter(
  483. v =>
  484. !(v.rootOrgId == -1 && v.code == "POWER_FAILURE") &&
  485. !(v.rootOrgId == -1 && v.code == "MACHINE_STOPPAGE")
  486. );
  487. }
  488. });
  489. },
  490. changeStartExamDatetimeRange(e) {
  491. if (e && e.length > 0) {
  492. this.form.startTime = e[0];
  493. this.form.endTime = e[1];
  494. } else {
  495. this.form.startTime = "";
  496. this.form.endTime = "";
  497. }
  498. },
  499. changeEndExamDatetimeRange(e) {
  500. if (e && e.length > 0) {
  501. this.form.submitStartTime = e[0];
  502. this.form.submitEndTime = e[1];
  503. } else {
  504. this.form.submitStartTime = "";
  505. this.form.submitEndTime = "";
  506. }
  507. },
  508. changeAuditExamDatetimeRange(e) {
  509. if (e && e.length > 0) {
  510. this.form.AuditStartTime = e[0];
  511. this.form.AuditEndTime = e[1];
  512. } else {
  513. this.form.AuditStartTime = "";
  514. this.form.AuditEndTime = "";
  515. }
  516. }
  517. },
  518. watch: {
  519. //监控权限是否获取完成
  520. getPermissionStatus: function(val) {
  521. if (val) {
  522. if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
  523. this.form.status = "UN_PASS";
  524. }
  525. this.backFill();
  526. }
  527. }
  528. },
  529. created() {
  530. this.getDisciplineTypeList("");
  531. }
  532. };
  533. </script>
  534. <style scoped src="../style/common.css"></style>