Bläddra i källkod

学生端——已结束的艺术评测不展示 && 查询活动时需课程的bindId

XW 5 månader sedan
förälder
incheckning
142c25a5c9

+ 5 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -655,6 +655,7 @@ import ArtTestReport from "./EventContentTypeTemplate/PaperViewBox/ArtTestReport
                         teaidNames = await this.getTeacherName(teaIds)
                         // 同学名单
                         let names = ids.length ? await this.getClassName(ids, true) : []
+                        let todayDay = new Date().getTime()
                         for (let item of res.datas) {
                             if(this.isScale && item.type === 'Art' || !this.isScale) {
                                 item.progress = this.timeStatus(item, true)
@@ -674,7 +675,10 @@ import ArtTestReport from "./EventContentTypeTemplate/PaperViewBox/ArtTestReport
                                     return names.id === item.creatorId
                                 })
                                 item.teacherName = !nameIds ? undefined : nameIds.name
-                                data.push(item)
+                                if(item.type != 'Art' || item.type === 'Art' && todayDay < item.endTime) {
+                                    data.push(item)
+                                }
+                                // data.push(item)
                             }
                         }
                         this.eventList = [...data]

+ 11 - 3
TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue

@@ -590,7 +590,12 @@ export default {
                     })
                 } else {
                     if(!params.subjects.includes(item.id)) params.subjects.push(item.id)
-                    if(item.scope === 'school' && !params.subjects.includes(item.subject.id)) params.subjects.push(item.subject.id)
+                    if(item.scope === 'school' && !params.subjects.includes(item.subject.id)) {
+                        params.subjects.push(item.subject.id)
+                        if(item.subject.bindId && !params.subjects.includes(item.subject.bindId)) {
+                            params.subjects.push(item.subject.bindId)
+                        }
+                    }
                 }
             })
             params.groupListIds = this.classIds.map(item => item.id)
@@ -615,6 +620,7 @@ export default {
                     teaidNames = await this.getTeacherName(teaIds)
                     ids = Array.from(new Set([].concat.apply([], ids)))
                     let names = ids.length ? await this.getClassName(ids, true) : []
+                    let todayDay = new Date().getTime()
                     for (let item of datasss) {
                         if(this.isScale && item.type === 'Art' || !this.isScale) {
                             item.className = []
@@ -632,8 +638,10 @@ export default {
                                 return names.id === item.creatorId
                             })
                             item.teacherName = !nameIds ? undefined : nameIds.name
-                            this.activityList.push(item)
-                            if(item.type === 'Exam' || item.type === 'Art') {
+                            if(item.type != 'Art' || item.type === 'Art' && todayDay < item.endTime) {
+                                this.activityList.push(item)
+                            }
+                            if(item.type === 'Exam' || item.type === 'Art' && todayDay < item.endTime) {
                                 this.activityType.exam += 1
                             } else if(item.type === 'Homework') {
                                 this.activityType.homework += 1