|
@@ -35,10 +35,17 @@
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="班级:">
|
|
|
|
|
|
+ <el-form-item label="教学班:">
|
|
<el-input
|
|
<el-input
|
|
- v-model.trim="filter.teachClazz"
|
|
|
|
- placeholder="班级"
|
|
|
|
|
|
+ v-model.trim="filter.teachClassName"
|
|
|
|
+ placeholder="教学班"
|
|
|
|
+ clearable
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="行政班:">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="filter.className"
|
|
|
|
+ placeholder="行政班"
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -174,7 +181,7 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="paperNumber"
|
|
prop="paperNumber"
|
|
label="试卷编号"
|
|
label="试卷编号"
|
|
- width="120"
|
|
|
|
|
|
+ width="160"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="paperType"
|
|
prop="paperType"
|
|
@@ -342,6 +349,7 @@ import {
|
|
examStudentListPage,
|
|
examStudentListPage,
|
|
deleteExamStudent,
|
|
deleteExamStudent,
|
|
exportExamStudent,
|
|
exportExamStudent,
|
|
|
|
+ getExamStudentStatus,
|
|
} 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";
|
|
@@ -366,7 +374,8 @@ export default {
|
|
teacher: "",
|
|
teacher: "",
|
|
college: "",
|
|
college: "",
|
|
major: "",
|
|
major: "",
|
|
- teachClazz: "",
|
|
|
|
|
|
+ teachClassName: "",
|
|
|
|
+ className: "",
|
|
examStudentInfo: "",
|
|
examStudentInfo: "",
|
|
},
|
|
},
|
|
current: 1,
|
|
current: 1,
|
|
@@ -461,13 +470,29 @@ export default {
|
|
this.$message.error("请选择要删除的考生");
|
|
this.$message.error("请选择要删除的考生");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const confirm = await this.$confirm(
|
|
|
|
- `确定要删除当前选择的所有考生吗?`,
|
|
|
|
- "提示",
|
|
|
|
- {
|
|
|
|
- type: "warning",
|
|
|
|
- }
|
|
|
|
- ).catch(() => {});
|
|
|
|
|
|
+
|
|
|
|
+ const students = await getExamStudentStatus(this.multipleSelection);
|
|
|
|
+ const errorStudents = students.filter(
|
|
|
|
+ (student) => student.scanStatus && student.markTaskStatus
|
|
|
|
+ );
|
|
|
|
+ if (errorStudents.length) {
|
|
|
|
+ const names = errorStudents.map((item) => item.studentName).join();
|
|
|
|
+ this.$message.error(`考生【${names}】已经生成阅卷任务,禁止删除!`);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const warningStudents = students.filter((student) => student.scanStatus);
|
|
|
|
+ let pretips = "";
|
|
|
|
+ if (warningStudents.length) {
|
|
|
|
+ const names = warningStudents.map((item) => item.studentName).join();
|
|
|
|
+ pretips = `考生【${names}】已扫描图片,确定要删除当前选择的所有考生吗?`;
|
|
|
|
+ } else {
|
|
|
|
+ pretips = `确定要删除当前选择的所有考生吗?`;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const confirm = await this.$confirm(pretips, "提示", {
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).catch(() => {});
|
|
|
|
|
|
if (confirm !== "confirm") return;
|
|
if (confirm !== "confirm") return;
|
|
|
|
|
|
@@ -475,16 +500,35 @@ export default {
|
|
this.$message.success("删除成功!");
|
|
this.$message.success("删除成功!");
|
|
this.deletePageLastItem();
|
|
this.deletePageLastItem();
|
|
},
|
|
},
|
|
- toDelete(row) {
|
|
|
|
- this.$confirm(`确定要删除考生【${row.studentName}】吗?`, "提示", {
|
|
|
|
|
|
+ async toDelete(row) {
|
|
|
|
+ // "scanStatus": true, //是否扫描
|
|
|
|
+ // "markTaskStatus": true // 是否生成阅卷任务
|
|
|
|
+ const students = await getExamStudentStatus([row.id]);
|
|
|
|
+ const student = students[0];
|
|
|
|
+
|
|
|
|
+ if (student && student.scanStatus && student.markTaskStatus) {
|
|
|
|
+ this.$message.error(
|
|
|
|
+ `考生【${row.studentName}】已经生成阅卷任务,禁止删除!`
|
|
|
|
+ );
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let pretips = "";
|
|
|
|
+ if (student && student.scanStatus) {
|
|
|
|
+ pretips = `考生【${row.studentName}】已扫描图片,确定要删除吗?`;
|
|
|
|
+ } else {
|
|
|
|
+ pretips = `确定要删除考生【${row.studentName}】吗?`;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const confirm = await this.$confirm(pretips, "提示", {
|
|
type: "warning",
|
|
type: "warning",
|
|
- })
|
|
|
|
- .then(async () => {
|
|
|
|
- await deleteExamStudent([row.id]);
|
|
|
|
- this.$message.success("删除成功!");
|
|
|
|
- this.deletePageLastItem();
|
|
|
|
- })
|
|
|
|
- .catch(() => {});
|
|
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+
|
|
|
|
+ if (confirm !== "confirm") return;
|
|
|
|
+
|
|
|
|
+ await deleteExamStudent([row.id]);
|
|
|
|
+ this.$message.success("删除成功!");
|
|
|
|
+ this.deletePageLastItem();
|
|
},
|
|
},
|
|
async toExportStudent() {
|
|
async toExportStudent() {
|
|
if (this.loading) return;
|
|
if (this.loading) return;
|