瀏覽代碼

修复优化

1
mo 4 年之前
父節點
當前提交
fa11ea3940
共有 2 個文件被更改,包括 12 次插入10 次删除
  1. 4 4
      src/views/teamDetail/components/modals/select-student.vue
  2. 8 6
      src/views/teamDetail/teamClassList.vue

+ 4 - 4
src/views/teamDetail/components/modals/select-student.vue

@@ -79,7 +79,7 @@
         </el-col>
         </el-col>
         <!-- :offset="showName ? 4 : 0" -->
         <!-- :offset="showName ? 4 : 0" -->
         <el-col :span="10" >
         <el-col :span="10" >
-          <el-form-item label="声部" style="margin-right: 0;" prop="sound"  :rules="(isOnlyChangeUser||activeType == 'MUSIC_NETWORK')?null:[{ required: true, message: '请选择声部',trigger: 'blur' }]">
+          <el-form-item :label="isOnlyChangeUser?'声部筛选':'声部'" style="margin-right: 0;" prop="sound"  :rules="(isOnlyChangeUser||activeType == 'MUSIC_NETWORK')?null:[{ required: true, message: '请选择声部',trigger: 'blur' }]">
             <el-select
             <el-select
               v-model="form.sound"
               v-model="form.sound"
               style="width: 100%"
               style="width: 100%"
@@ -218,9 +218,9 @@ export default {
       if (!this.isOnlyChangeUser && this.activeType == 'HIGH_ONLINE' && (this.seleched.length < 3 || this.seleched.length > 5)) {
       if (!this.isOnlyChangeUser && this.activeType == 'HIGH_ONLINE' && (this.seleched.length < 3 || this.seleched.length > 5)) {
         return this.$message.error('线上技能班必须为3-5人')
         return this.$message.error('线上技能班必须为3-5人')
       }
       }
-      // if (this.seleched.length < 1 && !this.isStudentRemove) {
-      //   return this.$message.error('请至少选择一名学生')
-      // }
+      if (this.activeType == 'MUSIC_NETWORK'&&this.seleched.length < 1 && !this.isStudentRemove) {
+        return this.$message.error('请选择一名学生')
+      }
       if (this.activeType == 'MUSIC_NETWORK' && this.seleched.length > 1) {
       if (this.activeType == 'MUSIC_NETWORK' && this.seleched.length > 1) {
         return this.$message.error('乐团网管课仅可添加一名学生')
         return this.$message.error('乐团网管课仅可添加一名学生')
       }
       }

+ 8 - 6
src/views/teamDetail/teamClassList.vue

@@ -354,15 +354,17 @@ export default {
         this.hightOnlineCount != this.compoundList.length
         this.hightOnlineCount != this.compoundList.length
       ) {
       ) {
         this.$message.error("线上基础技能班仅能和线上基础技能班合并");
         this.$message.error("线上基础技能班仅能和线上基础技能班合并");
-        this.hightOnlineCount = 0;
-        this.hightCount = 0;
-        this.compoundList = [];
+        // this.hightOnlineCount = 0;
+        // this.hightCount = 0;
+        // this.compoundList = [];
+        this.compoundList.splice(this.compoundList.length-1,1)
       }
       }
       if (this.hightCount && this.hightCount != this.compoundList.length) {
       if (this.hightCount && this.hightCount != this.compoundList.length) {
         this.$message.error("基础技能班仅能和基础技能班合并");
         this.$message.error("基础技能班仅能和基础技能班合并");
-        this.hightOnlineCount = 0;
-        this.hightCount = 0;
-        this.compoundList = [];
+          this.compoundList.splice(this.compoundList.length-1,1)
+        // this.hightOnlineCount = 0;
+        // this.hightCount = 0;
+        // this.compoundList = [];
       }
       }
     },
     },
     isAddCom(row) {
     isAddCom(row) {