|
@@ -77,6 +77,13 @@
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('button', 'ImportTeacher')"
|
|
|
|
+ type="success"
|
|
|
|
+ icon="el-icon-upload2"
|
|
|
|
+ @click="toImportTeacher"
|
|
|
|
+ >导入任课老师</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
v-if="checkPrivilege('button', 'import')"
|
|
v-if="checkPrivilege('button', 'import')"
|
|
type="success"
|
|
type="success"
|
|
@@ -193,13 +200,25 @@
|
|
label="考场(考试教室)"
|
|
label="考场(考试教室)"
|
|
width="140"
|
|
width="140"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
|
+ <el-table-column prop="status" label="状态" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.row.status | studentStatusFilter }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
class-name="action-column"
|
|
class-name="action-column"
|
|
label="操作"
|
|
label="操作"
|
|
- width="100"
|
|
|
|
|
|
+ width="140"
|
|
fixed="right"
|
|
fixed="right"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('link', 'edit')"
|
|
|
|
+ class="btn-primary"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toSet(scope.row)"
|
|
|
|
+ >设置</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
v-if="checkPrivilege('link', 'edit')"
|
|
v-if="checkPrivilege('link', 'edit')"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
@@ -237,6 +256,12 @@
|
|
@modified="getList"
|
|
@modified="getList"
|
|
ref="ModifyExamStudent"
|
|
ref="ModifyExamStudent"
|
|
></modify-exam-student>
|
|
></modify-exam-student>
|
|
|
|
+ <!-- ModifyExamStudentStatus -->
|
|
|
|
+ <modify-exam-student-status
|
|
|
|
+ ref="ModifyExamStudentStatus"
|
|
|
|
+ :instance="curRow"
|
|
|
|
+ @modified="getList"
|
|
|
|
+ ></modify-exam-student-status>
|
|
<!-- ImportFile -->
|
|
<!-- ImportFile -->
|
|
<import-file
|
|
<import-file
|
|
v-if="checkPrivilege('button', 'import')"
|
|
v-if="checkPrivilege('button', 'import')"
|
|
@@ -248,11 +273,27 @@
|
|
semesterId: filterSe.semesterId,
|
|
semesterId: filterSe.semesterId,
|
|
}"
|
|
}"
|
|
:format="['xls', 'xlsx']"
|
|
:format="['xls', 'xlsx']"
|
|
- :download-handle="downloadHandle"
|
|
|
|
|
|
+ :download-handle="() => downloadHandle(dfilename)"
|
|
:download-filename="dfilename"
|
|
:download-filename="dfilename"
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
@upload-success="uploadSuccess"
|
|
@upload-success="uploadSuccess"
|
|
></import-file>
|
|
></import-file>
|
|
|
|
+ <!-- ImportFileTeacher -->
|
|
|
|
+ <import-file
|
|
|
|
+ v-if="checkPrivilege('button', 'ImportTeacher')"
|
|
|
|
+ ref="ImportFileTeacher"
|
|
|
|
+ title="导入任课老师"
|
|
|
|
+ :upload-url="uploadTeacherUrl"
|
|
|
|
+ :upload-data="{
|
|
|
|
+ examId: filterSe.examId,
|
|
|
|
+ semesterId: filterSe.semesterId,
|
|
|
|
+ }"
|
|
|
|
+ :format="['xls', 'xlsx']"
|
|
|
|
+ :download-handle="() => downloadHandle(teacherDfilename)"
|
|
|
|
+ :download-filename="teacherDfilename"
|
|
|
|
+ :auto-upload="false"
|
|
|
|
+ @upload-success="uploadSuccess"
|
|
|
|
+ ></import-file>
|
|
<!-- data-task-dialog -->
|
|
<!-- data-task-dialog -->
|
|
<data-task-dialog
|
|
<data-task-dialog
|
|
v-if="checkPrivilege('button', 'import')"
|
|
v-if="checkPrivilege('button', 'import')"
|
|
@@ -270,6 +311,7 @@ import {
|
|
} from "../api";
|
|
} from "../api";
|
|
import { businessTemplateDownload } from "@/modules/print/api";
|
|
import { businessTemplateDownload } from "@/modules/print/api";
|
|
import ModifyExamStudent from "../components/ModifyExamStudent.vue";
|
|
import ModifyExamStudent from "../components/ModifyExamStudent.vue";
|
|
|
|
+import ModifyExamStudentStatus from "../components/ModifyExamStudentStatus.vue";
|
|
import ImportFile from "../../../components/ImportFile.vue";
|
|
import ImportFile from "../../../components/ImportFile.vue";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import templateDownload from "@/mixins/templateDownload";
|
|
import templateDownload from "@/mixins/templateDownload";
|
|
@@ -277,7 +319,7 @@ import { getExamDateTime } from "@/plugins/utils";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "exam-student-manage",
|
|
name: "exam-student-manage",
|
|
- components: { ModifyExamStudent, ImportFile },
|
|
|
|
|
|
+ components: { ModifyExamStudent, ModifyExamStudentStatus, ImportFile },
|
|
mixins: [templateDownload],
|
|
mixins: [templateDownload],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -304,6 +346,9 @@ export default {
|
|
// import
|
|
// import
|
|
uploadUrl: "/api/admin/basic/exam_student/import",
|
|
uploadUrl: "/api/admin/basic/exam_student/import",
|
|
dfilename: "考生导入模板.xlsx",
|
|
dfilename: "考生导入模板.xlsx",
|
|
|
|
+ // import teacher
|
|
|
|
+ uploadTeacherUrl: "/api/admin/basic/exam_student/import_teacher",
|
|
|
|
+ teacherDfilename: "任课老师导入模板.xlsx",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -338,13 +383,13 @@ export default {
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val.map((item) => item.id);
|
|
this.multipleSelection = val.map((item) => item.id);
|
|
},
|
|
},
|
|
- async downloadHandle() {
|
|
|
|
|
|
+ async downloadHandle(filename) {
|
|
if (this.download) return;
|
|
if (this.download) return;
|
|
|
|
|
|
this.download = true;
|
|
this.download = true;
|
|
const res = await downloadByApi(() => {
|
|
const res = await downloadByApi(() => {
|
|
return businessTemplateDownload();
|
|
return businessTemplateDownload();
|
|
- }, `考生导入模板.xlsx`).catch((e) => {
|
|
|
|
|
|
+ }, filename).catch((e) => {
|
|
this.$message.error(e || "下载失败,请重新尝试!");
|
|
this.$message.error(e || "下载失败,请重新尝试!");
|
|
});
|
|
});
|
|
this.download = false;
|
|
this.download = false;
|
|
@@ -360,6 +405,10 @@ export default {
|
|
this.curRow = row;
|
|
this.curRow = row;
|
|
this.$refs.ModifyExamStudent.open();
|
|
this.$refs.ModifyExamStudent.open();
|
|
},
|
|
},
|
|
|
|
+ toSet(row) {
|
|
|
|
+ this.curRow = row;
|
|
|
|
+ this.$refs.ModifyExamStudentStatus.open();
|
|
|
|
+ },
|
|
async toBatchDelete() {
|
|
async toBatchDelete() {
|
|
if (!this.multipleSelection.length) {
|
|
if (!this.multipleSelection.length) {
|
|
this.$message.error("请选择要删除的考生");
|
|
this.$message.error("请选择要删除的考生");
|
|
@@ -408,6 +457,9 @@ export default {
|
|
toImport() {
|
|
toImport() {
|
|
this.$refs.ImportFile.open();
|
|
this.$refs.ImportFile.open();
|
|
},
|
|
},
|
|
|
|
+ toImportTeacher() {
|
|
|
|
+ this.$refs.ImportFileTeacher.open();
|
|
|
|
+ },
|
|
toDataTask() {
|
|
toDataTask() {
|
|
this.$refs.DataTaskDialog.open();
|
|
this.$refs.DataTaskDialog.open();
|
|
},
|
|
},
|