|
@@ -90,17 +90,19 @@
|
|
|
@click="removeCourse"
|
|
|
:disabled="!dataList.length > 0"
|
|
|
type="primary"
|
|
|
-
|
|
|
>批量删除</el-button
|
|
|
>
|
|
|
|
|
|
- <el-button type="primary" @click="resetClass"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="resetClass"
|
|
|
v-permission="'courseSchedule/batchCourseAdjust'"
|
|
|
-
|
|
|
>课程调整</el-button
|
|
|
>
|
|
|
- <el-button type="primary" @click="submitClass"
|
|
|
- v-permission="'courseSchedule/courseMerge'"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitClass"
|
|
|
+ v-permission="'courseSchedule/courseMerge'"
|
|
|
>课程合并</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -129,7 +131,7 @@
|
|
|
<el-dialog
|
|
|
:visible.sync="resetCourseVisible"
|
|
|
v-if="resetCourseVisible"
|
|
|
- @closeReset="closeReset"
|
|
|
+ @closeReset="closeReset"
|
|
|
title="课程调整"
|
|
|
append-to-body
|
|
|
width="800px"
|
|
@@ -236,7 +238,7 @@ export default {
|
|
|
this.clearCom();
|
|
|
this.show = false;
|
|
|
this.isLook = false;
|
|
|
- this.resetCourseVisible = false
|
|
|
+ this.resetCourseVisible = false;
|
|
|
this.$emit("getList");
|
|
|
},
|
|
|
cancaleMerge() {
|
|
@@ -251,29 +253,42 @@ export default {
|
|
|
// 判断条件
|
|
|
if (!this.checkCourseTimer()) {
|
|
|
this.$message.error("请选择相同的课程时长");
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
let isNotStart = false;
|
|
|
- let idList =[];
|
|
|
+ let idList = [];
|
|
|
this.dataList.forEach((course) => {
|
|
|
- idList.push(course.id)
|
|
|
+ idList.push(course.id);
|
|
|
if (course.status != "NOT_START") {
|
|
|
isNotStart = true;
|
|
|
}
|
|
|
+ if (course.newCourseId > 0 || course.beMerged) {
|
|
|
+ this.$message.error("已经合并课程不能调整");
|
|
|
+ isFlage = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (course.isLock) {
|
|
|
+ this.$message.error("已锁定的课程不能调整");
|
|
|
+ isFlage = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
});
|
|
|
if (isNotStart) {
|
|
|
this.$message.error("请选择未开始的课程");
|
|
|
return;
|
|
|
}
|
|
|
- let isEqual = this.dataList.every(coures=>{
|
|
|
- return coures.musicGroupId==this.dataList[0].musicGroupId&&coures.groupType==this.dataList[0].groupType
|
|
|
- })
|
|
|
+ let isEqual = this.dataList.every((coures) => {
|
|
|
+ return (
|
|
|
+ coures.musicGroupId == this.dataList[0].musicGroupId &&
|
|
|
+ coures.groupType == this.dataList[0].groupType
|
|
|
+ );
|
|
|
+ });
|
|
|
if (!isEqual) {
|
|
|
this.$message.error("请选择相同的课程组");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.idList = idList;
|
|
|
+ this.idList = idList;
|
|
|
// 开始选择课程
|
|
|
this.resetCourseVisible = true;
|
|
|
},
|