Johnson 7 år sedan
förälder
incheckning
f689f1d316

+ 4 - 2
src/views/student/Code/ProjectDetail/BuildDetail.vue

@@ -12,14 +12,16 @@
             <div class="level-left">
               <build-tag :build-state="item.buildState" />
               <strong style="padding-left: 10px">
-                {{ item.commitMessage }} · #{{ item.branchId }}
+                {{ item.commitMessage }} · #构建ID:{{ item.id }}
               </strong>
             </div>
             <div v-if="item.buildState === 1" class="level-right">
               <strong>mirror : {{ item.mirrorId }}</strong>
             </div>
           </div>
-          <div class="code-section">{{ item.buildMessage }}</div>
+          <div class="code-section">
+            {{ item.buildMessage }} 构建时间: {{ item.time }}ms
+          </div>
         </div>
       </div>
     </div>

+ 1 - 1
src/views/student/Code/ProjectList/index.vue

@@ -22,7 +22,7 @@
           v-for="item in projectList"
           class="column is-4"
         >
-          <router-link :to="`${$route.path}/${item.projectId}`">
+          <router-link :to="`${$route.path}/${item.id}`">
             <card hoverable>{{ item.name }}</card>
           </router-link>
         </div>

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

@@ -18,12 +18,12 @@
         </div>
         <div
           v-else
-          :key="item.homeworkId"
+          :key="item.id"
           v-for="item in codeHomeworkList"
           class="column is-4-desktop"
         >
-          <router-link :to="`${$route.path}/${item.homeworkId}`">
-            <card hoverable>{{ item.description }}</card>
+          <router-link :to="`${$route.path}/${item.id}`">
+            <card hoverable>{{ item.name }}</card>
           </router-link>
         </div>
       </div>

+ 5 - 18
src/views/teacher/Result/index.vue

@@ -313,25 +313,12 @@ export default {
       });
     }
   },
-  mounted() {
+  async mounted() {
     //获取成绩信息
-    let getResultIntervel = setInterval(() => {
-      if (this.course.id) {
-        clearInterval(getResultIntervel);
-        getStudentFinaleResult(this.course.id)
-          .then(res => {
-            this.data = res.data;
-            this.isResultLoading = false;
-          })
-          .catch(e => {
-            this.isResultLoading = false;
-            this.$toast.open({
-              message: e.message || "服务器错误,请稍后再试",
-              type: "is-danger"
-            });
-          });
-      }
-    }, 800);
+    const resultData = await getStudentFinaleResult(
+      this.$route.params.courseId
+    );
+    this.data = resultData;
     //统计学生分数
     let studentResultStatistics = this.studenResultStatistics(this.data);
     //绘制图表

+ 1 - 1
vue.config.js

@@ -4,7 +4,7 @@ module.exports = {
       "^/api": {
         target: "http://localhost:4000/",
         // target: "http://10.1.1.198:8080/",
-        // target: "http://10.1.2.3:8080/",
+
         ws: true,
         changeOrigin: true
       }