Commit 6bbcc7acf5fba3d73cc4762024be466923da6e2c

Authored by 梁保满
1 parent 014b7030

学生调班设置

src/views/basic/setUp/student.vue
... ... @@ -249,7 +249,7 @@
249 249 <el-select
250 250 class="sel"
251 251 v-model="formStuCla.classId"
252   - placeholder="选择级"
  252 + placeholder="选择级"
253 253 >
254 254 <el-option disabled label="请选择" value=""></el-option>
255 255 <el-option
... ... @@ -259,6 +259,7 @@
259 259 item.subjectName ? '-' + item.subjectName : ''
260 260 }`"
261 261 :value="item.id"
  262 + :disabled="chooseClassisDisabled(item.id)"
262 263 >
263 264 </el-option>
264 265 </el-select>
... ... @@ -550,7 +551,7 @@ export default {
550 551 ...query,
551 552 });
552 553 this.loading = false;
553   -
  554 +
554 555 if (status === 0) {
555 556 this.$message.success(info);
556 557 this.diaStu = false;
... ... @@ -584,6 +585,15 @@ export default {
584 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 598 changeStu: _.throttle(
589 599 function () {
... ... @@ -721,7 +731,7 @@ export default {
721 731 ...query,
722 732 });
723 733 this.loading = false;
724   -
  734 +
725 735 if (status === 0) {
726 736 this.studentList = (data.list && [...data?.list]) || [];
727 737 } else {
... ...