|
|
@@ -128,7 +128,7 @@
|
|
|
{{ user.email }}
|
|
|
</v-col>
|
|
|
<v-col>
|
|
|
- 无
|
|
|
+ {{ user.score }}
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-list-item-content>
|
|
|
@@ -150,13 +150,14 @@ import {
|
|
|
TeacherQuestionSerializer,
|
|
|
LocalDateTime,
|
|
|
ReceivedData,
|
|
|
- UserSerializer
|
|
|
+ UserWithScoreSerializer
|
|
|
} from '@/api/types'
|
|
|
import { getQuestionInfo } from '@/api/question'
|
|
|
import PageHeader from '@/views/components/PageHeader.vue'
|
|
|
import ExamQuestionsInfo from '@/views/components/ExamQuestionsInfo.vue'
|
|
|
import { getExamJoinedUsers } from '@/api/user'
|
|
|
import { timeLength } from '@/utils/common'
|
|
|
+import { getAllReportByExamId } from '@/api/report'
|
|
|
|
|
|
export default Vue.extend({
|
|
|
name: 'TeacherExamDetail',
|
|
|
@@ -168,7 +169,7 @@ export default Vue.extend({
|
|
|
return {
|
|
|
fetching: false,
|
|
|
examQuestions: [] as Array<TeacherQuestionSerializer>,
|
|
|
- joinedUsers: [] as Array<UserSerializer>,
|
|
|
+ joinedUsers: [] as Array<UserWithScoreSerializer>,
|
|
|
breadcrumb: [
|
|
|
{
|
|
|
text: '主页',
|
|
|
@@ -235,6 +236,16 @@ export default Vue.extend({
|
|
|
|
|
|
getExamJoinedUsers(examId).then(({ data }) => {
|
|
|
this.joinedUsers = data.result
|
|
|
+ getAllReportByExamId(examId).then(({ data }) => {
|
|
|
+ const that = this
|
|
|
+ this.joinedUsers.forEach((user) => {
|
|
|
+ data.result.forEach((report) => {
|
|
|
+ if (report.userId === user.id) {
|
|
|
+ that.$set(user, 'score', report.score)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
})
|