| | |
| | | </el-select> --> |
| | | <el-cascader |
| | | clearable |
| | | collapse-tags |
| | | v-model="student.deptIds" |
| | | :options="depts" |
| | | :props="{ emitPath: false, multiple: true, value: 'id', label: 'name', checkStrictly: true }" |
| | |
| | | <el-button type="primary" @click="selectStudent">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button type="primary" @click="selectAllBoolean ? selectAll() : unselectAll()">{{ selectAllBoolean ? '全选' : '取消全选' }}</el-button> |
| | | <el-table ref="multipleTable" v-loading="student.listLoading" :data="tableData" border fit highlight-current-row |
| | | style="width: 100%" @selection-change="handleSelection" row-key="id"> |
| | | <el-table-column type="selection" :reserve-selection="true"></el-table-column> |
| | |
| | | components: { Pagination, QuestionShow }, |
| | | data() { |
| | | return { |
| | | selectAllBoolean: true, |
| | | tags: [], |
| | | depts: [], |
| | | studentDialog: false, |
| | |
| | | }, |
| | | subjectIdList: [], |
| | | form: { |
| | | deptId: '', |
| | | menuIds: [], |
| | | aggregateSource: 100, |
| | | id: null, |
| | |
| | | limitDateTime: [], |
| | | name: '', |
| | | suggestTime: null, |
| | | titleItems: [], |
| | | titleItems: [{ |
| | | name: '', |
| | | questionItems: [] |
| | | }], |
| | | subjectSource: {}, |
| | | questionTypeVMS: [], |
| | | examineeList: [], |
| | |
| | | }; |
| | | }, |
| | | 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.student.listLoading = true; |
| | | this.getStudent(); |
| | | }, |
| | | |
| | | selectAll () { |
| | | 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.$refs.multipleTable.clearSelection(); |
| | | this.selectAllBoolean = true; |
| | | }, |
| | | getStudent() { |
| | | this.student.listLoading = true; |
| | | examPaperApi.selectStudent(this.student).then(res => { |