Commit 6bbcc7acf5fba3d73cc4762024be466923da6e2c
1 parent
014b7030
学生调班设置
Showing
1 changed file
with
13 additions
and
3 deletions
src/views/basic/setUp/student.vue
| @@ -249,7 +249,7 @@ | @@ -249,7 +249,7 @@ | ||
| 249 | <el-select | 249 | <el-select |
| 250 | class="sel" | 250 | class="sel" |
| 251 | v-model="formStuCla.classId" | 251 | v-model="formStuCla.classId" |
| 252 | - placeholder="选择年级" | 252 | + placeholder="选择班级" |
| 253 | > | 253 | > |
| 254 | <el-option disabled label="请选择" value=""></el-option> | 254 | <el-option disabled label="请选择" value=""></el-option> |
| 255 | <el-option | 255 | <el-option |
| @@ -259,6 +259,7 @@ | @@ -259,6 +259,7 @@ | ||
| 259 | item.subjectName ? '-' + item.subjectName : '' | 259 | item.subjectName ? '-' + item.subjectName : '' |
| 260 | }`" | 260 | }`" |
| 261 | :value="item.id" | 261 | :value="item.id" |
| 262 | + :disabled="chooseClassisDisabled(item.id)" | ||
| 262 | > | 263 | > |
| 263 | </el-option> | 264 | </el-option> |
| 264 | </el-select> | 265 | </el-select> |
| @@ -550,7 +551,7 @@ export default { | @@ -550,7 +551,7 @@ export default { | ||
| 550 | ...query, | 551 | ...query, |
| 551 | }); | 552 | }); |
| 552 | this.loading = false; | 553 | this.loading = false; |
| 553 | - | 554 | + |
| 554 | if (status === 0) { | 555 | if (status === 0) { |
| 555 | this.$message.success(info); | 556 | this.$message.success(info); |
| 556 | this.diaStu = false; | 557 | this.diaStu = false; |
| @@ -584,6 +585,15 @@ export default { | @@ -584,6 +585,15 @@ export default { | ||
| 584 | this.changeClazz(); | 585 | this.changeClazz(); |
| 585 | } | 586 | } |
| 586 | }, | 587 | }, |
| 588 | + //学生调班可选班级 | ||
| 589 | + chooseClassisDisabled(classId) { | ||
| 590 | + let isDisabled = false; | ||
| 591 | + let classIds = this.formStuCla.classList.map((item) => item.id); | ||
| 592 | + if (classId != this.formStuCla.oldClassId && classIds.includes(classId)) { | ||
| 593 | + isDisabled = true; | ||
| 594 | + } | ||
| 595 | + return isDisabled; | ||
| 596 | + }, | ||
| 587 | //学生调班 | 597 | //学生调班 |
| 588 | changeStu: _.throttle( | 598 | changeStu: _.throttle( |
| 589 | function () { | 599 | function () { |
| @@ -721,7 +731,7 @@ export default { | @@ -721,7 +731,7 @@ export default { | ||
| 721 | ...query, | 731 | ...query, |
| 722 | }); | 732 | }); |
| 723 | this.loading = false; | 733 | this.loading = false; |
| 724 | - | 734 | + |
| 725 | if (status === 0) { | 735 | if (status === 0) { |
| 726 | this.studentList = (data.list && [...data?.list]) || []; | 736 | this.studentList = (data.list && [...data?.list]) || []; |
| 727 | } else { | 737 | } else { |