123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392 |
- <template>
- <el-container>
- <el-main class="el-main-padding">
- <commonFormVue :form="form" :get-exam-condition="getExamCondition">
- <el-col :span="6">
- <el-form-item label="违纪类型">
- <el-select
- v-model="form.disciplineType"
- filterable
- remote
- :remote-method="getDisciplineTypeList"
- clearable
- class="form_search_width"
- placeholder="全部"
- size="small"
- @clear="getDisciplineTypeList"
- >
- <el-option
- v-for="item in disciplineTypeList"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="Ip">
- <el-input
- v-model="form.ip"
- class="form_search_width"
- size="small"
- placeholder="Ip"
- ></el-input>
- </el-form-item>
- </el-col>-->
- </commonFormVue>
- <el-row>
- <el-col :span="24">
- <el-button
- size="small"
- icon="el-icon-search"
- type="primary"
- @click="search('clickSelectBtn')"
- >查询</el-button
- >
- <el-button
- size="small"
- icon="el-icon-refresh"
- style="margin-right: 10px"
- @click="resetForm"
- >重置</el-button
- >
- </el-col>
- </el-row>
- <el-row>
- <el-col v-show="currentPagePrivileges.BREACH_THE_PRINCIPLE_EXPORT">
- <div class="block-seperator"></div>
- <span>操作:</span>
- <commonExportVue
- :form="form"
- :export-url="exportUrl"
- :export-file-name="exportFileName"
- ></commonExportVue>
- </el-col>
- </el-row>
- <el-row class="margin-top-10">
- <el-col :span="24">
- <el-table
- ref="multipleTable"
- v-loading="tableLoading"
- element-loading-text="数据加载中"
- :data="tableData"
- border
- @selection-change="handleSelectionChange"
- >
- <el-table-column width="80" label="考试ID">
- <template slot-scope="scope">
- <el-button
- v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
- type="text"
- @click="gotoCaptureDetail(scope.row.examRecordDataId)"
- >{{ scope.row.examRecordDataId }}</el-button
- >
- <span v-show="!currentPagePrivileges.SNAPSHOT_DETAILS">{{
- scope.row.examRecordDataId
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- sortable
- label="学习中心"
- prop="orgName"
- width="150"
- ></el-table-column>
- <el-table-column
- width="120"
- sortable
- label="姓名"
- prop="studentName"
- ></el-table-column>
- <el-table-column
- sortable
- label="身份证号"
- prop="identityNumber"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="学号"
- prop="studentCode"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="课程"
- prop="courseName"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="客观题总分"
- prop="objectiveScore"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="课程层次"
- prop="courseLevel"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="校验次数"
- prop="faceTotalCount"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="成功次数"
- prop="faceSuccessCount"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="陌生人记录"
- prop="faceStrangerCount"
- width="150"
- ></el-table-column>
- <el-table-column
- sortable
- label="成功率(%)"
- prop="faceSuccessPercent"
- width="150"
- ></el-table-column>
- <el-table-column
- sortable
- label="违纪类型"
- prop="disciplineType"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="违纪描述"
- prop="disciplineDetail"
- width="120"
- >
- <template slot-scope="scope">
- <span
- v-html="disciplineTypeFilter(scope.row.disciplineDetail)"
- ></span>
- </template>
- </el-table-column>
- <el-table-column
- sortable
- label="Ip"
- prop="ip"
- width="120"
- ></el-table-column>
- </el-table>
- <div class="block pull-right">
- <el-pagination
- :current-page.sync="form.pageNo"
- :page-sizes="[10, 20, 50, 100, 200, 300]"
- :page-size="form.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- ></el-pagination>
- </div>
- </el-col>
- </el-row>
- </el-main>
- </el-container>
- </template>
- <script>
- import { mapState } from "vuex";
- import commonFormVue from "../component/commonForm.vue";
- import commonExportVue from "../component/commonExport.vue";
- import pagePrivilege from "../mixin/pagePrivilege.js";
- import _ from "lodash";
- export default {
- components: { commonFormVue, commonExportVue },
- mixins: [pagePrivilege],
- data() {
- return {
- disciplineTypeList: [],
- total: 0,
- tableLoading: false,
- exportLoading: false,
- form: {
- examRecordDataId: null,
- hasStranger: null,
- courseId: null,
- courseLevel: null,
- examId: null,
- faceSuccessPercentLower: null,
- faceSuccessPercentUpper: null,
- livenessSuccessPercentLower: null,
- livenessSuccessPercentUpper: null,
- identityNumber: null,
- orgId: null,
- orgName: null,
- studentCode: null,
- studentName: null,
- isWarn: null,
- pageNo: 1,
- pageSize: 10,
- ORG_FIND_ALL: false, //查询所有机构
- examStageId: null,
- ip: null,
- },
- getExamCondition: {
- params: {
- name: "",
- examTypes: "ONLINE",
- propertyKeys: "IS_FACE_ENABLE",
- },
- filterCondition: "IS_FACE_ENABLE",
- },
- tableData: [],
- exportUrl: "/api/ecs_oe_admin/exam/audit/discipline/list/export",
- exportFileName: "违纪名单",
- currentPagePrivileges: {
- BREACH_THE_PRINCIPLE_EXPORT: false,
- SNAPSHOT_DETAILS: false, //详情查看
- },
- };
- },
- computed: {
- ...mapState({ user: (state) => state.user }),
- },
- created() {
- this.form.rootOrgId = this.user.rootOrgId;
- this.backFill();
- this.getDisciplineTypeList("");
- },
- methods: {
- getDisciplineTypeList(name) {
- if (!name) {
- name = "";
- }
- this.$http
- .get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
- params: { name },
- })
- .then((response) => {
- if (response.data) {
- //排除断电和机器故障
- this.disciplineTypeList = response.data.filter(
- (v) =>
- !(v.rootOrgId == -1 && v.code == "POWER_FAILURE") &&
- !(v.rootOrgId == -1 && v.code == "MACHINE_STOPPAGE")
- );
- }
- });
- },
- resetForm() {
- this.form = {
- examRecordDataId: null,
- hasStranger: null,
- courseId: null,
- courseLevel: null,
- examId: null,
- faceSuccessPercentLower: null,
- faceSuccessPercentUpper: null,
- livenessSuccessPercentLower: null,
- livenessSuccessPercentUpper: null,
- identityNumber: null,
- orgId: this.form.ORG_FIND_ALL ? null : this.form.orgId,
- orgName: null,
- studentCode: null,
- studentName: null,
- isWarn: null,
- pageNo: 1,
- pageSize: 10,
- ORG_FIND_ALL: this.form.ORG_FIND_ALL,
- examStageId: null,
- };
- },
- search(type) {
- if (!this.form.examId) {
- this.$notify({
- title: "警告",
- message: "请选择考试",
- type: "warning",
- duration: 1000,
- });
- return false;
- }
- if (type && type == "clickSelectBtn") {
- this.form.pageNo = 1;
- }
- this.tableLoading = true;
- var params = JSON.parse(JSON.stringify(this.form));
- if (params.examStageId == "") {
- params.examStageId = null;
- }
- this.$http
- .post("/api/ecs_oe_admin/exam/audit/discipline/list", params)
- .then((response) => {
- if (response.data) {
- this.tableData = response.data.content;
- this.total = response.data.totalElements;
- this.form.pageNo = response.data.number + 1;
- } else {
- this.tableData = [];
- }
- this.tableLoading = false;
- this.$router.push({
- path: "/oe/illegalityNameList?" + new URLSearchParams(params),
- });
- });
- },
- selectable(row) {
- return row.isWarn;
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- /**
- * pagesize改变时触发
- */
- handleSizeChange(val) {
- this.form.pageSize = val;
- this.search();
- },
- /**
- * 当前页改变时触发
- */
- handleCurrentChange() {
- this.search();
- },
- gotoCaptureDetail(examRecordDataId) {
- this.$router.push({
- path: "/oe/captureDetail/" + examRecordDataId + "/illegalityNameList",
- });
- },
- backFill() {
- var formData = this.$route.query;
- if (formData && formData.examId) {
- for (var attr in formData) {
- var value = formData[attr];
- if (value && value != "null") {
- //是数字 且 长度小于15
- if (!isNaN(value) && value.toString().length < 15) {
- value = _.toNumber(value);
- }
- this.form[attr] = value;
- }
- }
- this.search();
- }
- },
- disciplineTypeFilter: function (value) {
- if (value && value.indexOf("&&") > -1) {
- var arr = value.split("&&");
- var detail = "";
- for (var i = 0; i < arr.length; i++) {
- detail += arr[i] + "<br>";
- }
- return detail;
- } else {
- return value;
- }
- },
- },
- };
- </script>
- <style scoped src="../style/common.css"></style>
|