123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662 |
- <template>
- <el-container>
- <el-main class="el-main-padding">
- <commonFormVue :form="form" :getExamCondition="getExamCondition">
- <el-row v-show="showAllCondition">
- <el-col :span="6">
- <el-form-item label="采集人">
- <el-input
- class="form_search_width"
- size="small"
- v-model="form.infoCollector"
- placeholder="采集人"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="开考时间">
- <el-date-picker
- class="input"
- v-model="startExamDatetimeRange"
- type="datetimerange"
- start-placeholder="开始日期"
- range-separator="至"
- end-placeholder="结束日期"
- value-format="yyyy/MM/dd HH:mm:ss"
- :clearable="false"
- size="small"
- @change="changeStartExamDatetimeRange"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </commonFormVue>
- <el-col :span="24">
- <el-button
- @click="search('clickSelectBtn')"
- size="small"
- type="primary"
- icon="el-icon-search"
- >查询</el-button
- >
- <el-button
- size="small"
- type="primary"
- icon="el-icon-more"
- v-if="!showAllCondition"
- @click="showMoreCondition"
- >高级查询</el-button
- >
- <el-button
- size="small"
- type="primary"
- v-if="showAllCondition"
- @click="showSimpleCondition"
- >简单查询</el-button
- >
- <el-button
- size="small"
- icon="el-icon-refresh"
- @click="resetForm"
- class="margin-bottom-10"
- >重置</el-button
- >
- </el-col>
- <el-row>
- <el-col v-show="currentPagePrivileges.EXAM_DETAIL_EXPORT">
- <div class="block-seperator"></div>
- <span>操作:</span>
- <commonExportVue
- :form="form"
- :exportUrl="exportUrl"
- :exportFileName="exportFileName"
- ></commonExportVue>
- </el-col>
- </el-row>
- <el-row class="margin-top-10">
- <el-col :span="24">
- <el-table
- v-loading="tableLoading"
- element-loading-text="数据加载中"
- ref="multipleTable"
- @selection-change="handleSelectionChange"
- :data="tableData"
- border
- >
- <el-table-column label="考试ID" width="120">
- <template slot-scope="scope">
- <el-button
- v-show="
- scope.row.examType == 'ONLINE' &&
- currentPagePrivileges.SNAPSHOT_DETAILS
- "
- @click="gotoCaptureDetail(scope.row.dataId)"
- type="text"
- >{{ scope.row.dataId }}</el-button
- >
- <span
- v-show="
- scope.row.examType != 'ONLINE' ||
- !currentPagePrivileges.SNAPSHOT_DETAILS
- "
- >{{ scope.row.dataId }}</span
- >
- </template>
- </el-table-column>
- <el-table-column
- sortable
- label="学习中心"
- prop="orgName"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="姓名"
- prop="studentName"
- width="120"
- ></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="courseNameAndCode"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="课程层次"
- prop="courseLevel"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="年级"
- prop="grade"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="学生电话"
- prop="phone"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="采集人"
- prop="infoCollector"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="考试次数"
- prop="examOrder"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="开考时间"
- prop="paperStartTime"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="交卷时间"
- prop="paperSubmitTime"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- :sort-method="sortByExamTime"
- label="持续时间"
- prop="examTime"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="校验成功率(%)"
- prop="faceSuccessPercent"
- width="150"
- ></el-table-column>
- <el-table-column
- sortable
- label="续考次数"
- prop="continuedCount"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- :sort-method="sortByPaperTotalScore"
- label="卷面总分"
- prop="paperTotalScore"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="是否违纪"
- prop="isIllegality"
- width="120"
- ></el-table-column>
- <el-table-column
- sortable
- label="是否提交"
- prop="isSubmit"
- width="120"
- ></el-table-column>
- <el-table-column fixed="right" label="详情" width="100">
- <template slot-scope="scope">
- <el-row
- class="operateRow"
- v-if="
- scope.row.examType == 'ONLINE' &&
- currentPagePrivileges.EXAM_QUERY_GETPAPER
- "
- >
- <el-col :span="24">
- <el-button
- size="mini"
- type="primary"
- icon="el-icon-view"
- plain
- @click="
- examPaperDetail(scope.row.courseId, scope.row.dataId)
- "
- >调 卷</el-button
- >
- </el-col>
- </el-row>
- <el-row
- class="operateRow"
- v-if="
- scope.row.examType == 'ONLINE' &&
- currentPagePrivileges.REDO_AUDIT
- "
- >
- <el-col :span="24">
- <el-dropdown>
- <el-button
- size="mini"
- icon="el-icon-arrow-down"
- type="primary"
- plain
- >重审</el-button
- >
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item>
- <el-button
- size="mini"
- type="success"
- @click="redoAudit(scope.row.dataId, 'pass')"
- icon="el-icon-success"
- >通 过</el-button
- >
- </el-dropdown-item>
- <el-dropdown-item>
- <el-button
- size="mini"
- type="danger"
- @click="redoAudit(scope.row.dataId, 'nopass')"
- icon="el-icon-error"
- >不通过</el-button
- >
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </el-col>
- </el-row>
- <el-row
- class="operateRow"
- v-if="
- scope.row.examType == 'OFFLINE' &&
- scope.row.offlineFileUrl &&
- currentPagePrivileges.EXAM_QUERY_GETPAPER
- "
- >
- <el-col :span="24">
- <el-button
- size="mini"
- type="primary"
- icon="el-icon-view"
- plain
- @click="downloadOfflineFile(scope.row.offlineFileUrl)"
- >调卷</el-button
- >
- </el-col>
- </el-row>
- </template>
- </el-table-column>
- </el-table>
- <div class="block pull-right">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page.sync="form.pageNo"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="form.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
- </el-col>
- </el-row>
- <el-dialog
- title="审核"
- :visible.sync="dialogAuditFormVisible"
- @closed="auditDialogClosed"
- >
- <el-form :model="auditForm" ref="redoAuditForm">
- <el-form-item
- label="违纪类型"
- prop="disciplineType"
- :rules="[
- { required: true, message: '请选择违纪类型', trigger: 'change' }
- ]"
- >
- <el-select v-model="auditForm.disciplineType" placeholder="请选择">
- <el-option
- v-for="item in disciplineTypeList"
- :key="item.name"
- :label="item.desc"
- :value="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="详情描述" style="margin-top:15px;">
- <el-input
- v-model="auditForm.disciplineDetail"
- type="textarea"
- :autosize="{ minRows: 6, maxRows: 10 }"
- placeholder="请输入内容"
- ></el-input>
- </el-form-item>
- <div class="dialog-footer margin-top-10 text-center">
- <el-button type="primary" @click="doRedoAuditNoPass"
- >确 定</el-button
- >
- <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
- </div>
- </el-form>
- </el-dialog>
- </el-main>
- </el-container>
- </template>
- <script>
- import { mapState } from "vuex";
- import commonFormVue from "../component/commonForm.vue";
- import commonExportVue from "../component/commonExport.vue";
- import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
- import pagePrivilege from "../mixin/pagePrivilege.js";
- import _ from "lodash";
- export default {
- components: { commonFormVue, commonExportVue },
- mixins: [pagePrivilege],
- data() {
- return {
- disciplineTypeList: DISCIPLINE_TYPE_LIST,
- total: 0,
- tableLoading: false,
- showAllCondition: false,
- startExamDatetimeRange: [],
- form: {
- examRecordDataId: null,
- hasStranger: null,
- courseId: null,
- courseLevel: null,
- examId: null,
- examRecordId: null,
- faceSuccessPercentLower: null,
- faceSuccessPercentUpper: null,
- identityNumber: null,
- orgId: null,
- studentCode: null,
- studentName: null,
- isWarn: null,
- pageNo: 1,
- pageSize: 10,
- rootOrgId: null,
- startTime: null,
- endTime: null,
- infoCollector: null
- },
- getExamCondition: {
- params: {
- name: "",
- examTypes: "ONLINE#OFFLINE"
- },
- filterCondition: ""
- },
- tableData: [],
- exportUrl: "/api/ecs_oe_admin/exam/record/detail/list/export",
- exportFileName: "考试明细",
- currentPagePrivileges: {
- EXAM_DETAIL_EXPORT: false, //导出
- SNAPSHOT_DETAILS: false, //详情查看
- EXAM_QUERY_GETPAPER: false, //调卷
- REDO_AUDIT: false //重新审核
- },
- dialogAuditFormVisible: false,
- auditForm: {
- examRecordDataId: null,
- disciplineType: "",
- disciplineDetail: "",
- isPass: null
- }
- };
- },
- computed: {
- ...mapState({ user: state => state.user })
- },
- methods: {
- resetForm() {
- this.form = {
- examRecordDataId: null,
- hasStranger: null,
- courseId: null,
- courseLevel: null,
- examId: null,
- examRecordId: null,
- faceSuccessPercentLower: null,
- faceSuccessPercentUpper: null,
- identityNumber: null,
- orgId: null,
- studentCode: null,
- studentName: null,
- isWarn: null,
- pageNo: 1,
- pageSize: 10,
- rootOrgId: null,
- startTime: null,
- endTime: null,
- infoCollector: null
- };
- this.startExamDatetimeRange = [];
- },
- showMoreCondition() {
- this.showAllCondition = true;
- },
- showSimpleCondition() {
- this.$notify({
- title: "提示",
- message: "高级查询条件值已重置",
- type: "info",
- duration: 2000
- });
- this.resetForm();
- this.showAllCondition = false;
- },
- changeStartExamDatetimeRange(e) {
- if (e && e.length > 0) {
- this.form.startTime = e[0];
- this.form.endTime = e[1];
- } else {
- this.form.startTime = "";
- this.form.endTime = "";
- }
- },
- search(type) {
- if (!this.form.examId) {
- this.$notify({
- title: "警告",
- message: "请选择考试批次",
- type: "warning",
- duration: 2000
- });
- return false;
- }
- if (type && type == "clickSelectBtn") {
- this.form.pageNo = 1;
- }
- this.tableLoading = true;
- var params = JSON.parse(JSON.stringify(this.form));
- this.$http
- .post("/api/ecs_oe_admin/exam/record/detail/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/examDetail?" + new URLSearchParams(params)
- });
- });
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- /**
- * pagesize改变时触发
- */
- handleSizeChange(val) {
- this.form.pageSize = val;
- this.search();
- },
- /**
- * 当前页改变时触发
- */
- handleCurrentChange() {
- this.search();
- },
- examPaperDetail(courseId, examRecordDataId) {
- window.open(
- "/admin/oe/examPaperDetail/" + courseId + "/" + examRecordDataId
- );
- },
- gotoCaptureDetail(examRecordDataId) {
- this.$router.push({
- path: "/oe/captureDetail/" + examRecordDataId + "/examDetail"
- });
- },
- downloadOfflineFile(url) {
- window.open(url);
- },
- redoAudit(examRecordDataId, isPass) {
- if (isPass != "pass") {
- this.dialogAuditFormVisible = true;
- this.auditForm.examRecordDataId = examRecordDataId;
- } else {
- //审核通过
- var redoAuditInfo = {
- examRecordDataIds: [examRecordDataId],
- isPass: true,
- disciplineType: "",
- disciplineDetail: ""
- };
- this.$http
- .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
- .then(() => {
- this.$notify({
- title: "成功",
- message: "操作成功",
- type: "success"
- });
- this.search();
- })
- .catch(res => {
- var errorMsg = "操作失败";
- if (res.response && res.response.data) {
- errorMsg = res.response.data.desc;
- }
- this.$notify({
- title: "提示",
- message: errorMsg,
- type: "error"
- });
- });
- }
- },
- doRedoAuditNoPass() {
- this.$refs["redoAuditForm"].validate(valid => {
- if (valid) {
- var redoAuditInfo = {
- examRecordDataIds: [this.auditForm.examRecordDataId],
- isPass: false,
- disciplineType: this.auditForm.disciplineType,
- disciplineDetail: this.auditForm.disciplineDetail
- };
- this.$http
- .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
- .then(() => {
- this.$notify({
- title: "成功",
- message: "操作成功",
- type: "success"
- });
- this.doRedoAuditNoPassPostProcess();
- this.search();
- })
- .catch(res => {
- var errorMsg = "操作失败";
- if (res.response && res.response.data) {
- errorMsg = res.response.data.desc;
- }
- this.doRedoAuditNoPassPostProcess();
- this.$notify({
- title: "提示",
- message: errorMsg,
- type: "error"
- });
- });
- } else {
- return false;
- }
- });
- },
- doRedoAuditNoPassPostProcess() {
- this.auditForm = {
- examRecordDataId: null,
- disciplineType: "",
- disciplineDetail: "",
- isPass: null
- };
- this.$refs["redoAuditForm"].resetFields();
- this.dialogAuditFormVisible = false;
- },
- auditDialogClosed() {
- this.$refs["redoAuditForm"].resetFields();
- },
- 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();
- }
- },
- sortByPaperTotalScore(obj1, obj2) {
- let p1 = Number(obj1.paperTotalScore);
- let p2 = Number(obj2.paperTotalScore);
- return p1 - p2;
- },
- sortByExamTime(obj1, obj2) {
- debugger;
- let startTime1 = new Date(obj1.paperStartTime);
- let endTime1 = new Date(obj1.paperSubmitTime);
- let startTime2 = new Date(obj2.paperStartTime);
- let endTime2 = new Date(obj2.paperSubmitTime);
- let p1 = Number(endTime1 - startTime1);
- let p2 = Number(endTime2 - startTime2);
- if (isNaN(p1)) {
- p1 = 0;
- }
- if (isNaN(p2)) {
- p2 = 0;
- }
- return p1 - p2;
- }
- },
- created() {
- this.form.rootOrgId = this.user.rootOrgId;
- this.backFill();
- }
- };
- </script>
- <style scope>
- .el-date-editor.el-input,
- .el-date-editor.el-input__inner {
- width: auto !important;
- }
- </style>
- <style scoped src="../style/common.css"></style>
|