|
|
@@ -0,0 +1,121 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <page-header title="我的评测" :breadcrumb="breadcrumb"> </page-header>
|
|
|
+ <v-row class="mr-16 ml-5 pa-0" no-gutters style="height: 50px">
|
|
|
+ <v-col>
|
|
|
+ <v-btn color="info" @click="onJoinExam">
|
|
|
+ 参加评测
|
|
|
+ </v-btn>
|
|
|
+ </v-col>
|
|
|
+ <v-col cols="2">
|
|
|
+ <v-select
|
|
|
+ :items="selectItems"
|
|
|
+ outlined
|
|
|
+ v-model="selected"
|
|
|
+ dense
|
|
|
+ ></v-select>
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+
|
|
|
+ <v-card
|
|
|
+ hover
|
|
|
+ v-for="item in examList"
|
|
|
+ :key="item.examName"
|
|
|
+ class="ma-5 mr-16 px-3"
|
|
|
+ style="cursor: default"
|
|
|
+ >
|
|
|
+ <v-row>
|
|
|
+ <v-col class="d-flex">
|
|
|
+ <v-card-title class="ma-0 pa-0">{{ item.examName }}</v-card-title>
|
|
|
+ <v-chip :color="item.state" label class="ml-5" outlined
|
|
|
+ >已结束</v-chip
|
|
|
+ >
|
|
|
+ </v-col>
|
|
|
+ <v-col align="end" class="mr-3">
|
|
|
+ <v-btn color="primary" class="mx-2">查看详情</v-btn>
|
|
|
+ <v-btn color="info" class="mx-2">参加评测</v-btn>
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ <v-row no-gutters align-content="start">
|
|
|
+ <v-col>
|
|
|
+ <v-card-text class="pa-0 pb-5">ID: {{ item.id }}</v-card-text>
|
|
|
+ </v-col>
|
|
|
+ <v-col>
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
+ >开始时间: {{ item.startTime }}</v-card-text
|
|
|
+ >
|
|
|
+ </v-col>
|
|
|
+ <v-col>
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
+ >结束时间: {{ item.endTime }}</v-card-text
|
|
|
+ >
|
|
|
+ </v-col>
|
|
|
+ <v-col>
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
+ >邀请码: {{ item.inviteCode }}</v-card-text
|
|
|
+ >
|
|
|
+ </v-col>
|
|
|
+ <v-col>
|
|
|
+ <v-card-text class="pa-0 pb-5"
|
|
|
+ >参与人数: {{ item.participantsNumber }}</v-card-text
|
|
|
+ >
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-card>
|
|
|
+ <v-pagination v-model="page" :length="pages"> </v-pagination>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import Vue from 'vue'
|
|
|
+import PageHeader from '@/components/PageHeader.vue'
|
|
|
+import { getExamList } from '@/api/exam'
|
|
|
+
|
|
|
+export default Vue.extend({
|
|
|
+ name: 'ExamList',
|
|
|
+ components: {
|
|
|
+ PageHeader
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ page: 1,
|
|
|
+ pages: 4,
|
|
|
+ selected: '正在进行',
|
|
|
+ selectItems: ['未开始', '正在进行', '已结束'],
|
|
|
+ dialog: false,
|
|
|
+ breadcrumb: [
|
|
|
+ {
|
|
|
+ text: '主页',
|
|
|
+ disabled: false,
|
|
|
+ href: '/'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '考试列表',
|
|
|
+ disabled: true,
|
|
|
+ href: '/'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ examList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onJoinExam() {
|
|
|
+ console.log('参加评测')
|
|
|
+ this.$router.push('/exam/')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ console.log('MOUNTED')
|
|
|
+ getExamList('myId')
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.examList = res.data.data
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.examList = []
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped></style>
|