From b62c6c9ab29e933fd0333ac183ef837d00aba5d2 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 12 七月 2024 18:09:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/exam/personalRandomTemplate/edit.vue |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/views/exam/personalRandomTemplate/edit.vue b/src/views/exam/personalRandomTemplate/edit.vue
index 6be7934..7fc5262 100644
--- a/src/views/exam/personalRandomTemplate/edit.vue
+++ b/src/views/exam/personalRandomTemplate/edit.vue
@@ -50,7 +50,7 @@
           </el-col>
         </el-row>
       </el-form-item>
-      <el-form-item :key="item.subjectId" :label="item.label" required v-for="(item, key) in form.questionTypeVMS"
+      <!-- <el-form-item :key="item.subjectId" :label="item.label" required v-for="(item, key) in form.questionTypeVMS"
         v-if="form.paperType == 7">
         <el-row>
           <el-col :span="3">
@@ -73,7 +73,7 @@
             <el-input v-model="form.questionTypeVMS[key].trueFalse" style="width: 80%" />
           </el-col>
         </el-row>
-      </el-form-item>
+      </el-form-item> -->
       <!--      <el-form-item label="鎬绘暟鍒嗭細" v-if="form.paperType==7"  prop="name" required>-->
       <!--        <el-input v-model="form.name"/>-->
       <!--      </el-form-item>-->
@@ -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 }"
@@ -247,7 +248,10 @@
         limitDateTime: [],
         name: '',
         suggestTime: null,
-        titleItems: [],
+        titleItems: [{
+          name: '',
+          questionItems: []
+        }],
         subjectSource: {},
         questionTypeVMS: [],
         examineeList: [],
@@ -313,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;
@@ -355,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);
@@ -380,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 => {
@@ -469,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