Sfoglia il codice sorgente

Merge branch 'hotfix/zhouweilu' of SEEC-II-FrontEnd-Team/SEEC-II-FrontEnd into master

ZhouWeilu 7 anni fa
parent
commit
0d445c816c

+ 0 - 5
src/components/PageHeader/index.jsx

@@ -35,11 +35,6 @@ export default {
             <li>
               <router-link to={{ name: "HOME" }}>所有课程</router-link>
             </li>
-            <li>
-              <router-link to={`${prefix}/dashboard`}>
-                {course.name}
-              </router-link>
-            </li>
             {routes.map((route, index) => (
               <li class={index === routes.length - 1 && "is-active"}>
                 <router-link

+ 1 - 1
src/views/student/Code/ProjectDetail/Test/FunctionalTestDetail.vue

@@ -18,7 +18,7 @@
         页面测试 #{{ testDetail.id }}
       </template>
       <template slot="content">
-        <pass-tag :pass="testDetail.isPassAll" />
+        <pass-tag :pass="testDetail.passAll" />
       </template>
       <template slot="extraContent">
         <div class="tag">{{ displayUnixTime(testDetail.time) }}</div>

+ 16 - 3
src/views/student/Code/ProjectDetail/TestDetail.vue

@@ -15,7 +15,7 @@
           tag="div"
         >
           <div><strong>UNIT TEST : #</strong> {{ item.id }}</div>
-          <pass-tag :pass="item.isPassAll" />
+          <pass-tag :pass="item.passAll" />
           <span style="padding-left: 10px">{{
             displayUnixTime(item.time)
           }}</span>
@@ -30,7 +30,12 @@
           <div
             :class="{ 'is-loading': testing }"
             @click="makeTest"
-            :disabled="!(projectDetail.latestDeploy && projectDetail.latestDeploy.status == 'SUCCESS')"
+            :disabled="
+              !(
+                projectDetail.latestDeploy &&
+                projectDetail.latestDeploy.status == 'SUCCESS'
+              )
+            "
             class="button is-primary test-title__action"
           >
             触发测试
@@ -47,7 +52,7 @@
           tag="div"
         >
           <div><strong>FUNCTIONAL TEST : #</strong> {{ item.id }}</div>
-          <pass-tag :pass="item.isPassAll" />
+          <pass-tag :pass="item.passAll" />
           <span style="padding-left: 10px">{{
             displayUnixTime(item.time)
           }}</span>
@@ -93,6 +98,14 @@ export default {
   mixins: [timeMixins],
   methods: {
     async makeTest() {
+      if (
+        !(
+          this.projectDetail.latestDeploy &&
+          this.projectDetail.latestDeploy.status == "SUCCESS"
+        )
+      ) {
+        return;
+      }
       this.testing = true;
       const deployId = this.projectDetail.latestDeploy.id;
       const { homeworkId, projectId } = this.$route.params;

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

@@ -22,7 +22,9 @@
           v-for="item in codeHomeworkList"
           class="column is-4-desktop"
         >
-          <router-link :to="`${$route.path}/${item.id}`">
+          <router-link
+            :to="item.status == 'READY' ? '' : `${$route.path}/${item.id}`"
+          >
             <card hoverable>
               {{ item.name }}
               <div><code-state-tag :state="item.status"></code-state-tag></div>

+ 4 - 1
src/views/student/Document/index.vue

@@ -22,7 +22,10 @@
           v-for="item in docList"
           class="column is-4-desktop"
         >
-          <router-link :to="{ path: `${$route.path}/${item.id}` }">
+          <router-link
+            :to="item.status == 'READY' ? '' : `${$route.path}/${item.id}`"
+          >
+            <!--:to="{ path: item.state == 'DEFAULT' ? `${$route.path}/${item.id}` : ''}"-->
             <card hoverable>
               {{ item.name }}
               <div>

+ 5 - 1
src/views/student/Review/index.vue

@@ -22,7 +22,11 @@
           v-for="item in review"
           class="column is-4-desktop"
         >
-          <router-link :to="`${$route.path}/${item.reviewId}`">
+          <router-link
+            :to="
+              item.state == 'DEFAULT' ? '' : `${$route.path}/${item.reviewId}`
+            "
+          >
             <card hoverable>
               {{ item.name }}
               <div><review-state-tag :state="item.state" /></div>