xiangpei
2024-07-12 b62c6c9ab29e933fd0333ac183ef837d00aba5d2
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 = [];