|  | @@ -234,27 +234,36 @@
 | 
	
		
			
				|  |  |                 :modal-append-to-body="false">
 | 
	
		
			
				|  |  |        <el-form :inline="true"
 | 
	
		
			
				|  |  |                 :model='teacherForm'
 | 
	
		
			
				|  |  | +               ref='teacherForm'
 | 
	
		
			
				|  |  | +               :rules="teacherRules"
 | 
	
		
			
				|  |  |                 label-position='right'
 | 
	
		
			
				|  |  |                 label-width="100px;">
 | 
	
		
			
				|  |  |          <el-form-item label="主教老师"
 | 
	
		
			
				|  |  |                        prop='coreTeacher'>
 | 
	
		
			
				|  |  |            <el-select v-model="teacherForm.coreTeacher">
 | 
	
		
			
				|  |  | -            <el-option label="11"
 | 
	
		
			
				|  |  | -                       value="222"></el-option>
 | 
	
		
			
				|  |  | +            <el-option v-for="(item,index) in teacherList"
 | 
	
		
			
				|  |  | +                       :key="index"
 | 
	
		
			
				|  |  | +                       :label="item.name"
 | 
	
		
			
				|  |  | +                       :value="item.userId"></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item label="助教老师"
 | 
	
		
			
				|  |  |                        prop="assistant">
 | 
	
		
			
				|  |  | -          <el-select v-model="teacherForm.assistant">
 | 
	
		
			
				|  |  | -            <el-option label="11"
 | 
	
		
			
				|  |  | -                       value="222"></el-option>
 | 
	
		
			
				|  |  | +          <el-select v-model="teacherForm.assistant"
 | 
	
		
			
				|  |  | +                     multiple>
 | 
	
		
			
				|  |  | +            <el-option v-for="(item,index) in teacherList"
 | 
	
		
			
				|  |  | +                       :key="index"
 | 
	
		
			
				|  |  | +                       :label="item.name"
 | 
	
		
			
				|  |  | +                       :value="item.userId"></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item label="课程类型"
 | 
	
		
			
				|  |  |                        prop="courseType">
 | 
	
		
			
				|  |  |            <el-select v-model="teacherForm.courseType">
 | 
	
		
			
				|  |  | -            <el-option label="11"
 | 
	
		
			
				|  |  | -                       value="222"></el-option>
 | 
	
		
			
				|  |  | +            <el-option v-for="(item,index) in courseTypeList"
 | 
	
		
			
				|  |  | +                       :key="index"
 | 
	
		
			
				|  |  | +                       :value="item.value"
 | 
	
		
			
				|  |  | +                       :label="item.label"></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item label="排课次数"
 | 
	
	
		
			
				|  | @@ -275,18 +284,24 @@
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |        </el-form>
 | 
	
		
			
				|  |  |        <div class="WeekWrap">
 | 
	
		
			
				|  |  | -        <h3 style="margin-bottom:20px;">循环次数 </h3>
 | 
	
		
			
				|  |  | +        <h3 style="margin-bottom:20px;">循环次数 <el-button type="text"
 | 
	
		
			
				|  |  | +                     style='margin-left:10px;'
 | 
	
		
			
				|  |  | +                     @click="addWeek">添加</el-button>
 | 
	
		
			
				|  |  | +        </h3>
 | 
	
		
			
				|  |  |          <div class="countWrap"
 | 
	
		
			
				|  |  |               style="margin-bottom:10px;">
 | 
	
		
			
				|  |  | -          <div class="countItem">
 | 
	
		
			
				|  |  | +          <div class="countItem"
 | 
	
		
			
				|  |  | +               style="margin-bottom:20px;"
 | 
	
		
			
				|  |  | +               v-for="(item,index) in weekList"
 | 
	
		
			
				|  |  | +               :key="index">
 | 
	
		
			
				|  |  |              <span>循环周期: </span>
 | 
	
		
			
				|  |  | -            <el-select v-model="weekList[0].week">
 | 
	
		
			
				|  |  | +            <el-select v-model="item.week">
 | 
	
		
			
				|  |  |                <el-option label="lalal"
 | 
	
		
			
				|  |  |                           value="111"></el-option>
 | 
	
		
			
				|  |  |              </el-select>
 | 
	
		
			
				|  |  |              <span>开始时间</span>
 | 
	
		
			
				|  |  |              <el-time-select placeholder=""
 | 
	
		
			
				|  |  | -                            v-model="weekList[0].startTime"
 | 
	
		
			
				|  |  | +                            v-model="item.startTime"
 | 
	
		
			
				|  |  |                              :picker-options="{
 | 
	
		
			
				|  |  |                                 start: '08:30',
 | 
	
		
			
				|  |  |                                 step: '00:15',
 | 
	
	
		
			
				|  | @@ -295,23 +310,32 @@
 | 
	
		
			
				|  |  |              </el-time-select>
 | 
	
		
			
				|  |  |              <span>结束时间</span>
 | 
	
		
			
				|  |  |              <el-time-select placeholder=""
 | 
	
		
			
				|  |  | -                            v-model="weekList[0].endTime"
 | 
	
		
			
				|  |  | +                            v-model="item.endTime"
 | 
	
		
			
				|  |  |                              :picker-options="{
 | 
	
		
			
				|  |  |                                start: '08:30',
 | 
	
		
			
				|  |  |                                step: '00:15',
 | 
	
		
			
				|  |  |                                end: '18:30'
 | 
	
		
			
				|  |  |              }">
 | 
	
		
			
				|  |  |              </el-time-select>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            <el-button type="danger"
 | 
	
		
			
				|  |  | +                       @click="removeWeek(item)"
 | 
	
		
			
				|  |  | +                       icon="el-icon-delete"
 | 
	
		
			
				|  |  | +                       circle></el-button>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <div slot="footer"
 | 
	
		
			
				|  |  | +           class="dialog-footer">
 | 
	
		
			
				|  |  | +        <el-button type="primary"
 | 
	
		
			
				|  |  | +                   @click="submitTemporary">确 定</el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent } from '@/api/buildTeam'
 | 
	
		
			
				|  |  | +import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup } from '@/api/buildTeam'
 | 
	
		
			
				|  |  |  import { getClassAllStudent, removeStudents, addStudents } from '@/api/studentManager'
 | 
	
		
			
				|  |  |  import axios from 'axios'
 | 
	
		
			
				|  |  |  import qs from 'qs'
 | 
	
	
		
			
				|  | @@ -333,23 +357,39 @@ export default {
 | 
	
		
			
				|  |  |        studentList: [], //列表里的学生集合
 | 
	
		
			
				|  |  |        activeMixClass: '', // 选中的合奏班
 | 
	
		
			
				|  |  |        chioseStudent: [],// 勾选的学生信息
 | 
	
		
			
				|  |  | -      isNewClass: true,
 | 
	
		
			
				|  |  | +      isNewClass: false,
 | 
	
		
			
				|  |  |        className: '', // 班级名称
 | 
	
		
			
				|  |  |        activeClass: '', // 当前操作的班级
 | 
	
		
			
				|  |  |        soundList: [],
 | 
	
		
			
				|  |  |        infoVisible: true,
 | 
	
		
			
				|  |  |        teacherForm: {
 | 
	
		
			
				|  |  |          coreTeacher: '',
 | 
	
		
			
				|  |  | -        assistant: '',
 | 
	
		
			
				|  |  | +        assistant: [],
 | 
	
		
			
				|  |  |          courseType: '',
 | 
	
		
			
				|  |  |          courseTime: '',
 | 
	
		
			
				|  |  | -        checked: false
 | 
	
		
			
				|  |  | +        checked: false,
 | 
	
		
			
				|  |  | +        courseNum: ''
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      teacherRules: {
 | 
	
		
			
				|  |  | +        coreTeacher: [{ required: true, message: '请选择主教老师' }],
 | 
	
		
			
				|  |  | +        courseType: [{ required: true, message: '请选择上课类型' }],
 | 
	
		
			
				|  |  | +        courseTime: [{ required: true, message: '请选择开始时间' }],
 | 
	
		
			
				|  |  | +        courseNum: [{ required: true, message: '请输入排课次数' }]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        weekList: [{
 | 
	
		
			
				|  |  |          week: '',
 | 
	
		
			
				|  |  |          startTime: '',
 | 
	
		
			
				|  |  | -        endTime: ''
 | 
	
		
			
				|  |  | -      }]
 | 
	
		
			
				|  |  | +        endTime: '',
 | 
	
		
			
				|  |  | +        id: new Date()
 | 
	
		
			
				|  |  | +      }],
 | 
	
		
			
				|  |  | +      teacherList: [], // 存储的老师列表
 | 
	
		
			
				|  |  | +      courseTypeList: [
 | 
	
		
			
				|  |  | +        { value: 'SINGLE', label: '单技课' },
 | 
	
		
			
				|  |  | +        { value: 'MIX', label: '合奏课' },
 | 
	
		
			
				|  |  | +        { value: 'COMPREHENSIVE', label: '综合课' },
 | 
	
		
			
				|  |  | +        { value: 'TRAINING', label: '集训课' },
 | 
	
		
			
				|  |  | +        { value: 'CLASSROOM', label: '课堂课' },
 | 
	
		
			
				|  |  | +      ]
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created () {
 | 
	
	
		
			
				|  | @@ -377,6 +417,16 @@ export default {
 | 
	
		
			
				|  |  |          this.soundList = res.data
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    // 获取所有老师
 | 
	
		
			
				|  |  | +    findMusicGroupClassTeacher({
 | 
	
		
			
				|  |  | +      musicGroupId: this.teamid
 | 
	
		
			
				|  |  | +    }).then(res => {
 | 
	
		
			
				|  |  | +      if (res.code == 200) {
 | 
	
		
			
				|  |  | +        this.teacherList = res.data
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    // 课程类型
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      changeMixClass (val) {
 | 
	
	
		
			
				|  | @@ -510,7 +560,6 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 
 | 
	
		
			
				|  |  |      temporaryRemoveStudent (item) {
 | 
	
		
			
				|  |  | -      console.log(item.userId);
 | 
	
		
			
				|  |  |        // 列表中删除
 | 
	
		
			
				|  |  |        for (let i in this.activeListStudent) {
 | 
	
		
			
				|  |  |          if (this.activeListStudent[i].userId == item.userId) {
 | 
	
	
		
			
				|  | @@ -543,6 +592,43 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      setInfoMsg () {
 | 
	
		
			
				|  |  |        this.studentVisible;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    addWeek () {
 | 
	
		
			
				|  |  | +      // 添加循环周期
 | 
	
		
			
				|  |  | +      this.weekList.push({
 | 
	
		
			
				|  |  | +        week: '',
 | 
	
		
			
				|  |  | +        startTime: '',
 | 
	
		
			
				|  |  | +        endTime: '',
 | 
	
		
			
				|  |  | +        id: new Date()
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 删除循环周
 | 
	
		
			
				|  |  | +    removeWeek (item) {
 | 
	
		
			
				|  |  | +      for (let i in this.weekList) {
 | 
	
		
			
				|  |  | +        if (this.weekList[i].id == item.id) {
 | 
	
		
			
				|  |  | +          this.weekList.splice(i, 1)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 提交临时班的信息
 | 
	
		
			
				|  |  | +    submitTemporary () {
 | 
	
		
			
				|  |  | +      this.$refs['teacherForm'].validate(item => {
 | 
	
		
			
				|  |  | +        if (item) {
 | 
	
		
			
				|  |  | +          let week = this.weekList;
 | 
	
		
			
				|  |  | +          if (!week[0] || !week[0].startTime || !week[0].endTime || !week[0].week) {
 | 
	
		
			
				|  |  | +            this.$message.error('至少排一节课');
 | 
	
		
			
				|  |  | +            return
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          // 这里代表排课成功  发请求  新增临时班
 | 
	
		
			
				|  |  | +          // revisionClassGroup({}).then(res=>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          // })
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.$message.error('请填写必要信息')
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  }
 |