|
@@ -448,7 +448,7 @@ export default {
|
|
|
},
|
|
|
// 修改
|
|
|
resetMixCourse (row) {
|
|
|
- console.log(row);
|
|
|
+ // console.log(row);
|
|
|
this.resetAllClassVisible = true;
|
|
|
this.resetAllTitle = `将${row.classDate} ,${row.week}修改`;
|
|
|
this.buttonType = row.type;
|
|
@@ -488,7 +488,6 @@ export default {
|
|
|
}
|
|
|
for (let j = 0; j < this.classCardList.length; j++) {
|
|
|
if (this.classCardList[j].classDate == row.classDate && row.startClassTimeStr == this.classCardList[j].startClassTimeStr && row.endClassTimeStr == this.classCardList[j].endClassTimeStr) {
|
|
|
- // console.log(this.classCardList[j])
|
|
|
this.classCardList.splice(j, 1);
|
|
|
j--;
|
|
|
}
|
|
@@ -504,7 +503,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
lastTime = lastTime.replace(/-/g, '/')
|
|
|
- var newdate = new Date(lastTime)
|
|
|
+ var newdate = new Date(lastTime);
|
|
|
+ newdate.setDate(newdate.getDate() + 1);
|
|
|
+ // console.log(newdate);
|
|
|
+ // 最后一堂课加一天
|
|
|
// newdate.setDate(newdate.getDate() + 7);
|
|
|
this.workOut(newdate, 1, [obj], id, 2, startClassTime, endClassTime);
|
|
|
// this.$message.success('修改成功');
|
|
@@ -515,7 +517,6 @@ export default {
|
|
|
let activeTpye = this.tableActive.type;
|
|
|
let startClassTime;
|
|
|
let endClassTime;
|
|
|
-
|
|
|
if (this.chioseType.indexOf('MIX') != -1) {
|
|
|
// 改合奏
|
|
|
// 删除真实课表里的所有相关单技课
|
|
@@ -541,6 +542,7 @@ export default {
|
|
|
}
|
|
|
//
|
|
|
} else if (this.chioseType.indexOf('SINGLE') != -1 || this.chioseType.indexOf('CLASSROOM') != -1) {
|
|
|
+
|
|
|
// 合奏改单技
|
|
|
for (let i in this.tableList) {
|
|
|
if (this.activeTime == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
|
|
@@ -550,30 +552,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
let activeTableItem = {};
|
|
|
-
|
|
|
+ console.log(this.activeTime);
|
|
|
// 修改提交表里的状态
|
|
|
for (let j = 0; j < this.classCardList.length; j++) {
|
|
|
for (let i in this.tableList) {
|
|
|
if (this.activeTime == this.classCardList[j].classDate && this.startClassTimeStr == this.classCardList[j].startClassTimeStr && this.endClassTimeStr == this.classCardList[j].endClassTimeStr) {
|
|
|
- // this.classCardList[j].type = "SINGLE";
|
|
|
- // this.classCardList[j].startClassTime = startClassTime;
|
|
|
- // this.classCardList[j].endClassTime = endClassTime;
|
|
|
|
|
|
- activeTableItem = this.tableList[i];
|
|
|
this.classCardList.splice(j, 1);
|
|
|
j--
|
|
|
}
|
|
|
+ if (this.activeTime == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
|
|
|
+ activeTableItem = this.tableList[i];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//添加单机班课
|
|
|
- console.log(this.chioseType)
|
|
|
for (let z in this.activeSingleList) {
|
|
|
let obj = {
|
|
|
'classDate': activeTableItem.classDate,
|
|
|
'week': activeTableItem.week,
|
|
|
'type': this.chioseType,
|
|
|
+ 'mixid': activeTableItem.mixid,
|
|
|
'id': this.activeSingleList[z].id,
|
|
|
- 'date': activeTableItem.date,
|
|
|
'name': this.activeSingleList[z].name,
|
|
|
'classTime': activeTableItem.classTime,
|
|
|
'startClassTimeStr': activeTableItem.startClassTimeStr,
|
|
@@ -588,7 +588,6 @@ export default {
|
|
|
|
|
|
|
|
|
this.resetAllClassVisible = false;
|
|
|
- console.log(this.classCardList)
|
|
|
},
|
|
|
// 排课逻辑
|
|
|
workOut (date, classCount, weekArr, id, type = 1, startTime = '', endTime = '') {
|
|
@@ -654,7 +653,6 @@ export default {
|
|
|
'endClassTimeStr': nowEndTime,
|
|
|
'type': 'SINGLE',
|
|
|
'mixid': this.activeSingleList[j].mixid,
|
|
|
-
|
|
|
'weekNum': weekArr[i].weekNum,
|
|
|
'name': this.activeSingleList[j].name,
|
|
|
'option': 1
|
|
@@ -667,10 +665,9 @@ export default {
|
|
|
}
|
|
|
// 请求排课
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
resetaLL () {
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
+ this.teamid = this.$route.query.id;
|
|
|
getAllClass({ musicGroupId: this.teamid }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.maxClassList = res.data;
|
|
@@ -681,13 +678,11 @@ export default {
|
|
|
this.holidayList = Object.keys(res.data[year])
|
|
|
})
|
|
|
},
|
|
|
- // 点击展开
|
|
|
+ // 点击查看
|
|
|
OpenSign (row) {
|
|
|
- let id = row.id;
|
|
|
this.SignList = [];
|
|
|
for (let i in this.classCardList) {
|
|
|
- if (this.classCardList[i].mixid == row.id && this.classCardList[i].classDate == row.classDate) {
|
|
|
-
|
|
|
+ if (this.classCardList[i].mixid == row.mixid && this.classCardList[i].classDate == row.classDate && row.startClassTimeStr == this.classCardList[i].startClassTimeStr && row.endClassTimeStr == this.classCardList[i].endClassTimeStr) {
|
|
|
this.SignList.push(this.classCardList[i])
|
|
|
}
|
|
|
}
|
|
@@ -701,15 +696,16 @@ export default {
|
|
|
},
|
|
|
// 重置单技课
|
|
|
resetSiginClass () {
|
|
|
- for (let i in this.classCardList) {
|
|
|
- for (let j in this.SignList) {
|
|
|
- if (this.SignList[j].classDate == this.classCardList[i].classDate && this.SignList[j].classGroupId == this.classCardList[i].classGroupId) {
|
|
|
- this.classCardList[i] = this.SignList[j];
|
|
|
- this.$message.success('修改成功');
|
|
|
- this.openSignListVisible = false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ this.openSignListVisible = false;
|
|
|
+ // for (let i in this.classCardList) {
|
|
|
+ // for (let j in this.SignList) {
|
|
|
+ // if (this.SignList[j].classDate == this.classCardList[i].classDate && this.SignList[j].classGroupId == this.classCardList[i].classGroupId) {
|
|
|
+ // this.classCardList[i] = this.SignList[j];
|
|
|
+ // this.$message.success('修改成功');
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
},
|
|
|
submitCardList () {
|