|
@@ -0,0 +1,173 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-header> <div class="header-title">缺考登记</div> </el-header>
|
|
|
+ <el-main>
|
|
|
+ <commonFormVue :form="form"> </commonFormVue>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-button @click="search" size="medium" type="primary"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-show="!exportLoading"
|
|
|
+ @click="exportData"
|
|
|
+ type="primary"
|
|
|
+ size="medium"
|
|
|
+ plain
|
|
|
+ >批量导出</el-button
|
|
|
+ >
|
|
|
+ <el-button :loading="true" v-show="exportLoading"
|
|
|
+ >导出数据中...</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ v-loading="tableLoading"
|
|
|
+ element-loading-text="数据加载中"
|
|
|
+ height="300px"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号"> </el-table-column>
|
|
|
+ <el-table-column sortable label="课程" prop="courseName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="课程层次" prop="courseLevel">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="学习中心" prop="orgName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="考点" prop="examSiteName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="姓名" prop="studentName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="身份证号" prop="identityNumber">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="学号" prop="studentCode">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="block">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page.sync="currentPage1"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { courseLevels } from "../constants/constants";
|
|
|
+import { mapState } from "vuex";
|
|
|
+import commonFormVue from "../component/commonForm.vue";
|
|
|
+export default {
|
|
|
+ components: { commonFormVue },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ tableLoading: false,
|
|
|
+ exportLoading: false,
|
|
|
+ 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: "",
|
|
|
+ auditStatus: null
|
|
|
+ },
|
|
|
+ currentPage1: 1,
|
|
|
+ tableData: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({ user: state => state.user })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ search() {
|
|
|
+ if (!this.form.examId) {
|
|
|
+ this.$notify({
|
|
|
+ title: "警告",
|
|
|
+ message: "请选择考试批次",
|
|
|
+ type: "warning",
|
|
|
+ duration: 1000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.tableLoading = true;
|
|
|
+ this.$http
|
|
|
+ .post("/api/ecs_oe_admin/exam/student/unfinished/list", this.form)
|
|
|
+ .then(response => {
|
|
|
+ if (response.data) {
|
|
|
+ this.tableData = response.data.content;
|
|
|
+ this.total = response.data.totalElements;
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ }
|
|
|
+ this.tableLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ exportData() {
|
|
|
+ if (!this.form.examId) {
|
|
|
+ this.$notify({
|
|
|
+ title: "警告",
|
|
|
+ message: "请选择考试批次",
|
|
|
+ type: "warning",
|
|
|
+ duration: 1000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.exportLoading = true;
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_oe_admin/exam/student/unfinished/list/export", {
|
|
|
+ params: {
|
|
|
+ query: this.form
|
|
|
+ },
|
|
|
+ responseType: "arraybuffer"
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data) {
|
|
|
+ var blob = new Blob([response.data], {
|
|
|
+ type:
|
|
|
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
|
+ });
|
|
|
+ var url = URL.createObjectURL(blob);
|
|
|
+ var a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "缺考登记.xlsx";
|
|
|
+ a.target = "_blank";
|
|
|
+ a.click();
|
|
|
+ URL.revokeObjectURL(url);
|
|
|
+ }
|
|
|
+ this.exportLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`);
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {}
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style scope>
|
|
|
+.header-title {
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+</style>
|