|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<v-container>
|
|
<v-container>
|
|
|
- <page-header title="评测信息" :breadcrumb="breadcrumb">
|
|
|
|
|
|
|
+ <page-header title="评测详情" :breadcrumb="breadcrumb">
|
|
|
<template #extra>
|
|
<template #extra>
|
|
|
<v-row justify="end">
|
|
<v-row justify="end">
|
|
|
<v-col cols="2">
|
|
<v-col cols="2">
|
|
@@ -14,71 +14,155 @@
|
|
|
</v-row>
|
|
</v-row>
|
|
|
</template>
|
|
</template>
|
|
|
</page-header>
|
|
</page-header>
|
|
|
- <v-container class="grey lighten-5 pa-6 d-flex flex-column">
|
|
|
|
|
- <div class="text-center display-1">试卷</div>
|
|
|
|
|
- <div v-if="!fetching">
|
|
|
|
|
- <v-row
|
|
|
|
|
- v-for="question in examQuestions"
|
|
|
|
|
- :key="question.id"
|
|
|
|
|
- class="d-flex"
|
|
|
|
|
- >
|
|
|
|
|
- <v-col class="flex-grow-0 flex-shrink-0" cols="10">
|
|
|
|
|
- <markdown-text
|
|
|
|
|
- :raw="question.stem"
|
|
|
|
|
- style="height: 100%;width: 100%"
|
|
|
|
|
- ></markdown-text>
|
|
|
|
|
- </v-col>
|
|
|
|
|
- <v-col class="flex-shrink-1">
|
|
|
|
|
- <v-card-text> 知识点: {{ question.keyPoints }} </v-card-text>
|
|
|
|
|
- </v-col>
|
|
|
|
|
- </v-row>
|
|
|
|
|
- </div>
|
|
|
|
|
- <v-progress-circular
|
|
|
|
|
- v-else
|
|
|
|
|
- indeterminate
|
|
|
|
|
- class="align-self-center"
|
|
|
|
|
- ></v-progress-circular>
|
|
|
|
|
- </v-container>
|
|
|
|
|
- <v-container class="grey lighten-5 pa-6 d-flex flex-column mt-5">
|
|
|
|
|
- <div class="text-center display-1">评测名单</div>
|
|
|
|
|
- <!-- <v-list-item-group>-->
|
|
|
|
|
- <!-- <v-list-item v-for="user in joinedUsers" :key="user.id">-->
|
|
|
|
|
- <!-- <v-row justify="space-between">-->
|
|
|
|
|
- <!-- <v-col>-->
|
|
|
|
|
- <!-- {{ user.name }}-->
|
|
|
|
|
- <!-- </v-col>-->
|
|
|
|
|
- <!-- <v-col>-->
|
|
|
|
|
- <!-- {{ user.email }}-->
|
|
|
|
|
- <!-- </v-col>-->
|
|
|
|
|
- <!-- <v-col>-->
|
|
|
|
|
- <!-- {{ user.phone }}-->
|
|
|
|
|
- <!-- </v-col>-->
|
|
|
|
|
- <!-- </v-row>-->
|
|
|
|
|
- <!-- </v-list-item>-->
|
|
|
|
|
- <!-- </v-list-item-group>-->
|
|
|
|
|
- </v-container>
|
|
|
|
|
|
|
+ <v-expansion-panels :value="[0]" multiple>
|
|
|
|
|
+ <v-expansion-panel>
|
|
|
|
|
+ <v-expansion-panel-header>
|
|
|
|
|
+ <div class="text-center display-1">评测信息</div>
|
|
|
|
|
+ </v-expansion-panel-header>
|
|
|
|
|
+ <v-expansion-panel-content>
|
|
|
|
|
+ <div class="px-3 mb-5" v-if="examInfo">
|
|
|
|
|
+ <v-card-title>评测「{{ examInfo.examName }}」</v-card-title>
|
|
|
|
|
+ <v-card-text>
|
|
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-3"
|
|
|
|
|
+ >评测邀请码:{{
|
|
|
|
|
+ examInfo.inviteCode ? examInfo.inviteCode : '无'
|
|
|
|
|
+ }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
|
|
+ >当前难度值:{{ examInfo.difficulty }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-3"
|
|
|
|
|
+ >开始时间:{{ examInfo.startTime }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
|
|
+ >结束时间:{{ examInfo.endTime }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-3"
|
|
|
|
|
+ >考试时长:{{
|
|
|
|
|
+ getExamLength(examInfo.startTime, examInfo.endTime)
|
|
|
|
|
+ }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-3"
|
|
|
|
|
+ >职位:{{ examInfo.position }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
|
|
+ >技能点:{{ examInfo.skills.join(' ') }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ <v-card-text class="pa-0 pb-3"
|
|
|
|
|
+ >备注:{{
|
|
|
|
|
+ examInfo.comment ? examInfo.comment : '无'
|
|
|
|
|
+ }}</v-card-text
|
|
|
|
|
+ >
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ </v-card-text>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </v-expansion-panel-content>
|
|
|
|
|
+ </v-expansion-panel>
|
|
|
|
|
+ <v-expansion-panel>
|
|
|
|
|
+ <v-expansion-panel-header>
|
|
|
|
|
+ <div class="text-center display-1">试卷题目</div>
|
|
|
|
|
+ </v-expansion-panel-header>
|
|
|
|
|
+ <v-expansion-panel-content>
|
|
|
|
|
+ <div v-if="!fetching">
|
|
|
|
|
+ <exam-questions-info
|
|
|
|
|
+ :exam-questions="examQuestions"
|
|
|
|
|
+ ></exam-questions-info>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <v-progress-circular
|
|
|
|
|
+ v-else
|
|
|
|
|
+ indeterminate
|
|
|
|
|
+ class="align-self-center"
|
|
|
|
|
+ ></v-progress-circular
|
|
|
|
|
+ ></v-expansion-panel-content>
|
|
|
|
|
+ </v-expansion-panel>
|
|
|
|
|
+ <v-expansion-panel>
|
|
|
|
|
+ <v-expansion-panel-header>
|
|
|
|
|
+ <div class="text-center display-1">评测名单</div>
|
|
|
|
|
+ </v-expansion-panel-header>
|
|
|
|
|
+ <v-expansion-panel-content>
|
|
|
|
|
+ <v-list-item-group>
|
|
|
|
|
+ <v-row class="px-4 align-center">
|
|
|
|
|
+ <v-col cols="1">
|
|
|
|
|
+ 序号
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col> 用户名 </v-col>
|
|
|
|
|
+ <v-col> 邮箱 </v-col>
|
|
|
|
|
+ <v-col> 成绩 </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ <v-list-item v-for="user in joinedUsers" :key="user.id">
|
|
|
|
|
+ <v-list-item-content>
|
|
|
|
|
+ <v-row class="align-center">
|
|
|
|
|
+ <v-col cols="1">
|
|
|
|
|
+ <v-chip label>
|
|
|
|
|
+ {{ joinedUsers.indexOf(user) + 1 }}
|
|
|
|
|
+ </v-chip>
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ {{ user.name }}
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ {{ user.email }}
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ <v-col>
|
|
|
|
|
+ 无
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ </v-list-item-content>
|
|
|
|
|
+ </v-list-item>
|
|
|
|
|
+ </v-list-item-group>
|
|
|
|
|
+ </v-expansion-panel-content>
|
|
|
|
|
+ </v-expansion-panel>
|
|
|
|
|
+ </v-expansion-panels>
|
|
|
</v-container>
|
|
</v-container>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
|
-import { getExamQuestions } from '@/api/exam'
|
|
|
|
|
|
|
+import { getExamById, getExamQuestions } from '@/api/exam'
|
|
|
import { AxiosResponse } from 'axios'
|
|
import { AxiosResponse } from 'axios'
|
|
|
import {
|
|
import {
|
|
|
|
|
+ ExamSerializer,
|
|
|
ExtendedQuestionSerializer,
|
|
ExtendedQuestionSerializer,
|
|
|
|
|
+ LocalDateTime,
|
|
|
ReceivedData,
|
|
ReceivedData,
|
|
|
UserSerializer
|
|
UserSerializer
|
|
|
} from '@/api/types'
|
|
} from '@/api/types'
|
|
|
import { getQuestionInfo } from '@/api/question'
|
|
import { getQuestionInfo } from '@/api/question'
|
|
|
-import MarkdownText from '@/views/exam/components/MarkdownText.vue'
|
|
|
|
|
-import PageHeader from '@/components/PageHeader.vue'
|
|
|
|
|
|
|
+import PageHeader from '@/views/components/PageHeader.vue'
|
|
|
|
|
+import ExamQuestionsInfo from '@/views/components/ExamQuestionsInfo.vue'
|
|
|
import { getExamJoinedUsers } from '@/api/user'
|
|
import { getExamJoinedUsers } from '@/api/user'
|
|
|
|
|
+import { timeLength } from '@/utils/common'
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
export default Vue.extend({
|
|
|
name: 'TeacherExamDetail',
|
|
name: 'TeacherExamDetail',
|
|
|
components: {
|
|
components: {
|
|
|
- MarkdownText,
|
|
|
|
|
- PageHeader
|
|
|
|
|
|
|
+ PageHeader,
|
|
|
|
|
+ ExamQuestionsInfo
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -101,12 +185,22 @@ export default Vue.extend({
|
|
|
disabled: true,
|
|
disabled: true,
|
|
|
href: '/'
|
|
href: '/'
|
|
|
}
|
|
}
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ examInfo: (null as unknown) as ExamSerializer
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getExamLength(startTime: LocalDateTime, endTime: LocalDateTime): string {
|
|
|
|
|
+ return timeLength(startTime, endTime)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
const examId = this.$route.params.examId
|
|
const examId = this.$route.params.examId
|
|
|
|
|
|
|
|
|
|
+ getExamById(examId).then(({ data }) => {
|
|
|
|
|
+ this.examInfo = data.result
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
getExamQuestions(examId)
|
|
getExamQuestions(examId)
|
|
|
.then(({ data }) => {
|
|
.then(({ data }) => {
|
|
|
this.fetching = true
|
|
this.fetching = true
|