|
@@ -336,7 +336,11 @@
|
|
|
for (let j = 0; j < this.tabs[i].tableData.length; j++) {
|
|
for (let j = 0; j < this.tabs[i].tableData.length; j++) {
|
|
|
thisRow = this.tabs[i].tableData[j];
|
|
thisRow = this.tabs[i].tableData[j];
|
|
|
thisRow.lessonIndex = parseInt(j);
|
|
thisRow.lessonIndex = parseInt(j);
|
|
|
- thisRow.PlanId = parseInt(this.$route.query.id);
|
|
|
|
|
|
|
+ if(planId){
|
|
|
|
|
+ thisRow.PlanId = parseInt(planId);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ thisRow.PlanId = parseInt(this.$route.query.id);
|
|
|
|
|
+ }
|
|
|
thisRow.WeekDay = parseInt(i + 1);
|
|
thisRow.WeekDay = parseInt(i + 1);
|
|
|
thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
|
|
thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
|
|
|
thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
|
|
thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
|
|
@@ -346,6 +350,7 @@
|
|
|
planRs.push(thisRow)
|
|
planRs.push(thisRow)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
let res = JSON.stringify(planRs);
|
|
let res = JSON.stringify(planRs);
|
|
|
// 如果传入0就用url里的,如果非0就用传入的
|
|
// 如果传入0就用url里的,如果非0就用传入的
|
|
|
// let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
|
|
// let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
|
|
@@ -444,11 +449,14 @@
|
|
|
// 遍历分配
|
|
// 遍历分配
|
|
|
Rs.map(function (item) {
|
|
Rs.map(function (item) {
|
|
|
for (let i = 0; i < 7; i++) {
|
|
for (let i = 0; i < 7; i++) {
|
|
|
- if (item.WeekDay == i) {
|
|
|
|
|
|
|
+ if (item.WeekDay == i+1) {
|
|
|
bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
|
|
bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
|
|
|
et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
|
|
et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
|
|
|
item.timeLong = [bt, et];
|
|
item.timeLong = [bt, et];
|
|
|
- that.tabs[i - 1].tableData.push(item);
|
|
|
|
|
|
|
+ // that.tabs[i - 1].tableData.push(item);
|
|
|
|
|
+ // tabs[0]是周一
|
|
|
|
|
+ that.tabs[i].tableData.push(item);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|