瀏覽代碼

乐团网管课

wolyshaw 4 年之前
父節點
當前提交
1297d97137

+ 2 - 2
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -256,10 +256,10 @@ export default {
               await classGroupUpdate(list)
               this.$message.success('排课修改成功')
             } else {
-              if (this.classType === 1) {
+              if (this.classType == 1) {
                 await revisionClassGroup(list)
                 this.$message.success('排课成功')
-              } else if (this.classType === 2 || this.classType === 3) {
+              } else if (this.classType == 2 || this.classType == 3 || this.classType == 4) {
                 await revisionAddClassGroup(list)
                 this.$message.success('排课成功')
               }

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

@@ -2,7 +2,7 @@
   <div>
     <el-form :model="form" ref="form" label-suffix=": " inline>
       <el-row>
-        <el-col :span="10" v-if="!isOnlyChangeUser">
+        <el-col :span="10" v-if="showName">
           <el-form-item
             label="班级名称"
             prop="name"
@@ -17,7 +17,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="10" :offset="!isOnlyChangeUser ? 4 : 0">
+        <el-col :span="10" :offset="showName ? 4 : 0">
           <el-form-item label="声部">
             <el-select
               v-model="sound"
@@ -93,6 +93,9 @@ export default {
         gender: genderType[item.gender],
       }));
     },
+    showName() {
+      return !this.isOnlyChangeUser && this.activeType != 'MUSIC_NETWORK'
+    },
     canDelUser() {
       return this.$route.query.type !== 'resetTeam' || !this.isOnlyChangeUser
     }
@@ -146,6 +149,9 @@ export default {
       if (this.seleched.length < 1) {
         return this.$message.error('请至少选择一名学生')
       }
+      if (this.activeType == 'MUSIC_NETWORK' && this.seleched.length > 1) {
+        return this.$message.error('乐团网管课仅可添加一名学生')
+      }
       this.$refs.form.validate(async valid => {
         if (valid) {
           if (this.isOnlyChangeUser && this.type !== 'change') {

+ 7 - 1
src/views/teamDetail/components/resetClass.vue

@@ -150,6 +150,8 @@
           <div class="add"
                @click="addNewClass('MIX')">新建合奏班</div>
           <div class="add"
+               @click="addNewClass('MUSIC_NETWORK')">新建乐团网管课</div>
+          <div class="add"
                @click="newClassVisible = true">基础技能班</div>
           <!-- <div class="add"
           @click="addNewClass('HIGH_ONLINE')">线上基础技能班</div>-->
@@ -1093,8 +1095,12 @@ export default {
     },
     // 新增班级
     addNewClass (type) {
+      const types = {
+        NORMAL: 2,
+        MUSIC_NETWORK: 4
+      }
       this.isOnlyChangeUser = false
-      this.classType = (type === 'NORMAL' ? 2 : 3)
+      this.classType = (types[type] || 3)
       /**
        *      { value: 'NORMAL', label: '单技班' },
         { value: 'MIX', label: '合奏班' },