From eae62f5e1c79695a51fc487c6db9f28e2bcbeb9d Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 16 七月 2024 09:08:05 +0800
Subject: [PATCH] feat:补考保留最高分
---
src/views/exam/personalRandomTemplate/edit.vue | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/views/exam/personalRandomTemplate/edit.vue b/src/views/exam/personalRandomTemplate/edit.vue
index afacd3f..7fc5262 100644
--- a/src/views/exam/personalRandomTemplate/edit.vue
+++ b/src/views/exam/personalRandomTemplate/edit.vue
@@ -159,6 +159,7 @@
</el-select> -->
<el-cascader
clearable
+ collapse-tags
v-model="student.deptIds"
:options="depts"
:props="{ multiple: true, emitPath: false, value: 'id', label: 'name', checkStrictly: true }"
@@ -316,6 +317,7 @@
_this.subjectFilter = _this.subjects;
});
if (id && parseInt(id) !== 0) {
+ this.selectAllBoolean = false;
_this.formLoading = true;
await examPaperApi.selfselect(id).then(re => {
const { userIds, userNames } = re.response;
@@ -358,20 +360,21 @@
this.student.multipleSelection = val;
},
selectAll () {
- this.selectAllBoolean = false;
+ this.preSelectAll();
let param = { ...this.student };
param.pageSize = 999999;
examPaperApi.selectStudent(param).then(res => {
this.handleSelection(res.response.list);
res.response.list.forEach(item => {
this.$refs.multipleTable.toggleRowSelection(item, true);
+ this.selectAllBoolean = false;
})
this.getStudent();
});
},
unselectAll () {
- this.selectAllBoolean = true;
this.$refs.multipleTable.clearSelection();
+ this.selectAllBoolean = true;
},
confirmStudentSelect() {
this.form.userIds = this.student.multipleSelection.map((item) => item.id);
@@ -383,6 +386,18 @@
});
this.student.multipleSelection = [];
this.studentDialog = false;
+ },
+ preSelectAll() {
+ this.selectAllBoolean = true;
+ this.$refs.multipleTable.clearSelection();
+ this.form.userIds = this.student.multipleSelection.map((item) => item.id);
+ this.form.examineeList = this.student.multipleSelection.map((item) => {
+ return {
+ id: item.id,
+ realName: item.realName
+ };
+ });
+ this.student.multipleSelection = [];
},
getTags() {
userApi.tagList(null).then(data => {
@@ -472,7 +487,10 @@
console.log(this.form.subjectSource);
console.log(this.form.questionTypeVMS);
// this.form.paperType = 7
- this.form.titleItems = [];
+ this.form.titleItems = [{
+ name: '',
+ questionItems: []
+ }];
} else {
this.form.subjectSource = {};
this.subjectIdList = [];
--
Gitblit v1.8.0