|
@@ -0,0 +1,97 @@
|
|
|
+<template>
|
|
|
+ <div class="list">
|
|
|
+ <table>
|
|
|
+ <tbody class="list-row">
|
|
|
+ <tr class="list-header qm-primary-strong-text">
|
|
|
+ <td>课程</td>
|
|
|
+ <td>专业</td>
|
|
|
+ <td>考试开放时间</td>
|
|
|
+ <td>剩余考试次数</td>
|
|
|
+ <td style="max-width: 200px">操作</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr v-for="(course) in courses" :key="course.examId">
|
|
|
+ <td>{{ course.courseName }}</td>
|
|
|
+ <td>{{ course.specialtyName }}</td>
|
|
|
+ <td>{{ course.startTime }} <br> ~ <br> {{ course.endTime }}</td>
|
|
|
+ <td>{{ course.allowExamCount }}</td>
|
|
|
+ <td style="min-width: 180px">
|
|
|
+ <template v-if="!course.isvalid">
|
|
|
+ <div style="display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px">
|
|
|
+ <i-button class="qm-primary-button" @click="previewPaper(course)">进入考试</i-button>
|
|
|
+
|
|
|
+ <i-poptip trigger="hover" placement="left" class="online-exam-list-override-poptip">
|
|
|
+ <i-button class="qm-primary-button" style="width: 100%">客观分</i-button>
|
|
|
+ <ecs-online-exam-result-list slot="content" :results="[{startTime: '2018-06-03 12:00:00', endTime: '2018-06-04 14:00:00', score: 100}]"></ecs-online-exam-result-list>
|
|
|
+ </i-poptip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import OnlineExamResultList from "./OnlineExamResultList.vue";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "EcsOnlineList",
|
|
|
+ data() {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ courses: Array
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async enterExam(course) {
|
|
|
+ await this.$http.get("/api/offline_exam/start", {
|
|
|
+ params: { examStudentId: course.examStudentId }
|
|
|
+ });
|
|
|
+ this.$emit("reloadList");
|
|
|
+ },
|
|
|
+ previewPaper(course) {
|
|
|
+ var user = {
|
|
|
+ loginName: course.examStudentId,
|
|
|
+ backUrl: window.document.location.href,
|
|
|
+ isOnlineExam: true
|
|
|
+ };
|
|
|
+ window.name = JSON.stringify(user);
|
|
|
+ window.location.href =
|
|
|
+ this.tk_server_url +
|
|
|
+ "/#/preview_paper/" +
|
|
|
+ course.paperId +
|
|
|
+ "?isback=true";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ "ecs-online-exam-result-list": OnlineExamResultList
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.list {
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+ border-radius: 6px;
|
|
|
+}
|
|
|
+
|
|
|
+.list table {
|
|
|
+ width: 100%;
|
|
|
+ border-collapse: collapse !important;
|
|
|
+ border-spacing: 0;
|
|
|
+}
|
|
|
+.list td {
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+ border-radius: 6px;
|
|
|
+ border-collapse: separate !important;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style>
|
|
|
+.online-exam-list-override-poptip .ivu-poptip-rel {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+</style>
|