|
|
@@ -13,7 +13,10 @@
|
|
|
<div class="course-info-main">
|
|
|
<el-row>教师:{{ courseInfo.teacher.name }}</el-row>
|
|
|
<el-row>学期:{{ courseInfo.semester }}</el-row>
|
|
|
- <el-row>时间:{{ timestampToTime(courseInfo.startTime) }} 至 {{ timestampToTime(courseInfo.endTime) }}</el-row>
|
|
|
+ <el-row>时间:{{ timestampToTime(courseInfo.startTime) }} 至 {{
|
|
|
+ timestampToTime(courseInfo.endTime)
|
|
|
+ }}
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
<el-row class="mooc-link">
|
|
|
MOOC链接:
|
|
|
@@ -63,7 +66,8 @@
|
|
|
公告
|
|
|
</div>
|
|
|
<div class="notice-type-txt">
|
|
|
- <el-link href="javascript:void(0);" type="success" @click="selAndInitAnnouncement('announcement')">发布公告
|
|
|
+ <el-link href="javascript:void(0);" type="success" @click="selAndInitAnnouncement('announcement')">
|
|
|
+ 发布公告
|
|
|
</el-link>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
@@ -81,7 +85,8 @@
|
|
|
考试
|
|
|
</div>
|
|
|
<div class="notice-type-txt">
|
|
|
- <el-link href="javascript:void(0);" type="danger" @click="selAndInitAnnouncement('exam')">发布考试</el-link>
|
|
|
+ <el-link href="javascript:void(0);" type="danger" @click="selAndInitAnnouncement('exam')">发布考试
|
|
|
+ </el-link>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<template #reference>
|
|
|
@@ -102,7 +107,8 @@
|
|
|
<el-timeline>
|
|
|
<el-timeline-item
|
|
|
v-for="task in courseTaskList"
|
|
|
- :key="task.id" :timestamp="task.examId ? task.startTime.substring(0, 16) : timestampToTime(task.startAt)"
|
|
|
+ :key="task.id"
|
|
|
+ :timestamp="task.examId ? task.startTime.substring(0, 16) : timestampToTime(task.startAt)"
|
|
|
:color="courseTaskStatusColor(task)"
|
|
|
placement="top"
|
|
|
>
|
|
|
@@ -121,7 +127,8 @@
|
|
|
</el-row>
|
|
|
<el-row v-if="task.examId" class="task-info">
|
|
|
<el-tag v-if="this.state(task)==='NOT_STARTED'" size="small" type="info">未开始</el-tag>
|
|
|
- <el-tag v-else-if="this.state(task)==='RUNNING' && task.isJoined" size="small" type="success">已参加</el-tag>
|
|
|
+ <el-tag v-else-if="this.state(task)==='RUNNING' && task.isJoined" size="small" type="success">已参加
|
|
|
+ </el-tag>
|
|
|
<el-tag v-else-if="this.state(task)==='RUNNING' && !task.isJoined" size="small">未参加</el-tag>
|
|
|
<el-tag v-else-if="this.state(task)==='FINISHED'" size="small" type="info">已结束</el-tag>
|
|
|
<el-tag v-else-if="this.state(task)==='CLOSED'" size="small" type="info">已关闭</el-tag>
|
|
|
@@ -188,7 +195,7 @@
|
|
|
<script>
|
|
|
import NoticeItem from "./components/NoticeItem";
|
|
|
import FileEntry from "./components/FileEntry";
|
|
|
-import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
+import {ElMessageBox, ElMessage} from "element-plus";
|
|
|
import variables from "@/utils/variables";
|
|
|
|
|
|
export default {
|
|
|
@@ -244,11 +251,11 @@ export default {
|
|
|
color: "",
|
|
|
},
|
|
|
noticeTypeMap: {
|
|
|
- announce: { type: "公告", title: "发布公告", color: themeColor.orange },
|
|
|
- homework: { type: "作业", title: "发布作业", color: themeColor.blue },
|
|
|
- exam: { type: "考试", title: "发布考试", color: themeColor.red },
|
|
|
+ announce: {type: "公告", title: "发布公告", color: themeColor.orange},
|
|
|
+ homework: {type: "作业", title: "发布作业", color: themeColor.blue},
|
|
|
+ exam: {type: "考试", title: "发布考试", color: themeColor.red},
|
|
|
},
|
|
|
- newNoticeInfo: { noticeDescription: "", priority: "1", fileList: [] },
|
|
|
+ newNoticeInfo: {noticeDescription: "", priority: "1", fileList: []},
|
|
|
postNoticeInfo: {},
|
|
|
fileEntryList: [{
|
|
|
id: 1,
|
|
|
@@ -410,7 +417,7 @@ export default {
|
|
|
|
|
|
function createAnnouncement() {
|
|
|
let announcementVO = {
|
|
|
- sender: { id: _this.$store.state.user.id, },
|
|
|
+ sender: {id: _this.$store.state.user.id,},
|
|
|
courseId: _this.courseInfo.id,
|
|
|
title: _this.announcementForm.title,
|
|
|
content: _this.announcementForm.content,
|
|
|
@@ -488,7 +495,7 @@ export default {
|
|
|
confirmButtonText: "立即选课",
|
|
|
cancelButtonText: "我再想想",
|
|
|
})
|
|
|
- .then(({ value }) => {
|
|
|
+ .then(({value}) => {
|
|
|
if (value !== this.courseInfo.invitationCode) {
|
|
|
ElMessage.error("选课码错误");
|
|
|
} else {
|
|
|
@@ -579,6 +586,11 @@ export default {
|
|
|
case "courseware":
|
|
|
break;
|
|
|
case "comment":
|
|
|
+ this.$apis.getCommentsByCourseId(this.$route.params.id)
|
|
|
+ .then(res => {
|
|
|
+ this.commentTree = res.data.data;
|
|
|
+ })
|
|
|
+ .catch();
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
@@ -601,7 +613,7 @@ export default {
|
|
|
createdAt: new Date(),
|
|
|
})
|
|
|
.then(res => {
|
|
|
- this.commentTree.push(res.data.data);
|
|
|
+ this.commentTree.push({mainMessage: res.data.data, children: []});
|
|
|
this.commentContent = "";
|
|
|
})
|
|
|
.catch();
|