| | |
| | | </el-select> --> |
| | | <el-cascader |
| | | clearable |
| | | collapse-tags |
| | | v-model="student.deptIds" |
| | | :options="depts" |
| | | :props="{ emitPath: false, multiple: true, value: 'id', label: 'name', checkStrictly: true }" |
| | |
| | | }, |
| | | subjectIdList: [], |
| | | form: { |
| | | deptId: '', |
| | | menuIds: [], |
| | | aggregateSource: 100, |
| | | id: null, |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | // 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; |
| | | this.initSubject(function () { |
| | | _this.subjectFilter = _this.subjects; |
| | | }); |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.selectAllBoolean = false; |
| | | _this.formLoading = true; |
| | | examPaperApi.select(id).then(re => { |
| | | const { userIds, userNames } = re.response; |
| | |
| | | this.getStudent(); |
| | | }, |
| | | selectAll () { |
| | | 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; |
| | | }, |
| | | getStudent() { |
| | | this.student.listLoading = true; |