From f7a2f13a266861c36c6c514ae67191b029f345b1 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 16 七月 2024 13:59:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/exam/personalRandomTemplate/edit.vue | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/exam/personalRandomTemplate/edit.vue b/src/views/exam/personalRandomTemplate/edit.vue index 80e6559..5a0eb7a 100644 --- a/src/views/exam/personalRandomTemplate/edit.vue +++ b/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 }" @@ -168,7 +169,7 @@ <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-button type="danger" @click="selectAllBoolean ? selectAll() : unselectAll()" size="small" style="margin-bottom: 3px">{{ 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> @@ -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); -- Gitblit v1.8.0