فهرست منبع

临时拉取dev, commit

Johnson 7 سال پیش
والد
کامیت
7c8cb3ca56

+ 9 - 0
src/router/routes.js

@@ -71,6 +71,15 @@ export default [
       {
         path: "result",
         component: () => import("@/views/teacher/Result")
+      },
+      {
+        path: "code",
+        component: () => import("@/views/teacher/Code")
+      },
+
+      {
+        path: "document",
+        component: () => import("@/views/teacher/Document/index")
       }
     ]
   },

+ 75 - 0
src/views/teacher/Code/index.vue

@@ -0,0 +1,75 @@
+<template>
+  <div>
+    <nav class="breadcrumb" aria-label="breadcrumbs">
+      <ul>
+        <li><router-link :to="{ name: 'HOME' }">所有课程</router-link></li>
+        <li>
+          <router-link :to="`/course-teacher/${course.id}/dashboard`">{{
+            course.name
+          }}</router-link>
+        </li>
+
+        <!--TBM-->
+        <li class="is-active">
+          <router-link :to="`/student-course/${course.id}/question`"
+            >查看题目</router-link
+          >
+        </li>
+      </ul>
+    </nav>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+
+export default {
+  name: "index",
+  components: {},
+  computed: {
+    ...mapState({
+      course: state => state.course.currentCourse
+    })
+  },
+  data() {
+    return {
+      courses: [],
+      review: [],
+      questionType: [
+        { id: 1, title: "文档作业题目" },
+        { id: 2, title: "代码作业题目" }
+      ],
+      data: []
+    };
+  }
+};
+</script>
+
+<style scoped>
+.breadcrumb a {
+  /*color: #7957d5;*/
+  font-weight: bold;
+}
+.data-table {
+  width: 100%;
+  padding: 30px;
+  min-height: 80vh;
+  background-color: #ffffff;
+}
+.question-list {
+  margin-top: 30px;
+}
+.form-group {
+  display: flex;
+  justify-content: space-between;
+}
+.description {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+  word-wrap: break-word;
+  word-break: break-all;
+  display: -webkit-box;
+}
+</style>

+ 9 - 0
src/views/teacher/Document/index.vue

@@ -0,0 +1,9 @@
+<template>
+  <div><h1>Test</h1></div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style scoped></style>

+ 254 - 0
src/views/teacher/Document/one_document.vue

@@ -0,0 +1,254 @@
+<template>
+  <div>
+    <nav class="breadcrumb" aria-label="breadcrumbs">
+      <ul>
+        <li><router-link :to="{ name: 'HOME' }">所有课程</router-link></li>
+        <li>
+          <router-link :to="`/course-teacher/${course.id}/dashboard`">{{
+            course.name
+          }}</router-link>
+        </li>
+
+        <!--TBM-->
+        <li class="is-active">
+          <router-link :to="`/student-course/${course.id}/question`"
+            >文档作业</router-link
+          >
+        </li>
+      </ul>
+    </nav>
+    <!-- container面板-->
+    <div class="data-table">
+      <!--下拉框&搜索框-->
+      <div class="form-group">
+        <!--搜索框-->
+        <b-field>
+          <b-input
+            placeholder="输入关键字查找小组"
+            type="search"
+            icon="magnify"
+          >
+          </b-input>
+        </b-field>
+      </div>
+
+      <div class="submit-state">
+        提交情况:<progress
+          class="process-bar progress is-link"
+          value="30"
+          max="100"
+          >30%</progress
+        >
+        13/52
+      </div>
+
+      <b-tabs>
+        <b-tab-item label="已提交">
+          <div class="question-list">
+            <b-table
+              :data="data"
+              paginated
+              per-page="5"
+              detailed
+              detail-key="id"
+            >
+              <template slot-scope="props">
+                <b-table-column
+                  field="id"
+                  label="小组ID"
+                  width="120"
+                  numeric
+                  sortable
+                  centered
+                >
+                  {{ props.row.id }}
+                </b-table-column>
+
+                <b-table-column label="阶段" centered>
+                  {{ props.row.stage }}
+                </b-table-column>
+
+                <b-table-column label="互评负责组" centered>
+                  {{ props.row.charge }}
+                </b-table-column>
+
+                <b-table-column label="分数" centered>
+                  {{ props.row.score }}
+                </b-table-column>
+                <b-table-column
+                  field="difficulty"
+                  label="详情"
+                  sortable
+                  centered
+                >
+                  {{ props.row.detail }}
+                </b-table-column>
+              </template>
+
+              <template slot="detail">
+                <article class="media">
+                  <!--<figure class="media-left">-->
+                  <!--<p class="image is-64x64">-->
+                  <!--<img src="/static/img/placeholder-128x128.png">-->
+                  <!--</p>-->
+                  <!--</figure>-->
+                  <div class="media-content">
+                    <div class="content">
+                      <p>
+                        <strong>成绩详情</strong>
+                        <small
+                          >这里可以放具体的作业成绩,前面可以放总评啥的</small
+                        >
+                        <br />
+                      </p>
+                    </div>
+                  </div>
+                </article>
+              </template>
+            </b-table></div
+        ></b-tab-item>
+
+        <b-tab-item label="未提交">
+          <b-table
+            :data="unsubmited.data"
+            :columns="unsubmited.columns"
+          ></b-table>
+        </b-tab-item>
+      </b-tabs>
+
+      <!--题目table-->
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+
+const unsubmited = {
+  data: [
+    {
+      id: 1,
+      PM: "Jesse",
+      members: "Simmons\tClarence\tTina\tJohn"
+    },
+    {
+      id: 2,
+      PM: "Jesse",
+      members: "Simmons Clarence Tina John"
+    },
+    {
+      id: 3,
+      PM: "Jesse",
+      members: "Simmons Clarence Tina John"
+    }
+  ],
+  columns: [
+    {
+      field: "id",
+      label: "小组ID",
+      // width: "80",
+      numeric: true,
+      centered: true
+    },
+    {
+      field: "PM",
+      label: "组长"
+    },
+    {
+      field: "members",
+      label: "组员"
+    }
+  ]
+};
+const data = [
+  {
+    id: 1,
+    stage: "互评完成",
+    charge: 2,
+    score: 80,
+    detail: "查看详情"
+  },
+  {
+    id: 2,
+    stage: "正在互评",
+    charge: 2,
+    score: 80,
+    detail: "查看详情"
+  },
+  {
+    id: 3,
+    stage: "互评完成",
+    charge: 2,
+    score: 80,
+    detail: "查看详情"
+  },
+  {
+    id: 4,
+    stage: "互评完成",
+    charge: 2,
+    score: 80,
+    detail: "查看详情"
+  }
+];
+
+export default {
+  components: {},
+  computed: {
+    ...mapState({
+      course: state => state.course.currentCourse
+    })
+  },
+  data() {
+    return {
+      courses: [],
+      review: [],
+      questionType: [
+        { id: 1, title: "文档作业题目" },
+        { id: 2, title: "代码作业题目" }
+      ],
+      data,
+      unsubmited
+    };
+  },
+  mounted() {}
+};
+</script>
+
+<style scoped>
+.breadcrumb a {
+  /*color: #7957d5;*/
+  font-weight: bold;
+}
+.data-table {
+  width: 100%;
+  padding: 30px;
+  min-height: 80vh;
+  background-color: #ffffff;
+}
+.question-list {
+  /*margin-top: 30px;*/
+}
+.form-group {
+  display: flex;
+  justify-content: space-between;
+}
+.description {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+  word-wrap: break-word;
+  word-break: break-all;
+  display: -webkit-box;
+}
+.process-bar {
+  width: 50%;
+  margin-right: 10px;
+}
+.submit-state {
+  display: flex;
+  margin-top: 20px;
+  align-items: center;
+  margin-bottom: 20px;
+}
+</style>

+ 1 - 30
src/views/teacher/Question/index.vue

@@ -49,9 +49,7 @@
           per-page="5"
           detailed
           detail-key="id"
-          @details-open="
-            (row, index) => $toast.open(`Expanded ${row.user.first_name}`)
-          "
+          @details-open="(row, index) => $toast.open(`Expanded ${row.user.PM}`)"
         >
           <template slot-scope="props">
             <b-table-column field="id" label="ID" width="40" numeric sortable>
@@ -118,33 +116,6 @@ import { mapState } from "vuex";
 import { getStudentCourseReviewList } from "@/api/review";
 import { getTeacherQuestions } from "@/api/question";
 
-// const data = [
-//   {
-//     id: 1,
-//     name: "第一题",
-//     description: "这题xxxxxxxx",
-//     difficulty: "easy",
-//     expectTime: 20,
-//     assignmentType: "文档作业"
-//   },
-//   {
-//     id: 2,
-//     name: "第一题",
-//     description: "这题xxxxxxxx",
-//     difficulty: "easy",
-//     expectTime: 25,
-//     assignmentType: "文档作业"
-//   },
-//   {
-//     id: 3,
-//     name: "第一题",
-//     description: "这题xxxxxxxx",
-//     difficulty: "easy",
-//     expectTime: 35,
-//     assignmentType: "文档作业"
-//   }
-// ];
-
 export default {
   components: {},
   computed: {

+ 21 - 21
src/views/teacher/Result/index.vue

@@ -38,7 +38,7 @@
             <b-table-column label="文档作业" centered>
               <div
                 class="result"
-                v-for="item in props.row.documentHomeworkResult"
+                v-for="item in props.row.stage"
                 :key="item.id"
               >
                 {{ item.name }} : {{ item.result }}
@@ -48,7 +48,7 @@
             <b-table-column label="代码作业" centered>
               <div
                 class="result"
-                v-for="item in props.row.codeHomeworkResult"
+                v-for="item in props.row.score"
                 :key="item.id"
               >
                 {{ item.name }} : {{ item.result }}
@@ -58,7 +58,7 @@
             <b-table-column label="互评作业" centered>
               <div
                 class="result"
-                v-for="item in props.row.reviewHomeworkResult"
+                v-for="item in props.row.charge"
                 :key="item.id"
               >
                 {{ item.name }} : {{ item.result }}
@@ -68,10 +68,10 @@
               <span
                 :class="[
                   'tag',
-                  props.row.finalResult > 60 ? 'is-success' : 'is-danger'
+                  props.row.detail > 60 ? 'is-success' : 'is-danger'
                 ]"
               >
-                {{ props.row.finalResult }}
+                {{ props.row.detail }}
               </span>
             </b-table-column>
           </template>
@@ -127,7 +127,7 @@ import { getStudentCourseReviewList } from "@/api/review";
 const data = [
   {
     id: 1,
-    documentHomeworkResult: [
+    stage: [
       {
         id: 1,
         name: "第一次作业",
@@ -144,14 +144,14 @@ const data = [
         result: 99
       }
     ],
-    reviewHomeworkResult: [
+    charge: [
       {
         id: 1,
         name: "第一次作业",
         result: 80
       }
     ],
-    codeHomeworkResult: [
+    score: [
       {
         id: 1,
         name: "第一次作业",
@@ -163,11 +163,11 @@ const data = [
         result: 85
       }
     ],
-    finalResult: 99
+    detail: 99
   },
   {
     id: 2,
-    documentHomeworkResult: [
+    stage: [
       {
         id: 1,
         name: "第一次作业",
@@ -184,14 +184,14 @@ const data = [
         result: 99
       }
     ],
-    reviewHomeworkResult: [
+    charge: [
       {
         id: 1,
         name: "第一次作业",
         result: 80
       }
     ],
-    codeHomeworkResult: [
+    score: [
       {
         id: 1,
         name: "第一次作业",
@@ -203,11 +203,11 @@ const data = [
         result: 85
       }
     ],
-    finalResult: 99
+    detail: 99
   },
   {
     id: 3,
-    documentHomeworkResult: [
+    stage: [
       {
         id: 1,
         name: "第一次作业",
@@ -224,14 +224,14 @@ const data = [
         result: 99
       }
     ],
-    reviewHomeworkResult: [
+    charge: [
       {
         id: 1,
         name: "第一次作业",
         result: 80
       }
     ],
-    codeHomeworkResult: [
+    score: [
       {
         id: 1,
         name: "第一次作业",
@@ -243,11 +243,11 @@ const data = [
         result: 85
       }
     ],
-    finalResult: 99
+    detail: 99
   },
   {
     id: 4,
-    documentHomeworkResult: [
+    stage: [
       {
         id: 1,
         name: "第一次作业",
@@ -264,14 +264,14 @@ const data = [
         result: 99
       }
     ],
-    reviewHomeworkResult: [
+    charge: [
       {
         id: 1,
         name: "第一次作业",
         result: 80
       }
     ],
-    codeHomeworkResult: [
+    score: [
       {
         id: 1,
         name: "第一次作业",
@@ -283,7 +283,7 @@ const data = [
         result: 85
       }
     ],
-    finalResult: 99
+    detail: 99
   }
 ];