|
@@ -139,8 +139,8 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="
|
|
|
- scope.row.studentNum == '0' ||
|
|
|
- scope.row.totalClassTimes == '0'
|
|
|
+ (scope.row.studentNum == '0' ||
|
|
|
+ scope.row.totalClassTimes == '0')&& permission('classGroup/delSingle')
|
|
|
"
|
|
|
@click="removeClass(scope)"
|
|
|
>删除</el-button
|
|
@@ -863,11 +863,11 @@ export default {
|
|
|
this.teacherList = res.data;
|
|
|
}
|
|
|
});
|
|
|
- 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;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
// 获取默认乐团内的所有班
|
|
|
this.changeMixClass();
|
|
@@ -1355,138 +1355,138 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 提交临时班的信息
|
|
|
- submitTemporary(type) {
|
|
|
- // 参数是一样 type为1 新增临时班
|
|
|
- // type为2 新增声部班
|
|
|
- // type为3 修改班级信息
|
|
|
+ // submitTemporary(type) {
|
|
|
+ // // 参数是一样 type为1 新增临时班
|
|
|
+ // // type为2 新增声部班
|
|
|
+ // // type为3 修改班级信息
|
|
|
|
|
|
- if (type == 1) {
|
|
|
- this.isTemporary = true;
|
|
|
- } else {
|
|
|
- this.isTemporary = false;
|
|
|
- }
|
|
|
+ // if (type == 1) {
|
|
|
+ // this.isTemporary = true;
|
|
|
+ // } else {
|
|
|
+ // this.isTemporary = false;
|
|
|
+ // }
|
|
|
|
|
|
- this.$refs["teacherForm"].validate((item) => {
|
|
|
- if (item) {
|
|
|
- let week = this.weekList;
|
|
|
- if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
|
|
|
- if (
|
|
|
- !week[0] ||
|
|
|
- !week[0].startClassTime ||
|
|
|
- !week[0].endClassTime ||
|
|
|
- !week[0].dayOfWeek
|
|
|
- ) {
|
|
|
- this.$message.error("至少排一节课");
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ // this.$refs["teacherForm"].validate((item) => {
|
|
|
+ // if (item) {
|
|
|
+ // let week = this.weekList;
|
|
|
+ // if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
|
|
|
+ // if (
|
|
|
+ // !week[0] ||
|
|
|
+ // !week[0].startClassTime ||
|
|
|
+ // !week[0].endClassTime ||
|
|
|
+ // !week[0].dayOfWeek
|
|
|
+ // ) {
|
|
|
+ // this.$message.error("至少排一节课");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- // 这里代表排课成功 发请求 新增临时班
|
|
|
- let classGroupName = this.className;
|
|
|
- let classGroupTeacherMapperList = [
|
|
|
- { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
|
|
|
- ];
|
|
|
- for (let i in this.teacherForm.assistant) {
|
|
|
- classGroupTeacherMapperList.push({
|
|
|
- userId: this.teacherForm.assistant[i],
|
|
|
- teacherRole: "TEACHING",
|
|
|
- });
|
|
|
- }
|
|
|
- // let mixClassGroupId = this.teacherForm.mixClassGroupId;
|
|
|
- let musicGroupId = this.teamid;
|
|
|
- let startDate = this.teacherForm.courseTime;
|
|
|
- let courseType = this.teacherForm.courseType;
|
|
|
- let courseTimes = this.teacherForm.courseNum;
|
|
|
+ // // 这里代表排课成功 发请求 新增临时班
|
|
|
+ // let classGroupName = this.className;
|
|
|
+ // let classGroupTeacherMapperList = [
|
|
|
+ // { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
|
|
|
+ // ];
|
|
|
+ // for (let i in this.teacherForm.assistant) {
|
|
|
+ // classGroupTeacherMapperList.push({
|
|
|
+ // userId: this.teacherForm.assistant[i],
|
|
|
+ // teacherRole: "TEACHING",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // // let mixClassGroupId = this.teacherForm.mixClassGroupId;
|
|
|
+ // let musicGroupId = this.teamid;
|
|
|
+ // let startDate = this.teacherForm.courseTime;
|
|
|
+ // let courseType = this.teacherForm.courseType;
|
|
|
+ // let courseTimes = this.teacherForm.courseNum;
|
|
|
|
|
|
- if (
|
|
|
- courseTimes <= 0 &&
|
|
|
- this.teacherForm.isAdd != "onlyUpdateTeacher"
|
|
|
- ) {
|
|
|
- this.$message.error("请至少排一节课");
|
|
|
- return;
|
|
|
- } else if (courseTimes > this.maxMun) {
|
|
|
- this.$message.error(`一次最多排${this.maxMun}节课`);
|
|
|
- return;
|
|
|
- }
|
|
|
- let students = this.activeListStudent.map((item) => {
|
|
|
- return item.userId;
|
|
|
- });
|
|
|
- let holiday = this.teacherForm.checked;
|
|
|
- let courseList = [];
|
|
|
- for (let i in this.weekList) {
|
|
|
- courseList.push(this.weekList[i]);
|
|
|
- }
|
|
|
- if (
|
|
|
- courseList.length <= 0 &&
|
|
|
- this.teacherForm.isAdd != "onlyUpdateTeacher"
|
|
|
- ) {
|
|
|
- this.$message.error("新增班级至少排一节课");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
|
|
|
- startDate = null;
|
|
|
- courseType = null;
|
|
|
- students = null;
|
|
|
- holiday = null;
|
|
|
- courseTimes = null;
|
|
|
- (courseList = null), (mineType = null);
|
|
|
- }
|
|
|
- // mixClassGroupId,
|
|
|
- let mineType = this.activeType;
|
|
|
- let obj = {
|
|
|
- classGroupName,
|
|
|
- classGroupTeacherMapperList,
|
|
|
- musicGroupId,
|
|
|
- startDate,
|
|
|
- courseType,
|
|
|
- students,
|
|
|
- holiday,
|
|
|
- courseTimes,
|
|
|
- courseTimeDtoList: courseList,
|
|
|
- type: mineType,
|
|
|
- courseAddType: this.teacherForm.isAdd,
|
|
|
- };
|
|
|
- if (type == 1) {
|
|
|
- // 新增临时班级
|
|
|
- revisionClassGroup(obj).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- // 提示修改成功
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.infoVisible = false;
|
|
|
- this.studentVisible = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
- } else if (type == 2) {
|
|
|
- (obj.subjectId = this.teacherForm.sound),
|
|
|
- (obj.expectStudentNum = this.teacherForm.expectStudentNum);
|
|
|
- // 新增声部班
|
|
|
- revisionAddClassGroup(obj).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- // 修改成功
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.infoVisible = false;
|
|
|
- this.studentVisible = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
- } else if (type == 3) {
|
|
|
- // 乐团修改
|
|
|
- obj.classGroupId = this.activeClass;
|
|
|
- classGroupUpdate(obj).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.infoVisible = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.error("请填写必要信息");
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ // if (
|
|
|
+ // courseTimes <= 0 &&
|
|
|
+ // this.teacherForm.isAdd != "onlyUpdateTeacher"
|
|
|
+ // ) {
|
|
|
+ // this.$message.error("请至少排一节课");
|
|
|
+ // return;
|
|
|
+ // } else if (courseTimes > this.maxMun) {
|
|
|
+ // this.$message.error(`一次最多排${this.maxMun}节课`);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // let students = this.activeListStudent.map((item) => {
|
|
|
+ // return item.userId;
|
|
|
+ // });
|
|
|
+ // let holiday = this.teacherForm.checked;
|
|
|
+ // let courseList = [];
|
|
|
+ // for (let i in this.weekList) {
|
|
|
+ // courseList.push(this.weekList[i]);
|
|
|
+ // }
|
|
|
+ // if (
|
|
|
+ // courseList.length <= 0 &&
|
|
|
+ // this.teacherForm.isAdd != "onlyUpdateTeacher"
|
|
|
+ // ) {
|
|
|
+ // this.$message.error("新增班级至少排一节课");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
|
|
|
+ // startDate = null;
|
|
|
+ // courseType = null;
|
|
|
+ // students = null;
|
|
|
+ // holiday = null;
|
|
|
+ // courseTimes = null;
|
|
|
+ // (courseList = null), (mineType = null);
|
|
|
+ // }
|
|
|
+ // // mixClassGroupId,
|
|
|
+ // let mineType = this.activeType;
|
|
|
+ // let obj = {
|
|
|
+ // classGroupName,
|
|
|
+ // classGroupTeacherMapperList,
|
|
|
+ // musicGroupId,
|
|
|
+ // startDate,
|
|
|
+ // courseType,
|
|
|
+ // students,
|
|
|
+ // holiday,
|
|
|
+ // courseTimes,
|
|
|
+ // courseTimeDtoList: courseList,
|
|
|
+ // type: mineType,
|
|
|
+ // courseAddType: this.teacherForm.isAdd,
|
|
|
+ // };
|
|
|
+ // if (type == 1) {
|
|
|
+ // // 新增临时班级
|
|
|
+ // revisionClassGroup(obj).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // // 提示修改成功
|
|
|
+ // this.$message.success("修改成功");
|
|
|
+ // this.infoVisible = false;
|
|
|
+ // this.studentVisible = false;
|
|
|
+ // this.getList();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else if (type == 2) {
|
|
|
+ // (obj.subjectId = this.teacherForm.sound),
|
|
|
+ // (obj.expectStudentNum = this.teacherForm.expectStudentNum);
|
|
|
+ // // 新增声部班
|
|
|
+ // revisionAddClassGroup(obj).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // // 修改成功
|
|
|
+ // this.$message.success("修改成功");
|
|
|
+ // this.infoVisible = false;
|
|
|
+ // this.studentVisible = false;
|
|
|
+ // this.getList();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else if (type == 3) {
|
|
|
+ // // 乐团修改
|
|
|
+ // obj.classGroupId = this.activeClass;
|
|
|
+ // classGroupUpdate(obj).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message.success("修改成功");
|
|
|
+ // this.infoVisible = false;
|
|
|
+ // this.getList();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.$message.error("请填写必要信息");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
// 新建基础技能班
|
|
|
newClassHight() {
|
|
|
this.$refs["newClassForm"].validate((res) => {
|