|
@@ -247,6 +247,16 @@
|
|
|
:rules="teacherRules"
|
|
|
label-position='right'
|
|
|
label-width="100px;">
|
|
|
+ <el-form-item label="合奏班"
|
|
|
+ v-if='!isTemporary'
|
|
|
+ prop="mixClassGroupId">
|
|
|
+ <el-select v-model="teacherForm.mixClassGroupId">
|
|
|
+ <el-option v-for="(item,index) in maxClassList"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="主教老师"
|
|
|
prop='coreTeacher'>
|
|
|
<el-select v-model="teacherForm.coreTeacher"
|
|
@@ -318,7 +328,7 @@
|
|
|
v-model="item.startClassTime"
|
|
|
:picker-options="{
|
|
|
start: '08:30',
|
|
|
- step: '00:15',
|
|
|
+ step: '00:05',
|
|
|
end: '18:30'
|
|
|
}">
|
|
|
</el-time-select>
|
|
@@ -327,7 +337,7 @@
|
|
|
v-model="item.endClassTime"
|
|
|
:picker-options="{
|
|
|
start: '08:30',
|
|
|
- step: '00:15',
|
|
|
+ step: '00:05',
|
|
|
end: '18:30'
|
|
|
}">
|
|
|
</el-time-select>
|
|
@@ -389,13 +399,15 @@ export default {
|
|
|
courseType: '',
|
|
|
courseTime: '',
|
|
|
checked: false,
|
|
|
- courseNum: ''
|
|
|
+ courseNum: '',
|
|
|
+ mixClassGroupId: ''
|
|
|
},
|
|
|
teacherRules: {
|
|
|
coreTeacher: [{ required: true, message: '请选择主教老师' }],
|
|
|
courseType: [{ required: true, message: '请选择上课类型' }],
|
|
|
courseTime: [{ required: true, message: '请选择开始时间' }],
|
|
|
- courseNum: [{ required: true, message: '请输入排课次数' }]
|
|
|
+ courseNum: [{ required: true, message: '请输入排课次数' }],
|
|
|
+ mixClassGroupId: [{ required: true, message: '请选择合奏班' }]
|
|
|
},
|
|
|
weekList: [{
|
|
|
week: '',
|
|
@@ -441,11 +453,11 @@ export default {
|
|
|
// 2.根据合奏班获取所有的单技班
|
|
|
// 3.根据乐团id 查询 此乐团所有的合奏班
|
|
|
// 4.获取当年的所有节假日
|
|
|
- // getAllClass({ musicGroupId: this.teamid }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.maxClassList = res.data;
|
|
|
- // }
|
|
|
- // })
|
|
|
+ getAllClass({ musicGroupId: this.teamid }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.maxClassList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
// let year = new Date().getFullYear();
|
|
|
// axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
|
|
|
// this.holidayList = Object.keys(res.data[year])
|
|
@@ -701,11 +713,17 @@ export default {
|
|
|
if (this.weekList[i].id == item.id) {
|
|
|
this.weekList.splice(i, 1)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
// 提交临时班的信息
|
|
|
submitTemporary (type) {
|
|
|
+ // 参数是一样 type为1 新增临时班
|
|
|
+ // type为2 新增单技班
|
|
|
+ if (type == 1) {
|
|
|
+ this.isTemporary = true;
|
|
|
+ } else {
|
|
|
+ this.isTemporary = false;
|
|
|
+ }
|
|
|
this.$refs['teacherForm'].validate(item => {
|
|
|
if (item) {
|
|
|
let week = this.weekList;
|
|
@@ -719,7 +737,7 @@ export default {
|
|
|
for (let i in this.teacherForm.assistant) {
|
|
|
classGroupTeacherMapperList.push({ userId: this.teacherForm.assistant[i], teacherRole: 'TEACHING' })
|
|
|
}
|
|
|
- let mixClassGroupId = this.activeMixClass;
|
|
|
+ let mixClassGroupId = this.teacherForm.mixClassGroupId;
|
|
|
let musicGroupId = this.teamid;
|
|
|
let startDate = this.teacherForm.courseTime;
|
|
|
let courseType = this.teacherForm.courseType;
|
|
@@ -728,13 +746,6 @@ export default {
|
|
|
return item.userId;
|
|
|
})
|
|
|
let holiday = this.teacherForm.checked;
|
|
|
- /**
|
|
|
- * this.weekList.push({
|
|
|
- week: '',
|
|
|
- startTime: '',
|
|
|
- endTime: '',
|
|
|
- *
|
|
|
- */
|
|
|
let courseList = [];
|
|
|
for (let i in this.weekList) {
|
|
|
courseList.push(this.weekList[i])
|
|
@@ -743,10 +754,11 @@ export default {
|
|
|
this.$message.error('新增班级至少排一节课')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
let obj = {
|
|
|
classGroupName,
|
|
|
- classGroupTeacherMapperList,
|
|
|
mixClassGroupId,
|
|
|
+ classGroupTeacherMapperList,
|
|
|
musicGroupId,
|
|
|
startDate,
|
|
|
courseType,
|
|
@@ -762,7 +774,7 @@ export default {
|
|
|
this.$message.success('修改成功')
|
|
|
this.infoVisible = false;
|
|
|
this.studentVisible = false;
|
|
|
- this.getList(this.activeMixClass);
|
|
|
+ this.getList();
|
|
|
}
|
|
|
})
|
|
|
} else if (type == 2) {
|
|
@@ -772,7 +784,7 @@ export default {
|
|
|
this.$message.success('修改成功');
|
|
|
this.infoVisible = false;
|
|
|
this.studentVisible = false;
|
|
|
- this.getList(this.activeMixClass);
|
|
|
+ this.getList();
|
|
|
}
|
|
|
})
|
|
|
}
|