captureDetail.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <el-container>
  3. <el-header> <LinkTitlesCustom :currentPaths="currentPaths" /> </el-header>
  4. <el-main>
  5. <el-row>
  6. <el-col :span="6">
  7. <img :src="studentBasePhotoPath" alt width="180" />
  8. </el-col>
  9. <el-col :span="18">
  10. <el-row>
  11. <el-col :span="16" class="capture-title">
  12. <span>监考数据ID:{{ examRecordDataId }}</span>
  13. </el-col>
  14. <el-col :span="8" style="text-align: right;">
  15. <el-button
  16. v-if="showAudit"
  17. type="success"
  18. icon="el-icon-success"
  19. circle
  20. title="通过"
  21. @click="auditPass"
  22. ></el-button>
  23. <el-button
  24. v-if="showAudit"
  25. type="danger"
  26. icon="el-icon-error"
  27. title="不通过"
  28. circle
  29. @click="openAuditDialog"
  30. ></el-button>
  31. <el-button
  32. size="small"
  33. icon="el-icon-back"
  34. type="primary"
  35. @click="back"
  36. >
  37. 返回
  38. </el-button>
  39. </el-col>
  40. </el-row>
  41. <el-row class="margin-top-10">
  42. <el-col :span="24">
  43. <el-table :data="examAuditData" border>
  44. <el-table-column
  45. sortable
  46. label="学号"
  47. prop="studentCode"
  48. ></el-table-column>
  49. <el-table-column
  50. sortable
  51. label="身份证号"
  52. prop="identityNumber"
  53. ></el-table-column>
  54. <el-table-column
  55. sortable
  56. label="姓名"
  57. prop="studentName"
  58. ></el-table-column>
  59. <el-table-column
  60. sortable
  61. label="课程代码"
  62. prop="courseCode"
  63. ></el-table-column>
  64. <el-table-column
  65. sortable
  66. label="课程名称"
  67. prop="courseName"
  68. ></el-table-column>
  69. </el-table>
  70. </el-col>
  71. </el-row>
  72. <el-row class="margin-top-10">
  73. <el-col :span="24">
  74. <el-table :data="examAuditData" border>
  75. <el-table-column
  76. sortable
  77. label="校验次数"
  78. prop="faceTotalCount"
  79. width="110"
  80. ></el-table-column>
  81. <el-table-column
  82. sortable
  83. label="成功次数"
  84. prop="faceSuccessCount"
  85. width="110"
  86. ></el-table-column>
  87. <el-table-column
  88. sortable
  89. label="陌生人"
  90. prop="faceStrangerCount"
  91. width="110"
  92. ></el-table-column>
  93. <el-table-column
  94. width="120"
  95. sortable
  96. label="成功率(%)"
  97. prop="faceSuccessPercent"
  98. ></el-table-column>
  99. <el-table-column
  100. sortable
  101. label="违纪类型"
  102. prop="disciplineType"
  103. ></el-table-column>
  104. <el-table-column sortable label="违纪说明">
  105. <template slot-scope="scope">
  106. <span
  107. v-html="disciplineTypeFilter(scope.row.disciplineDetail)"
  108. >
  109. </span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. width="110"
  114. sortable
  115. label="审核结果"
  116. prop="status"
  117. ></el-table-column>
  118. </el-table>
  119. </el-col>
  120. </el-row>
  121. <el-row class="margin-top-10 photorow">
  122. <el-col
  123. :span="6"
  124. :key="item.id"
  125. v-for="item in capturesList"
  126. class="photocol"
  127. >
  128. <div class="photo-nopass" v-show="item.pass">通过</div>
  129. <div class="photo-nopass" v-show="!item.pass">不通过</div>
  130. <img class="photo" :src="item.fileUrl" alt width="200" />
  131. <div class="photo-stranger" v-show="item.stranger">陌生人</div>
  132. <div
  133. class="photo-facelivenessPass"
  134. v-show="!item.isFacelivenessPass"
  135. >
  136. <i class="el-icon-warning"></i>
  137. </div>
  138. </el-col>
  139. </el-row>
  140. </el-col>
  141. </el-row>
  142. <el-dialog title="审核" :visible.sync="dialogFormVisible">
  143. <auditVue :auditForm="auditForm">
  144. <div class="dialog-footer">
  145. <el-button @click="dialogFormVisible = false">取 消</el-button>
  146. <el-button type="primary" @click="doAuditNoPass">确 定</el-button>
  147. </div>
  148. </auditVue>
  149. </el-dialog>
  150. </el-main>
  151. </el-container>
  152. </template>
  153. <script>
  154. import { mapState } from "vuex";
  155. import auditVue from "../component/audit.vue";
  156. import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
  157. export default {
  158. components: { auditVue, LinkTitlesCustom },
  159. data() {
  160. return {
  161. examRecordDataId: "",
  162. examAuditData: [],
  163. examRecordData: [],
  164. capturesList: [],
  165. studentBasePhotoPath: "",
  166. showAudit: false,
  167. dialogFormVisible: false,
  168. auditForm: {
  169. examRecordDataId: null,
  170. disciplineType: "",
  171. disciplineDetail: "",
  172. isPass: null
  173. },
  174. currentPaths: ["抓拍详情"]
  175. };
  176. },
  177. computed: {
  178. ...mapState({ user: state => state.user })
  179. },
  180. methods: {
  181. getExamAuditData() {
  182. var param = new URLSearchParams({
  183. examRecordDataId: this.examRecordDataId
  184. });
  185. this.$http
  186. .post("/api/ecs_oe_admin/exam/capture/audit/detail", param)
  187. .then(response => {
  188. if (response.data) {
  189. this.showAudit = response.data.isWarn && !response.data.isAudit;
  190. this.examAuditData.push(response.data);
  191. var studentId = response.data.studentId;
  192. this.getStudentInfo(studentId);
  193. }
  194. });
  195. },
  196. listExamCapture() {
  197. var param = new URLSearchParams({
  198. examRecordDataId: this.examRecordDataId
  199. });
  200. this.$http
  201. .post("/api/ecs_oe_admin/exam/capture/list", param)
  202. .then(response => {
  203. this.capturesList = response.data;
  204. });
  205. },
  206. getStudentInfo(studentId) {
  207. this.$http
  208. .get("/api/ecs_core/student/getStudentInfo?studentId=" + studentId)
  209. .then(response => {
  210. if (response.data.photoPath) {
  211. this.studentBasePhotoPath = response.data.photoPath;
  212. }
  213. });
  214. },
  215. /**
  216. * 审核通过
  217. */
  218. auditPass() {
  219. var auditParams = {
  220. examRecordDataId: this.examRecordDataId,
  221. isPass: true
  222. };
  223. var param = new URLSearchParams(auditParams);
  224. this.$http
  225. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  226. .then(() => {
  227. this.$notify({
  228. title: "成功",
  229. message: "操作成功",
  230. type: "success"
  231. });
  232. this.back();
  233. });
  234. },
  235. openAuditDialog() {
  236. this.dialogFormVisible = true;
  237. this.auditForm = {
  238. examRecordDataId: this.examRecordDataId,
  239. disciplineType: "",
  240. disciplineDetail: "",
  241. isPass: false
  242. };
  243. },
  244. doAuditNoPass() {
  245. var param = new URLSearchParams(this.auditForm);
  246. this.$http
  247. .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
  248. .then(() => {
  249. this.$notify({
  250. title: "成功",
  251. message: "操作成功",
  252. type: "success"
  253. });
  254. this.back();
  255. });
  256. },
  257. back() {
  258. this.$router.back();
  259. },
  260. disciplineTypeFilter: function(value) {
  261. if (value && value.indexOf("&&") > -1) {
  262. var arr = value.split("&&");
  263. var detail = "";
  264. for (var i = 0; i < arr.length; i++) {
  265. detail += arr[i] + "<br>";
  266. }
  267. return detail;
  268. } else {
  269. return value;
  270. }
  271. }
  272. },
  273. created() {
  274. this.examRecordDataId = this.$route.params.examRecordDataId;
  275. var fromPage = this.$route.params.from;
  276. var currentPathJson = {
  277. illegalityNameList: ["违纪名单", "抓拍详情"],
  278. awaitingAudit: ["监考待审", "抓拍详情"],
  279. alreadyAudited: ["监考已审", "抓拍详情"],
  280. examDetail: ["考试明细", "抓拍详情"]
  281. };
  282. this.currentPaths = currentPathJson[fromPage];
  283. this.getExamAuditData();
  284. this.listExamCapture();
  285. }
  286. };
  287. </script>
  288. <style scoped>
  289. .margin-top-10 {
  290. margin-top: 10px;
  291. }
  292. .capture-title {
  293. font-size: 20px;
  294. font-weight: bold;
  295. }
  296. .photorow {
  297. border: 1px solid #ebeef5;
  298. text-align: center;
  299. }
  300. .photocol {
  301. position: relative;
  302. margin: 20px 10px 0 10px;
  303. }
  304. .photo {
  305. display: block;
  306. width: 208px;
  307. height: 159px;
  308. }
  309. .photo-nopass {
  310. position: absolute;
  311. top: 2px;
  312. width: 208px;
  313. text-align: center;
  314. color: white;
  315. font-size: 12px;
  316. background-color: rgba(10, 10, 10, 0.4);
  317. }
  318. .photo-stranger {
  319. position: absolute;
  320. top: 140px;
  321. width: 208px;
  322. text-align: center;
  323. color: red;
  324. font-size: 12px;
  325. background-color: rgba(10, 10, 10, 0.4);
  326. }
  327. .photo-facelivenessPass {
  328. position: absolute;
  329. top: 160px;
  330. width: 208px;
  331. font-size: 14px;
  332. text-align: center;
  333. color: red;
  334. }
  335. </style>