illegalityNameList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <el-container>
  3. <el-main class="el-main-padding">
  4. <commonFormVue :form="form" :get-exam-condition="getExamCondition">
  5. <el-col :span="6">
  6. <el-form-item label="违纪类型">
  7. <el-select
  8. v-model="form.disciplineType"
  9. filterable
  10. remote
  11. :remote-method="getDisciplineTypeList"
  12. clearable
  13. class="form_search_width"
  14. placeholder="全部"
  15. size="small"
  16. @clear="getDisciplineTypeList"
  17. >
  18. <el-option
  19. v-for="item in disciplineTypeList"
  20. :key="item.code"
  21. :label="item.name"
  22. :value="item.code"
  23. ></el-option>
  24. </el-select>
  25. </el-form-item>
  26. </el-col>
  27. <!-- <el-col :span="6">
  28. <el-form-item label="Ip">
  29. <el-input
  30. v-model="form.ip"
  31. class="form_search_width"
  32. size="small"
  33. placeholder="Ip"
  34. ></el-input>
  35. </el-form-item>
  36. </el-col>-->
  37. </commonFormVue>
  38. <el-row>
  39. <el-col :span="24">
  40. <el-button
  41. size="small"
  42. icon="el-icon-search"
  43. type="primary"
  44. @click="search('clickSelectBtn')"
  45. >查询</el-button
  46. >
  47. <el-button
  48. size="small"
  49. icon="el-icon-refresh"
  50. style="margin-right: 10px"
  51. @click="resetForm"
  52. >重置</el-button
  53. >
  54. </el-col>
  55. </el-row>
  56. <el-row>
  57. <el-col v-show="currentPagePrivileges.BREACH_THE_PRINCIPLE_EXPORT">
  58. <div class="block-seperator"></div>
  59. <span>操作:</span>
  60. <commonExportVue
  61. :form="form"
  62. :export-url="exportUrl"
  63. :export-file-name="exportFileName"
  64. ></commonExportVue>
  65. </el-col>
  66. </el-row>
  67. <el-row class="margin-top-10">
  68. <el-col :span="24">
  69. <el-table
  70. ref="multipleTable"
  71. v-loading="tableLoading"
  72. element-loading-text="数据加载中"
  73. :data="tableData"
  74. border
  75. @selection-change="handleSelectionChange"
  76. >
  77. <el-table-column width="80" label="考试ID">
  78. <template slot-scope="scope">
  79. <el-button
  80. v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
  81. type="text"
  82. @click="gotoCaptureDetail(scope.row.examRecordDataId)"
  83. >{{ scope.row.examRecordDataId }}</el-button
  84. >
  85. <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">{{
  86. scope.row.examRecordDataId
  87. }}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. sortable
  92. label="学习中心"
  93. prop="orgName"
  94. width="150"
  95. ></el-table-column>
  96. <el-table-column
  97. width="120"
  98. sortable
  99. label="姓名"
  100. prop="studentName"
  101. ></el-table-column>
  102. <el-table-column
  103. sortable
  104. label="身份证号"
  105. prop="identityNumber"
  106. width="120"
  107. ></el-table-column>
  108. <el-table-column
  109. sortable
  110. label="学号"
  111. prop="studentCode"
  112. width="120"
  113. ></el-table-column>
  114. <el-table-column
  115. sortable
  116. label="课程"
  117. prop="courseName"
  118. width="120"
  119. ></el-table-column>
  120. <el-table-column
  121. sortable
  122. label="客观题总分"
  123. prop="objectiveScore"
  124. width="120"
  125. ></el-table-column>
  126. <el-table-column
  127. sortable
  128. label="课程层次"
  129. prop="courseLevel"
  130. width="120"
  131. ></el-table-column>
  132. <el-table-column
  133. sortable
  134. label="校验次数"
  135. prop="faceTotalCount"
  136. width="120"
  137. ></el-table-column>
  138. <el-table-column
  139. sortable
  140. label="成功次数"
  141. prop="faceSuccessCount"
  142. width="120"
  143. ></el-table-column>
  144. <el-table-column
  145. sortable
  146. label="陌生人记录"
  147. prop="faceStrangerCount"
  148. width="150"
  149. ></el-table-column>
  150. <el-table-column
  151. sortable
  152. label="成功率(%)"
  153. prop="faceSuccessPercent"
  154. width="150"
  155. ></el-table-column>
  156. <el-table-column
  157. sortable
  158. label="违纪类型"
  159. prop="disciplineType"
  160. width="120"
  161. ></el-table-column>
  162. <el-table-column
  163. sortable
  164. label="违纪描述"
  165. prop="disciplineDetail"
  166. width="120"
  167. >
  168. <template slot-scope="scope">
  169. <span
  170. v-html="disciplineTypeFilter(scope.row.disciplineDetail)"
  171. ></span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. sortable
  176. label="Ip"
  177. prop="ip"
  178. width="120"
  179. ></el-table-column>
  180. </el-table>
  181. <div class="block pull-right">
  182. <el-pagination
  183. :current-page.sync="form.pageNo"
  184. :page-sizes="[10, 20, 50, 100, 200, 300]"
  185. :page-size="form.pageSize"
  186. layout="total, sizes, prev, pager, next, jumper"
  187. :total="total"
  188. @size-change="handleSizeChange"
  189. @current-change="handleCurrentChange"
  190. ></el-pagination>
  191. </div>
  192. </el-col>
  193. </el-row>
  194. </el-main>
  195. </el-container>
  196. </template>
  197. <script>
  198. import { mapState } from "vuex";
  199. import commonFormVue from "../component/commonForm.vue";
  200. import commonExportVue from "../component/commonExport.vue";
  201. import pagePrivilege from "../mixin/pagePrivilege.js";
  202. import _ from "lodash";
  203. export default {
  204. components: { commonFormVue, commonExportVue },
  205. mixins: [pagePrivilege],
  206. data() {
  207. return {
  208. disciplineTypeList: [],
  209. total: 0,
  210. tableLoading: false,
  211. exportLoading: false,
  212. form: {
  213. examRecordDataId: null,
  214. hasStranger: null,
  215. courseId: null,
  216. courseLevel: null,
  217. examId: null,
  218. faceSuccessPercentLower: null,
  219. faceSuccessPercentUpper: null,
  220. livenessSuccessPercentLower: null,
  221. livenessSuccessPercentUpper: null,
  222. identityNumber: null,
  223. orgId: null,
  224. orgName: null,
  225. studentCode: null,
  226. studentName: null,
  227. isWarn: null,
  228. pageNo: 1,
  229. pageSize: 10,
  230. ORG_FIND_ALL: false, //查询所有机构
  231. examStageId: null,
  232. ip: null,
  233. },
  234. getExamCondition: {
  235. params: {
  236. name: "",
  237. examTypes: "ONLINE",
  238. propertyKeys: "IS_FACE_ENABLE",
  239. },
  240. filterCondition: "IS_FACE_ENABLE",
  241. },
  242. tableData: [],
  243. exportUrl: "/api/ecs_oe_admin/exam/audit/discipline/list/export",
  244. exportFileName: "违纪名单",
  245. currentPagePrivileges: {
  246. BREACH_THE_PRINCIPLE_EXPORT: false,
  247. SNAPSHOT_DETAILS: false, //详情查看
  248. },
  249. };
  250. },
  251. computed: {
  252. ...mapState({ user: (state) => state.user }),
  253. },
  254. created() {
  255. this.form.rootOrgId = this.user.rootOrgId;
  256. this.backFill();
  257. this.getDisciplineTypeList("");
  258. },
  259. methods: {
  260. getDisciplineTypeList(name) {
  261. if (!name) {
  262. name = "";
  263. }
  264. this.$http
  265. .get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
  266. params: { name },
  267. })
  268. .then((response) => {
  269. if (response.data) {
  270. //排除断电和机器故障
  271. this.disciplineTypeList = response.data.filter(
  272. (v) =>
  273. !(v.rootOrgId == -1 && v.code == "POWER_FAILURE") &&
  274. !(v.rootOrgId == -1 && v.code == "MACHINE_STOPPAGE")
  275. );
  276. }
  277. });
  278. },
  279. resetForm() {
  280. this.form = {
  281. examRecordDataId: null,
  282. hasStranger: null,
  283. courseId: null,
  284. courseLevel: null,
  285. examId: null,
  286. faceSuccessPercentLower: null,
  287. faceSuccessPercentUpper: null,
  288. livenessSuccessPercentLower: null,
  289. livenessSuccessPercentUpper: null,
  290. identityNumber: null,
  291. orgId: this.form.ORG_FIND_ALL ? null : this.form.orgId,
  292. orgName: null,
  293. studentCode: null,
  294. studentName: null,
  295. isWarn: null,
  296. pageNo: 1,
  297. pageSize: 10,
  298. ORG_FIND_ALL: this.form.ORG_FIND_ALL,
  299. examStageId: null,
  300. };
  301. },
  302. search(type) {
  303. if (!this.form.examId) {
  304. this.$notify({
  305. title: "警告",
  306. message: "请选择考试",
  307. type: "warning",
  308. duration: 1000,
  309. });
  310. return false;
  311. }
  312. if (type && type == "clickSelectBtn") {
  313. this.form.pageNo = 1;
  314. }
  315. this.tableLoading = true;
  316. var params = JSON.parse(JSON.stringify(this.form));
  317. if (params.examStageId == "") {
  318. params.examStageId = null;
  319. }
  320. this.$http
  321. .post("/api/ecs_oe_admin/exam/audit/discipline/list", params)
  322. .then((response) => {
  323. if (response.data) {
  324. this.tableData = response.data.content;
  325. this.total = response.data.totalElements;
  326. this.form.pageNo = response.data.number + 1;
  327. } else {
  328. this.tableData = [];
  329. }
  330. this.tableLoading = false;
  331. this.$router.push({
  332. path: "/oe/illegalityNameList?" + new URLSearchParams(params),
  333. });
  334. });
  335. },
  336. selectable(row) {
  337. return row.isWarn;
  338. },
  339. handleSelectionChange(val) {
  340. this.multipleSelection = val;
  341. },
  342. /**
  343. * pagesize改变时触发
  344. */
  345. handleSizeChange(val) {
  346. this.form.pageSize = val;
  347. this.search();
  348. },
  349. /**
  350. * 当前页改变时触发
  351. */
  352. handleCurrentChange() {
  353. this.search();
  354. },
  355. gotoCaptureDetail(examRecordDataId) {
  356. this.$router.push({
  357. path: "/oe/captureDetail/" + examRecordDataId + "/illegalityNameList",
  358. });
  359. },
  360. backFill() {
  361. var formData = this.$route.query;
  362. if (formData && formData.examId) {
  363. for (var attr in formData) {
  364. var value = formData[attr];
  365. if (value && value != "null") {
  366. //是数字 且 长度小于15
  367. if (!isNaN(value) && value.toString().length < 15) {
  368. value = _.toNumber(value);
  369. }
  370. this.form[attr] = value;
  371. }
  372. }
  373. this.search();
  374. }
  375. },
  376. disciplineTypeFilter: function (value) {
  377. if (value && value.indexOf("&&") > -1) {
  378. var arr = value.split("&&");
  379. var detail = "";
  380. for (var i = 0; i < arr.length; i++) {
  381. detail += arr[i] + "<br>";
  382. }
  383. return detail;
  384. } else {
  385. return value;
  386. }
  387. },
  388. },
  389. };
  390. </script>
  391. <style scoped src="../style/common.css"></style>