瀏覽代碼

修复2.27会议bug

Johnson 7 年之前
父節點
當前提交
f66ada8ff9

+ 1 - 0
mock/serializers/assignment/DocumentContentSerializer.js

@@ -12,6 +12,7 @@ module.exports = () => {
     id: makeId(),
     name: "购物车web项目",
     group: groupSerializer(),
+    result: "A",
     lastUpdateAt: dayjs("2018-10-21").unix(),
     content: makeLongMarkdown()
   };

+ 2 - 2
mock/serializers/assignment/DocumentResultSerializer.js

@@ -23,7 +23,7 @@ module.exports = () => {
     group: groupSerializer(),
     state: "互评中",
     result: "A",
-    url: "https://github.com"
-    // reviewGroup: [1, 2, 3] 不显示,防止学生之间讨论
+    url: "https://github.com",
+    reviewGroup: [groupSerializer(), groupSerializer(), groupSerializer()] //不显示,防止学生之间讨论
   };
 };

+ 3 - 3
src/views/teacher/Code/index.vue

@@ -29,9 +29,9 @@
           detail-key="id"
         >
           <template slot-scope="props">
-            <b-table-column field="id" label="ID" numeric sortable centered>
-              {{ props.row.id }}
-            </b-table-column>
+            <!--<b-table-column field="id" label="ID" numeric sortable centered>-->
+            <!--{{ props.row.id }}-->
+            <!--</b-table-column>-->
 
             <b-table-column label="作业名称" centered>
               <router-link

+ 23 - 4
src/views/teacher/Document/detail.vue

@@ -14,7 +14,9 @@
         题目描述:{{ problem ? problem.description : "" }}
       </template>
       <template slot="extraContent">
-        题目进行阶段:{{ status }}
+        <b-tag type="is-info" style="margin-right: 5px" size="is-medium"
+          >阶段:{{ status }}</b-tag
+        >
       </template>
     </page-header>
 
@@ -45,13 +47,15 @@
                 </b-table-column>
 
                 <b-table-column label="互评负责组" centered>
-                  <span v-for="groupId in props.row.reviewGroup" :key="groupId"
-                    >{{ groupId }}&emsp;</span
+                  <span v-for="group in props.row.reviewGroup" :key="group.id"
+                    >{{ group.id }}&emsp;</span
                   >
                 </b-table-column>
 
                 <b-table-column label="分数" centered>
-                  {{ props.row.result }}
+                  {{
+                    props.row.result === null ? "暂无成绩" : props.row.result
+                  }}
                 </b-table-column>
                 <b-table-column field="difficulty" label="详情" centered
                   ><router-link
@@ -78,6 +82,21 @@
                         <br />
                         <strong>git地址:</strong
                         ><small>{{ props.row.url }}</small> <br />
+                        <strong>互评小组:</strong
+                        ><small>
+                          <li
+                            v-for="reviewGroupp of props.row.reviewGroup"
+                            :key="reviewGroupp.id"
+                          >
+                            ID : {{ reviewGroupp.id }} &emsp; 小组成员:
+                            <small
+                              v-for="member of reviewGroupp.members"
+                              :key="member.id"
+                            >
+                              {{ member.username }}&emsp;
+                            </small>
+                          </li>
+                        </small>
                       </p>
                     </div>
                   </div>

+ 12 - 1
src/views/teacher/Document/docContent.vue

@@ -24,7 +24,17 @@
         >
       </template>
       <template slot="extraContent">
-        上次修改时间:{{ displayUnixTime(contentResult.lastUpdateAt) }}
+        <b-tag type="is-light" style="margin-right: 5px"
+          >上次修改时间:{{
+            displayUnixTime(contentResult.lastUpdateAt)
+          }}</b-tag
+        >
+        <br />
+        <b-tag type="is-info" style="margin-right: 5px" size="is-medium"
+          >成绩:{{
+            contentResult.result === null ? "暂无" : contentResult.result
+          }}</b-tag
+        >
       </template>
     </page-header>
     <page-body>
@@ -60,6 +70,7 @@ export default {
       contentResult: {
         content: "",
         group: "",
+        result: null,
         lastUpdateAt: "",
         name: ""
       },

+ 3 - 3
src/views/teacher/Document/index.vue

@@ -25,9 +25,9 @@
         <div v-if="!loadingDocList" class="data-table">
           <b-table :data="docData" detailed detail-key="id">
             <template slot-scope="props">
-              <b-table-column field="id" label="ID" numeric sortable centered>
-                {{ props.row.id }}
-              </b-table-column>
+              <!--<b-table-column field="id" label="ID" numeric sortable centered>-->
+              <!--{{ props.row.id }}-->
+              <!--</b-table-column>-->
 
               <b-table-column label="作业名称" centered>
                 <router-link

+ 2 - 2
vue.config.js

@@ -2,8 +2,8 @@ module.exports = {
   devServer: {
     proxy: {
       "^/api": {
-        // target: "http://localhost:4000/",
-        target: "http://10.1.1.198:8080/",
+        target: "http://localhost:4000/",
+        // target: "http://10.1.1.198:8080/",
         // target: "http://192.168.0.101:8080",
         // target: "http://10.1.2.3:8080/",