浏览代码

feat:首页修改,隐藏一些暂时没有用到的页面和组件

廖彦舟 1 年之前
父节点
当前提交
54321b066a

+ 2 - 2
src/utils/portal/variables.js

@@ -1,4 +1,4 @@
-const noImgUrl = "https://mjh1.oss-cn-hangzhou.aliyuncs.com/hci/no-image.png";
+const noImgUrl = "https://box.nju.edu.cn/f/9ba007b7186046e4b846/?dl=1";
 
 // AuthPage
 const backgroundLOGO = "seec-logo--horizontal.png";
@@ -16,4 +16,4 @@ const variables = {
   themeColor,
 };
 
-export default variables;
+export default variables;

+ 123 - 124
src/views/ManagePage/ManagePage.vue

@@ -15,18 +15,18 @@
             </el-icon>
             <span style="padding-left: 20px">全部课程</span>
           </el-menu-item>
-          <el-menu-item index="2">
-            <el-icon>
-              <DocumentChecked/>
-            </el-icon>
-            <span style="padding-left: 20px">全部测试</span>
-          </el-menu-item>
-          <el-menu-item index="3">
-            <el-icon>
-              <DocumentChecked/>
-            </el-icon>
-            <span style="padding-left: 20px">全部题目</span>
-          </el-menu-item>
+<!--          <el-menu-item index="2">-->
+<!--            <el-icon>-->
+<!--              <DocumentChecked/>-->
+<!--            </el-icon>-->
+<!--            <span style="padding-left: 20px">全部测试</span>-->
+<!--          </el-menu-item>-->
+<!--          <el-menu-item index="3">-->
+<!--            <el-icon>-->
+<!--              <DocumentChecked/>-->
+<!--            </el-icon>-->
+<!--            <span style="padding-left: 20px">全部题目</span>-->
+<!--          </el-menu-item>-->
         </el-menu>
       </el-card>
     </el-col>
@@ -60,120 +60,120 @@
         </div>
       </el-card>
 
-      <el-divider id="manage-page-divider"/>
+<!--      <el-divider id="manage-page-divider"/>-->
 
-      <el-card>
-        <template #header>
-          <div class="card-header">
-          <span style="font-weight: bold; font-size: larger">
-            全部测试
-          </span>
-            <!--            <el-button class="ml-16" plain type="primary"-->
-            <!--                       @click="dialogExamTitle='新增测试';dialogExamVisible=true;switchExamDisabled=false;">-->
-            <!--              新建测试-->
-            <!--            </el-button>-->
-          </div>
-        </template>
-        <el-tabs v-model="activeTestPaneName">
-          <el-tab-pane label="评测题" name="eval">
-            <div v-for="(item, key) in evalExamList" :key="key">
-              <div>
-                <el-divider style="margin: 10px 0 20px 0" content-position="left">{{ key }}</el-divider>
-              </div>
-              <div class="test-page-main">
-                <TestCard v-for="exam in item" :key="exam.id" :testVO="exam"/>
-              </div>
-            </div>
-          </el-tab-pane>
-          <el-tab-pane label="代码题" name="coder">
-            <div v-for="(item, key) in coderExamList" :key="key">
-              <div>
-                <el-divider style="margin: 10px 0 20px 0" content-position="left">{{ key }}</el-divider>
-              </div>
-              <div class="test-page-main">
-                <TestCard v-for="exam in item" :key="exam.id" :testVO="exam"/>
-              </div>
-            </div>
-          </el-tab-pane>
-        </el-tabs>
-      </el-card>
+<!--      <el-card>-->
+<!--        <template #header>-->
+<!--          <div class="card-header">-->
+<!--          <span style="font-weight: bold; font-size: larger">-->
+<!--            全部测试-->
+<!--          </span>-->
+<!--            &lt;!&ndash;            <el-button class="ml-16" plain type="primary"&ndash;&gt;-->
+<!--            &lt;!&ndash;                       @click="dialogExamTitle='新增测试';dialogExamVisible=true;switchExamDisabled=false;">&ndash;&gt;-->
+<!--            &lt;!&ndash;              新建测试&ndash;&gt;-->
+<!--            &lt;!&ndash;            </el-button>&ndash;&gt;-->
+<!--          </div>-->
+<!--        </template>-->
+<!--        <el-tabs v-model="activeTestPaneName">-->
+<!--          <el-tab-pane label="评测题" name="eval">-->
+<!--            <div v-for="(item, key) in evalExamList" :key="key">-->
+<!--              <div>-->
+<!--                <el-divider style="margin: 10px 0 20px 0" content-position="left">{{ key }}</el-divider>-->
+<!--              </div>-->
+<!--              <div class="test-page-main">-->
+<!--                <TestCard v-for="exam in item" :key="exam.id" :testVO="exam"/>-->
+<!--              </div>-->
+<!--            </div>-->
+<!--          </el-tab-pane>-->
+<!--          <el-tab-pane label="代码题" name="coder">-->
+<!--            <div v-for="(item, key) in coderExamList" :key="key">-->
+<!--              <div>-->
+<!--                <el-divider style="margin: 10px 0 20px 0" content-position="left">{{ key }}</el-divider>-->
+<!--              </div>-->
+<!--              <div class="test-page-main">-->
+<!--                <TestCard v-for="exam in item" :key="exam.id" :testVO="exam"/>-->
+<!--              </div>-->
+<!--            </div>-->
+<!--          </el-tab-pane>-->
+<!--        </el-tabs>-->
+<!--      </el-card>-->
 
-      <el-divider id="manage-page-divider-3"/>
+<!--      <el-divider id="manage-page-divider-3"/>-->
 
-      <el-card>
-        <template #header>
-          <div class="card-header">
-          <span style="font-weight: bold; font-size: larger">
-            全部题目
-          </span>
-            <!--            <el-button class="ml-16" plain type="primary"-->
-            <!--                       @click="handleProblemCreate">-->
-            <!--              新建题目-->
-            <!--            </el-button>-->
-          </div>
-        </template>
+<!--      <el-card>-->
+<!--        <template #header>-->
+<!--          <div class="card-header">-->
+<!--          <span style="font-weight: bold; font-size: larger">-->
+<!--            全部题目-->
+<!--          </span>-->
+<!--            &lt;!&ndash;            <el-button class="ml-16" plain type="primary"&ndash;&gt;-->
+<!--            &lt;!&ndash;                       @click="handleProblemCreate">&ndash;&gt;-->
+<!--            &lt;!&ndash;              新建题目&ndash;&gt;-->
+<!--            &lt;!&ndash;            </el-button>&ndash;&gt;-->
+<!--          </div>-->
+<!--        </template>-->
 
-        <page-header>
-          <template #actions>
-            <el-input v-model="dialogProblemName"
-                      style="width:200px; margin-right: 10px;"
-                      placeholder="搜索"
+<!--        <page-header>-->
+<!--          <template #actions>-->
+<!--            <el-input v-model="dialogProblemName"-->
+<!--                      style="width:200px; margin-right: 10px;"-->
+<!--                      placeholder="搜索"-->
 
-            />
-            <el-select v-model="dialogProblemTypeStr" @change="fetchProblemData(1)"
-                       style="margin-right: 10px;"
-            >
-              <el-option v-for="item in problemTypeOptions" :key="item.value" :value="item.value">
-                {{ item.label }}
-              </el-option>
-            </el-select>
-            <el-button @click="uploadFile" type="primary" style="display:inline-block; height: 40px; margin-right: 40px;">
-              <el-icon :size="13">
-                <UploadFilled/>
-              </el-icon>
-              上传题目
-            </el-button>
-          </template>
-        </page-header>
+<!--            />-->
+<!--            <el-select v-model="dialogProblemTypeStr" @change="fetchProblemData(1)"-->
+<!--                       style="margin-right: 10px;"-->
+<!--            >-->
+<!--              <el-option v-for="item in problemTypeOptions" :key="item.value" :value="item.value">-->
+<!--                {{ item.label }}-->
+<!--              </el-option>-->
+<!--            </el-select>-->
+<!--            <el-button @click="uploadFile" type="primary" style="display:inline-block; height: 40px; margin-right: 40px;">-->
+<!--              <el-icon :size="13">-->
+<!--                <UploadFilled/>-->
+<!--              </el-icon>-->
+<!--              上传题目-->
+<!--            </el-button>-->
+<!--          </template>-->
+<!--        </page-header>-->
 
-        <el-table :data="problemList">
-          <el-table-column type="expand">
-            <template #default="props">
-              <div>{{ props.row.description }}</div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="name" label="名称"></el-table-column>
-          <el-table-column label="类型">
-            <template #default="scope">
-              <span>{{ problemTypeToTagContent(scope.row.type) }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="上传时间">
-            <template #default="scope">
-              <span>{{ formatTimestamp(scope.row.createdAt) }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="100">
-            <template #default="scope">
-              <el-button
-                  type="primary"
-                  size="mini"
-                  @click="checkDetails(scope.row.id)"
-              >
-                详情
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-pagination
-            background
-            layout="prev, pager, next"
-            :current-page="0"
-            :page-size="0"
-            :total="0"
-            @current-change="changePage"
-        />
-      </el-card>
+<!--        <el-table :data="problemList">-->
+<!--          <el-table-column type="expand">-->
+<!--            <template #default="props">-->
+<!--              <div>{{ props.row.description }}</div>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+<!--          <el-table-column prop="name" label="名称"></el-table-column>-->
+<!--          <el-table-column label="类型">-->
+<!--            <template #default="scope">-->
+<!--              <span>{{ problemTypeToTagContent(scope.row.type) }}</span>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+<!--          <el-table-column label="上传时间">-->
+<!--            <template #default="scope">-->
+<!--              <span>{{ formatTimestamp(scope.row.createdAt) }}</span>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+<!--          <el-table-column label="操作" width="100">-->
+<!--            <template #default="scope">-->
+<!--              <el-button-->
+<!--                  type="primary"-->
+<!--                  size="mini"-->
+<!--                  @click="checkDetails(scope.row.id)"-->
+<!--              >-->
+<!--                详情-->
+<!--              </el-button>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+<!--        </el-table>-->
+<!--        <el-pagination-->
+<!--            background-->
+<!--            layout="prev, pager, next"-->
+<!--            :current-page="0"-->
+<!--            :page-size="0"-->
+<!--            :total="0"-->
+<!--            @current-change="changePage"-->
+<!--        />-->
+<!--      </el-card>-->
     </el-col>
 
     <!--    创建门户课程-->
@@ -471,8 +471,8 @@ import PageHeader from "@/components/PageHeader";
 export default {
   name: "ManagePage",
   components: {
-    PageHeader,
-    TestCard,
+    // PageHeader,
+    // TestCard,
     Document,
     Back,
     CourseCard,
@@ -722,7 +722,6 @@ export default {
               moocUrl: _this.form.moocUrl,
               createdTime: new Date(),
               price: Number(_this.form.price),
-              eaiId: _this.form.eaiLink ? -1 : null,
               coderId: _this.form.coderLink ? -1 : null,
               evalId: _this.form.evalLink ? -1 : null,
               eaiId: _this.form.eaiLink ? -1 : null,
@@ -866,7 +865,7 @@ export default {
               this.problemPageInfo = _res.data.page;
               this.problemList = _res.data.res;
             }
-            
+
           }).catch(err => {
         console.log(err);
       });

+ 99 - 0
src/views/PortalPage/PortalPage.css

@@ -6,6 +6,34 @@
     align-items: center;
     gap: 10px;
 }
+#task-course-body{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    width: 30%;
+    height: 600px;
+    /*background-color: #50A879;*/
+    gap: 5%;
+}
+#row-container{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    height: fit-content;
+    margin: 50px 0 50px 0;
+}
+#course-square{
+    width: 50%;
+    height: 600px;
+    /*background-color: red;*/
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+}
 
 .portal-card-title {
     display: flex;
@@ -75,3 +103,74 @@
     align-items: center;
     margin-bottom: 500px;
 }
+
+.lock-icon{
+    width: 25px;
+    height: 25px;
+}
+
+.center{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100%;
+}
+
+.font-button{
+    font-size: 20px;
+    cursor: pointer;
+    color: var(--el-color-primary);
+}
+.font-button:hover{
+    color: var(--el-color-primary-light-4);
+}
+.font-button:active{
+    color: var(--el-color-primary-light-2);
+}
+.my-course-container{
+    display: grid;
+    width: 100%;
+    grid-template-columns: 1fr 1fr 1fr;
+    column-gap: 10px;
+    row-gap: 10px;
+    overflow-y: auto;
+    overflow-x: hidden;
+    height: 180px;
+}
+.my-task-container{
+    width: 100%;
+    height: 180px;
+    overflow-y: auto;
+}
+.my-course-square-container{
+    display: grid;
+    margin-top: 20px;
+    width: 99%;
+    grid-template-columns: 1fr 1fr 1fr;
+    column-gap: 10px;
+    row-gap: 10px;
+    height: auto;
+}
+.course-square-card{
+    width: 99%;height: fit-content;
+    max-width: 200px;
+}
+.my-course-card{
+    width: 90%;
+    height: 98px;
+    display: flex;
+    margin: 3px;
+    overflow: hidden;
+    flex-direction: column;
+    justify-content: start;
+    border: solid 1px var(--el-border-color-light);
+    border-radius: 8px;
+    cursor: pointer;
+    align-items: center;
+    transition: all 0.3s ease-in-out;
+}
+.my-course-card:hover{
+    scale: 1.02;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}

+ 210 - 8
src/views/PortalPage/PortalPage.vue

@@ -2,15 +2,142 @@
 
   <!--  <PhotoChange></PhotoChange>-->
   <div id="portal-body">
-    <!--  <img src="@/assets/seec-banner.png" id="portal-banner" alt="contain"/>-->
-    <span id="hot-course-title">
-    热门课程
-  </span>
-    <div class="hot-course-container">
-      <div  v-for="course in hotCourseList" :key="course.title">
-        <HotCourseCard :courseVO="course"/>
+    <div id="row-container">
+      <div id="task-course-body">
+        <el-card style="width: 95%;height: 45%" shadow="always">
+          <template #header>我的课程</template>
+          <div class="center" style="height: 150px" v-if="!isLogin">
+            <el-icon class="lock-icon"><Lock class="lock-icon"/></el-icon>
+            <span class="font-button" @click="toAuth">
+              登录
+            </span>
+            <span style="font-size: 20px">
+              以查看
+            </span>
+          </div>
+          <div style="width: 100%;height: 150px;
+          display: flex;flex-direction: row;
+          justify-content: center;
+          align-items: center" v-else-if="isLogin && courses_my.length === 0 ">
+            <el-empty style="height: 100px;width: 100px" image-size="100" description="暂无课程"/>
+          </div>
+          <div class="my-course-container" v-else>
+            <div v-for="courseVO in courses_my"
+                 :title="courseVO.name"
+                 :key="courseVO"
+                 @click="toCourseDetail(courseVO.id)"
+                 class="my-course-card"
+                 style="">
+              <img :src="imageUrl(courseVO)" style="height: 70%;" alt="contain">
+              <span style="text-overflow: ellipsis;
+                 overflow: hidden;max-width: 100px">
+                {{courseVO.name}}
+              </span>
+            </div>
+          </div>
+
+        </el-card>
+        <el-card style="width: 95%;height: 45%" shadow="always">
+          <template #header>
+            <div style="width: 100%;display: flex;
+            height: 100%;align-items: center;
+            flex-direction: row;justify-content: space-between">
+            <span>
+              {{isTeacher?"作业管理":"我的作业"}}
+            </span>
+              <el-select placeholder="请选择课程"
+                         style="width: 200px;"
+                         v-if="isLogin"
+                         @change="courseSelectedChanged"
+                         v-model="courseSelected">
+                <el-option
+                    v-for="item in courses_my"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.name"
+                />
+              </el-select>
+            </div>
+          </template>
+          <div class="center" style="height: 150px" v-if="!isLogin">
+            <el-icon class="lock-icon"><Lock class="lock-icon"/></el-icon>
+            <span class="font-button" @click="toAuth">
+              登录
+            </span>
+            <span style="font-size: 20px">
+              以查看
+            </span>
+          </div>
+          <div style="width: 100%;height: 150px;
+          display: flex;flex-direction: row;
+          justify-content: center;
+          align-items: center" v-else-if="isLogin && homeworkList.length === 0 ">
+            <el-empty style="height: 100px;width: 100px" image-size="100" description="暂无作业"/>
+          </div>
+          <div class="my-task-container" v-else>
+            <el-timeline
+                style="width: auto;margin-top: 20px">
+              <el-timeline-item
+                  style="cursor: pointer"
+                  v-for="(homework,index) in homeworkList"
+                  :timestamp="(homework.startTime.substring(0, 16) + ' — ' + homework.endTime.substring(0, 16)).replaceAll('T',' ')"
+                  :color="statusInfo(homework.status).color"
+                  @click="toHomeworkDetail(homework.assignmentId,homework.type)"
+                  :key="index">
+                <el-row>
+                  <el-tag v-if="homework['type'] ==='writing'||homework['type'] ==='写作'" size="small" color="#409EFFFF" effect="dark"
+                          id="homework-tag">W
+                  </el-tag>
+                  <el-tag v-else-if="homework['type'] ==='speaking'||homework['type'] ==='AI口语'" size="small" color="#50A879" effect="dark"
+                          id="homework-tag" round>S
+                  </el-tag>
+                  <el-tag v-else class="timeline-content" size="small" color="#8dc9e2" effect="dark"
+                          style="border: none">?
+                  </el-tag>
+                  <el-row class="timeline-content">
+                    <el-tag :type="statusInfo(homework.status).type" size="small">{{statusInfo(homework.status).text}}</el-tag>
+                  </el-row>
+                  <el-row class="task-title timeline-content">
+                    {{ homework.assignmentName }}
+                  </el-row>
+                </el-row>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </el-card>
+      </div>
+      <div id="course-square">
+        <el-card style="width: 95%;height: 95%" shadow="always">
+          <template #header>课程广场</template>
+          <div
+              style="width: 100%;
+              height: 500px;
+              display: flex;flex-direction: row;
+              justify-content: center;
+              align-items: center"
+              v-if="courses_all.length === 0 ">
+            <el-empty  image-size="150" description="暂无课程"/>
+          </div>
+          <div v-else style="width: 100%;height: 500px;overflow-y: auto;">
+            <div class="my-course-square-container">
+              <div v-for="i in courses_all" :key="i"
+                   class="course-square-card">
+                <CourseCard :course-v-o="i" style="width: 100%;height: 100%"/>
+              </div>
+            </div>
+          </div>
+        </el-card>
       </div>
     </div>
+    <!--  <img src="@/assets/seec-banner.png" id="portal-banner" alt="contain"/>-->
+<!--    <span id="hot-course-title">-->
+<!--    热门课程-->
+<!--  </span>-->
+<!--    <div class="hot-course-container">-->
+<!--      <div  v-for="course in hotCourseList" :key="course.title">-->
+<!--        <HotCourseCard :courseVO="course"/>-->
+<!--      </div>-->
+<!--    </div>-->
     <!-- 去除轮播组件 -->
     <!--    <CarouselCard style="grid-column-start: 1; grid-column-end: 3;"/>-->
 
@@ -184,12 +311,14 @@ import { FolderOpened, Lock, SetUp, ShoppingCart } from "@element-plus/icons-vue
 import TestCard from "@/components/TestCard";
 import PhotoChange from "@/views/PortalPage/components/PhotoChange";
 import HotCourseCard from "@/views/PortalPage/components/HotCourseCard.vue";
+import {ElMessage} from "element-plus";
 
 export default {
   //数据
   name: "PortalPage",
   components: {
-    HotCourseCard
+    CourseCard,
+    Lock
     // HotCourseCard
     // FolderOpened,
     // TestCard,
@@ -206,10 +335,16 @@ export default {
     return {
       isExpanding: false,
       activeTestPaneName: "eval",
+      courses_all: [],
+      courses_my: [],
+      noImgUrl: this.$variables.noImgUrl,
       exampleEvalTestList: [],
       exampleCourseList: [],
       showCourseList_current: 1,
       exampleCoderTestList: [],
+      courseSelected:"",
+      courseSelectedInfo: {},
+      homeworkList: [],
       myCourseList: [],
       myEvalExamList: [],
       myCoderExamList: [],
@@ -247,6 +382,7 @@ export default {
     isAdmin(){
       return this.$store.state.user.role==="ADMIN";
     },
+
     myTestList() {
       return []
           .concat(this.myEvalExamList)
@@ -286,13 +422,32 @@ export default {
     this.exampleCourseList = (await this.$apis.getExampleCourses()).data.data;
     this.exampleEvalTestList = (await this.$apis.getRecommendEvalExams()).data.data;
     this.exampleCoderTestList = (await this.$apis.getRecommendCoderExams({})).data.data;
+    this.courses_all = (await (this.$apis.getAllCourses())).data.data;
+    console.log(this.courses_all);
     if (this.isLogin && this.isStudent) {
       const res = await this.$apis.getStudentCourses();
       console.log(res);
+      this.courses_my = res.data.data;
+      if (this.courses_my.length!==0){
+        this.courseSelected = this.courses_my[0].name;
+        this.courseSelectedInfo = this.courses_my[0];
+        this.homeworkList = (await this.$apis.getHomeworks(this.courses_my[0].eaiId)).data.data;
+      }
       this.myCourseList = (await this.$apis.getStudentCourses()).data.data;
       this.myEvalExamList = (await this.$apis.getStudentEvalExams()).data.data.filter(i => this.state(i) === "RUNNING");
       this.myCoderExamList = (await this.$apis.getStudentCoderExams({})).data.data.res.filter(i => this.state(i) === "RUNNING");
     }
+    else if (this.isLogin && this.isTeacher){
+      this.$apis.getTeacherCourses().then(res => {
+        this.courses_my = res.data.data;
+      });
+      this.courses_my = (await this.$apis.getTeacherCourses()).data.data;
+      if (this.courses_my.length!==0){
+        this.courseSelected = this.courses_my[0].name;
+        this.courseSelectedInfo = this.courses_my[0];
+        this.homeworkList = (await this.$apis.getHomeworks(this.courses_my[0].eaiId)).data.data;
+      }
+    }
 
     await this.$nextTick(() => that.handleResize());
   },
@@ -302,9 +457,56 @@ export default {
     toAuth() {
       this.$router.push("/auth");
     },
+    imageUrl(courseVO) {
+      // console.log(this.courseVO.imageUrl);
+      return courseVO.imageUrl === null ? this.noImgUrl : courseVO.imageUrl + "?t=" + Date.now().valueOf();
+    },
+    courseSelectedChanged(value){
+      console.log(value);
+      console.log(this.courses_my);
+      for (let i = 0; i < this.courses_my.length; i++) {
+        if (this.courses_my[i].name === value){
+          this.$apis.getHomeworks(this.courses_my[i].eaiId)
+              .then(res => {
+                console.log(res);
+                this.homeworkList = res.data.data;
+              })
+              .catch(err => {
+                ElMessage.error("获取作业失败");
+              });
+        }
+      }
+    },
+    statusInfo(status){
+      if (status === "NOT_STARTED"){
+        return {text:"未开始",type:"info",color:"#909399"};
+      }
+      else if (status === "PROCEEDING"){
+        return {text:"进行中",type:"success",color: "#67C23A"};
+      }
+      else if (status === "FINISHED"){
+        return {text:"已结束",type:"info",color: "#909399"};
+      }
+      else{
+        return {text:"未知",type:"info",color: "#909399"};
+      }
+    },
+    toHomeworkDetail(id,type){
+      this.$router.push("/homework/"+id+"/"
+          +this.courseSelectedInfo.teacherId+"/"
+          +type+"/"
+          +this.courseSelectedInfo.eaiId+"/"
+          +this.courseSelectedInfo.id);
+    },
+    toLogin(){
+      this.$router.push("/login");
+    },
     toCourse() {
       this.$router.push("/course");
     },
+    toCourseDetail(id){
+      this.$router.push("/course/"+id);
+    },
     toManage() {
       this.$router.push("/manage");
     },

+ 15 - 15
src/views/TaskPage/TaskPage.vue

@@ -2,25 +2,25 @@
   <el-row id="test-page-body">
     <el-col :span="3">
       <el-card style="position: fixed;">
-        <el-menu default-active="1" @select="handleSelect">
+        <el-menu default-active="3" @select="handleSelect">
           <el-menu-item index="0">
             <el-icon>
               <Back/>
             </el-icon>
             <span style="padding-left: 20px">返回首页</span>
           </el-menu-item>
-          <el-menu-item index="1">
-            <el-icon>
-              <Document/>
-            </el-icon>
-            <span style="padding-left: 20px">公开测试</span>
-          </el-menu-item>
-          <el-menu-item index="2">
-            <el-icon>
-              <DocumentChecked/>
-            </el-icon>
-            <span style="padding-left: 20px">我的测试</span>
-          </el-menu-item>
+<!--          <el-menu-item index="1">-->
+<!--            <el-icon>-->
+<!--              <Document/>-->
+<!--            </el-icon>-->
+<!--            <span style="padding-left: 20px">公开测试</span>-->
+<!--          </el-menu-item>-->
+<!--          <el-menu-item index="2">-->
+<!--            <el-icon>-->
+<!--              <DocumentChecked/>-->
+<!--            </el-icon>-->
+<!--            <span style="padding-left: 20px">我的测试</span>-->
+<!--          </el-menu-item>-->
           <el-menu-item index="3">
             <el-icon>
               <DocumentChecked/>
@@ -254,10 +254,10 @@ const options = [
 ];
 export default {
   name: "TestPage",
-  components: {TestCard, Back, Document, DocumentChecked,},
+  components: {TestCard, Back, DocumentChecked,},
   data() {
     return {
-      activeIndex: "1",
+      activeIndex: "3",
       evalExamList: [],
       coderExamList: [],
       evalExamList_my: [],