|
@@ -376,27 +376,23 @@ export default {
|
|
|
if (row.holiday) {
|
|
|
while (exp > 0) {
|
|
|
if (selectWeek == end.get('day') && !this.holidays.includes(end.format('YYYY-MM-DD'))) {
|
|
|
- console.log(end.format('YYYY-MM-DD'))
|
|
|
- // if (exp == 1 && !this.holidays.includes(end.clone().add(7, 'day').format('YYYY-MM-DD'))) {
|
|
|
- // exp--
|
|
|
- // } else if (exp != 1) {
|
|
|
- // exp--
|
|
|
- // }
|
|
|
exp--
|
|
|
}
|
|
|
- // console.log(exp, selectWeek, dayjs(row.startDate).get('day'), end.get('day'), end.format('YYYY-MM-DD'), !this.holidays.includes(end.format('YYYY-MM-DD')))
|
|
|
end = end.add(1, 'day')
|
|
|
- // if (exp == 0 && this.holidays.includes(end.clone().add(6, 'day').format('YYYY-MM-DD'))) {
|
|
|
- // console.log(end.format('YYYY-MM-DD'), end.clone().add(6, 'day').format('YYYY-MM-DD'))
|
|
|
- // exp ++
|
|
|
- // }
|
|
|
if (exp === 0) {
|
|
|
end = end.subtract(1, 'day')
|
|
|
}
|
|
|
- console.log(exp, end.format('YYYY-MM-DD'), end.clone().add(6, 'day').format('YYYY-MM-DD'))
|
|
|
}
|
|
|
} else {
|
|
|
- end = dayjs(row.startDate).add((exp*7), 'day')
|
|
|
+ while (exp > 0) {
|
|
|
+ if (selectWeek == end.get('day')) {
|
|
|
+ exp--
|
|
|
+ }
|
|
|
+ end = end.add(1, 'day')
|
|
|
+ if (exp === 0) {
|
|
|
+ end = end.subtract(1, 'day')
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
const enumd = this.addData(end.format('YYYY-MM-DD'), row.dayOfWeek)
|
|
|
console.log(enumd)
|