Johnson 7 лет назад
Родитель
Сommit
aa3d55467f

+ 4 - 0
src/router/routes.js

@@ -80,6 +80,10 @@ export default [
       {
         path: "document",
         component: () => import("@/views/teacher/Document/index")
+      },
+      {
+        path: "document/detail",
+        component: () => import("@/views/teacher/Document/detail")
       }
     ]
   },

+ 258 - 0
src/views/teacher/Document/detail.vue

@@ -0,0 +1,258 @@
+<template>
+  <div>
+    <page-header
+      :routes="[
+        { name: '文档作业', path: 'document' },
+        { name: '软件需求规格说明书', path: 'document/detail' }
+      ]"
+    >
+      <template slot="title">
+        Here might be a page title
+      </template>
+      <template slot="content">
+        Here might be a page title
+      </template>
+    </page-header>
+
+    <page-body>
+      <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="submitted-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>
+    </page-body>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import PageHeader from "@/components/PageHeader";
+import PageBody from "@/components/PageBody/index";
+
+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: {
+    PageBody,
+    PageHeader
+  },
+  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;
+}
+.submitted-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>

+ 93 - 2
src/views/teacher/Document/index.vue

@@ -1,9 +1,100 @@
 <template>
-  <div><h1>Test</h1></div>
+  <div>
+    <page-header :routes="[{ name: '文档作业', path: 'document' }]">
+      <template slot="title">
+        文档作业列表
+      </template>
+      <template slot="content">
+        Here might be a page title
+      </template>
+
+      <template slot="action">
+        新建文档作业
+      </template>
+    </page-header>
+    <page-body>
+      <div>
+        <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>
+              <router-link :to="`/course-teacher/:courseId/document/detail`">
+                {{ props.row.name }}</router-link
+              >
+            </b-table-column>
+
+            <b-table-column label="开始时间" centered>
+              {{ props.row.startAt }}
+            </b-table-column>
+
+            <b-table-column label="结束时间" centered>
+              {{ props.row.endAt }}
+            </b-table-column>
+          </template>
+
+          <template slot="detail">
+            <article class="media">
+              <div class="media-content">
+                <div class="content">
+                  <p>
+                    <strong>成绩详情</strong>
+                    <small>这里可以放具体的作业成绩,前面可以放总评啥的</small>
+                    <br />
+                  </p>
+                </div>
+              </div>
+            </article>
+          </template>
+        </b-table>
+      </div>
+    </page-body>
+  </div>
 </template>
 
 <script>
-export default {};
+import PageHeader from "@/components/PageHeader";
+import PageBody from "@/components/PageBody/index";
+const data = [
+  {
+    id: 1,
+    name: "软件需求规格说明书",
+    startAt: "2019-1-1",
+    endAt: "2019-6-1"
+  },
+  {
+    id: 2,
+    name: "软件需求规格说明书",
+    startAt: "2019-1-1",
+    endAt: "2019-6-1"
+  },
+  {
+    id: 3,
+    name: "软件需求规格说明书",
+    startAt: "2019-1-1",
+    endAt: "2019-6-1"
+  }
+];
+export default {
+  components: {
+    PageBody,
+    PageHeader
+  },
+  data() {
+    return {
+      data
+    };
+  }
+};
 </script>
 
 <style scoped></style>

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

@@ -1,254 +0,0 @@
-<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>