龚焕茏
2024-07-16 eeebb8d40266d614c14133b96bf40c57e30424ea
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 }"
@@ -308,6 +309,11 @@
    });
  },
  async mounted() {
    departmentApi.getCurrentDeptId().then(res => {
      if (res.response && res.response[0]) {
        this.form.deptId = res.response[0];
      }
    });
    let id = this.$route.query.id;
    let _this = this;
@@ -360,20 +366,20 @@
    },
    selectAll () {
      this.preSelectAll();
      this.selectAllBoolean = false;
      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);