Explorar el Código

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

jeff hace 10 meses
padre
commit
74450e855f

+ 12 - 1
TEAMModelOS/ClientApp/src/view/student-account/stulist/MgtStuList.vue

@@ -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() {