|
@@ -0,0 +1,86 @@
|
|
|
+<template>
|
|
|
+ <main-layout>
|
|
|
+ <Breadcrumb style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; background-color: #fafafa;">
|
|
|
+ 当前所在位置:
|
|
|
+ <BreadcrumbItem>离线考试</BreadcrumbItem>
|
|
|
+ </Breadcrumb>
|
|
|
+
|
|
|
+ <div class="home">
|
|
|
+ <i-table border :columns="columns" :data="courses"></i-table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </main-layout>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "OnlineExamHome",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: "课程",
|
|
|
+ key: "courseName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "专业",
|
|
|
+ key: "specialtyName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "考试开放时间",
|
|
|
+ key: "start2end"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "状态",
|
|
|
+ key: "fileUrl",
|
|
|
+ render: (h, params) => {
|
|
|
+ if (params.row.fileUrl) {
|
|
|
+ return h(
|
|
|
+ "a",
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ href: params.row.fileUrl
|
|
|
+ },
|
|
|
+ style: { fontSize: "16px" }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ h("Icon", {
|
|
|
+ props: {
|
|
|
+ type: "ios-cloud-download"
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ h("strong", "下载")
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return h("div", [h("strong", "未上传")]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ key: "operations"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ courses: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ const res = await this.$http.get("/api/offline_exam/getOfflineCourse");
|
|
|
+
|
|
|
+ this.courses = res.data.map(c => ({
|
|
|
+ courseName: c.courseName,
|
|
|
+ specialtyName: c.specialtyName,
|
|
|
+ start2end: c.startTime + " ~ " + c.endTime,
|
|
|
+ fileUrl: c.studentSubjectiveHtml,
|
|
|
+ operations: ""
|
|
|
+ }));
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.home {
|
|
|
+ margin: 20px;
|
|
|
+}
|
|
|
+</style>
|