|
@@ -279,14 +279,25 @@ export default {
|
|
|
let day = curDate.getDay()
|
|
|
// let s = this.curPeriod.semesters.find(s => s.month > month || (s.month == month && s.day > day))
|
|
|
// 当前学期创建教学班,到期时间为下一学期开始时间
|
|
|
- let s = this.curPeriod.semesters.find(s => s.start === 1)
|
|
|
+ /* let s = this.curPeriod.semesters.find(s => s.start === 1)
|
|
|
let date
|
|
|
if (s) {
|
|
|
date = new Date(`${year}-${s.month}-${s.day}`)
|
|
|
} else {
|
|
|
s = this.curPeriod.semesters[0] || {}
|
|
|
date = new Date(`${year + 1}-${s.month || 1}-${s.day || 1}`)
|
|
|
+ } */
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 根据当前所在学期推出下一学期开始时间
|
|
|
+ let nowSIndex = this.$store.state.user.curSemester.index
|
|
|
+ let info = (nowSIndex != -1 && (nowSIndex + 1) != this.curPeriod.semesters.length) ? this.curPeriod.semesters[nowSIndex + 1] : this.curPeriod.semesters[0]
|
|
|
+ if(info.month < month) {
|
|
|
+ year = year + 1
|
|
|
}
|
|
|
+ let date
|
|
|
+ date = new Date(`${year}-${info?.month || 1}-${info?.day || 1}`)
|
|
|
this.listInfo.expire = date.getTime()
|
|
|
},
|
|
|
calcYear() {
|