Prevalence 7 лет назад
Родитель
Сommit
40a3eafc4a

+ 41 - 0
package-lock.json

@@ -3602,6 +3602,16 @@
       "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
       "dev": true
     },
+    "clipboard": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz",
+      "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==",
+      "requires": {
+        "good-listener": "1.2.2",
+        "select": "1.1.2",
+        "tiny-emitter": "2.1.0"
+      }
+    },
     "clipboardy": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz",
@@ -4815,6 +4825,11 @@
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
       "dev": true
     },
+    "delegate": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
+      "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
+    },
     "delegates": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@@ -7296,6 +7311,14 @@
         "minimatch": "3.0.4"
       }
     },
+    "good-listener": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
+      "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
+      "requires": {
+        "delegate": "3.2.0"
+      }
+    },
     "graceful-fs": {
       "version": "4.1.15",
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
@@ -13912,6 +13935,11 @@
         }
       }
     },
+    "select": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
+      "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0="
+    },
     "select-hose": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -15254,6 +15282,11 @@
       "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
       "dev": true
     },
+    "tiny-emitter": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
+      "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
+    },
     "tmp": {
       "version": "0.0.33",
       "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -15879,6 +15912,14 @@
       "integrity": "sha512-ZYwNuMcT9a1MvD0/YwJOLoM+mWd8+sLIw9eJgrDLZ8dcwW51nOxPPkJRZIul7FUibjsZX0JGJ+1f8MSGUdbxaA==",
       "dev": true
     },
+    "vue-clipboard2": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.0.tgz",
+      "integrity": "sha512-6/Y9NJErWb4LNBLMgsJSdKb7KpF6/jqXagvKlYut6VQzQsNj6515FpwH0r5hhmeJMqaPzf1kxAw8L8Qvw/QBJQ==",
+      "requires": {
+        "clipboard": "2.0.4"
+      }
+    },
     "vue-eslint-parser": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",

+ 1 - 0
package.json

@@ -18,6 +18,7 @@
     "register-service-worker": "^1.5.2",
     "vue": "^2.5.17",
     "vue-chartjs": "^3.4.0",
+    "vue-clipboard2": "^0.3.0",
     "vue-flatpickr-component": "^8.1.1",
     "vue-markdown": "^2.2.4",
     "vue-router": "^3.0.1",

+ 11 - 0
src/api/assignment.js

@@ -219,6 +219,17 @@ export const getDocAssignmentListByCrs = courseId => {
   return request(`${ASSIGNMENT_MODULE}/student/course/${courseId}/document`);
 };
 
+/**
+ * 学生查看文档作业详细信息
+ * @param documentId
+ * @returns {Promise<{data:DocumentSerializerType}>}
+ */
+export const getDocAssignmentContentByDocId = documentId => {
+  return request(
+    `${ASSIGNMENT_MODULE}/student/document/result/${documentId}/content`
+  );
+};
+
 /**
  * 学生查看单个文档作业信息
  * @param documentId

+ 2 - 2
src/api/codehw.js

@@ -66,9 +66,9 @@ export const getLatestBuildInfoList = (projectId, limit = 5) => {
  * @param {string|number} projectId
  * @return {Promise<{id:string,data:DeploySerializerType[]}>}
  */
-export const getLatestDeployInfoList = (projectId, limit = 5) => {
+export const getLatestDeployInfoList = (projectId, limit = 5, success = 1) => {
   return request(
-    `${CODE_HOMEWORK_MODULE}/project/deploy/record/${projectId}?limit=${limit}`
+    `${CODE_HOMEWORK_MODULE}/project/deploy/record/${projectId}?limit=${limit}&success=${success}`
   );
 };
 

+ 1 - 6
src/components/PageHeader/index.jsx

@@ -25,7 +25,7 @@ export default {
   },
   mixins: [pathMixin],
   render() {
-    const { prefix, course, routes = [], tabList = [], loading } = this;
+    const { prefix, routes = [], tabList = [], loading } = this;
     const { logo, title, action, content, extraContent } = this.$slots;
     const showTabs = tabList && tabList.length > 0;
     return (
@@ -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/layouts/courseLayouts/LayoutStructure.vue

@@ -87,7 +87,7 @@ $top-section-height: 4.25rem;
 .menu-section {
   //min-width: $menu-width;
   //width: $left-width-calc;
-  width: 280px;
+  min-width: 280px;
   /*background: white;*/
   /*border-right: 3px solid rgb(159, 148, 254);*/
   padding-left: $left-padding-calc;

+ 3 - 0
src/main.js

@@ -10,6 +10,8 @@ import VueFlatPickr from "vue-flatpickr-component";
 import "flatpickr/dist/flatpickr.css";
 import flatpickr from "../node_modules/flatpickr";
 import { Mandarin } from "../node_modules/flatpickr/dist/l10n/zh.js";
+import VueClipboard from "vue-clipboard2";
+
 // date picker
 flatpickr.setDefaults({
   enableTime: true,
@@ -24,6 +26,7 @@ Vue.config.productionTip = false;
 Vue.use(Vuelidate);
 Vue.use(Buefy);
 Vue.use(VueFlatPickr);
+Vue.use(VueClipboard);
 
 new Vue({
   router,

+ 4 - 0
src/router/routes.js

@@ -236,6 +236,10 @@ export default [
         path: "document/:documentId",
         component: () => import("@/views/student/Document/detail")
       },
+      {
+        path: "document/:documentId/content/:groupWorkId",
+        component: () => import("@/views/student/Document/docContent")
+      },
       {
         path: "review",
         component: () => import("@/views/student/Review")

+ 90 - 45
src/views/student/Code/ProjectDetail/DeployDetail.vue

@@ -6,7 +6,11 @@
       </div>
       <div class="select-mirror" v-if="deployStatus != 'RUNNING'">
         <div class="latest-build">
-          <div class="test-item" :key="item.id" v-for="item in latestBuildList">
+          <div
+            class="test-item"
+            :key="`b${item.id}`"
+            v-for="item in latestBuildList"
+          >
             <div>
               <b-radio v-model="radio" :native-value="`b${item.id}`"> </b-radio>
               <strong>构建ID: #</strong> {{ item.id }}
@@ -18,7 +22,7 @@
           </div>
           <div
             class="test-item"
-            :key="item.id"
+            :key="`d${item.id}`"
             v-for="item in latestDeployList"
           >
             <div>
@@ -71,8 +75,13 @@
       <div class="deploy-item">
         <div class="subtitle">部署输出信息</div>
         <a
-          class="button is-small is-info"
-          @click="unfoldDeployLogInfo = !unfoldDeployLogInfo"
+          :class="[
+            'button',
+            'is-small',
+            'is-info',
+            { 'is-loading': isfetchLog }
+          ]"
+          @click="getDeployLogInfo"
         >
           {{ unfoldDeployLogInfo ? "收起部署详细信息" : "查看部署详细信息" }}</a
         >
@@ -85,7 +94,7 @@
 </template>
 <script>
 import {
-  getDeployDetail,
+  // getDeployDetail,
   getDeployLogInfo,
   getLatestBuildInfoList,
   makeDeploy,
@@ -99,13 +108,15 @@ export default {
       isRunning: false,
       deployStatus: "",
       deployInfo: {},
-      haveDeployRecord: false,
+      // haveDeployRecord: false,
       deployLog: "",
       unfoldDeployLogInfo: false,
       latestBuildList: [],
       latestDeployList: [],
       latestMirrorIdList: [],
-      radio: -1
+      radio: -1,
+      isfetchLog: false,
+      latestDeployId: 0
     };
   },
   props: {
@@ -119,41 +130,42 @@ export default {
     }
   },
   watch: {
-    projectDetail: function(newVal) {
-      console.log(newVal);
+    projectDetail: function() {
+      // console.log(newVal);
       //获取最新一次部署详细信息
-      if (newVal.latestDeploy && newVal.latestDeploy.id) {
-        this.haveDeployRecord = true;
-        this.getLatestDeployInfo(newVal.latestDeploy.id);
-        // this.getLatestDeployInfo(17);
-        this.getDeployLogInfo(this.projectDetail.latestDeploy.id);
-      }
+      // if (newVal.latestDeploy && newVal.latestDeploy.id) {
+      //   // this.haveDeployRecord = true;
+      //
+      //   // this.getDeployLogInfo(this.projectDetail.latestDeploy.id);
+      // }
+      this.getLatestDeployInfo();
       this.getLatestBuildInfo(this.projectDetail && this.projectDetail.id, 5);
       this.getLastNDeployInfoList(
         this.projectDetail && this.projectDetail.id,
-        5
+        5,
+        1
       );
     }
   },
   mounted() {
-    if (this.projectDetail.latestDeploy) {
-      this.getLatestDeployInfo(this.projectDetail.latestDeploy.id);
-      this.getDeployLogInfo(this.projectDetail.latestDeploy.id);
-    }
     if (this.projectDetail.id) {
       this.getLatestBuildInfo(this.projectDetail.id, 5);
-      this.getLastNDeployInfoList(this.projectDetail.id, 5);
+      this.getLastNDeployInfoList(this.projectDetail.id, 5, 1);
+      this.getLatestDeployInfo();
     }
   },
   methods: {
-    //获取最新一次部署详细信息
-    getLatestDeployInfo(deployId) {
-      getDeployDetail(deployId)
+    //获取最新一次部署信息
+    getLatestDeployInfo() {
+      getLatestDeployInfoList(this.projectDetail.id, 1, 0)
         .then(res => {
-          this.deployInfo = res.data;
-          this.deployStatus = res.data.status;
-          let isRunning = this.deployStatus == "RUNNING" ? true : false;
-          this.isRunning = isRunning;
+          if (res.data && res.data.length > 0) {
+            this.latestDeployId = res.data[0].id;
+            this.deployInfo = res.data[0];
+            this.deployStatus = res.data[0].status;
+            let isRunning = this.deployStatus == "RUNNING" ? true : false;
+            this.isRunning = isRunning;
+          }
         })
         .catch(e => {
           this.$toast.open({
@@ -162,6 +174,22 @@ export default {
           });
         });
     },
+    //获取最新一次部署详细信息
+    // getLatestDeployInfo(deployId) {
+    //   getDeployDetail(deployId)
+    //     .then(res => {
+    //       this.deployInfo = res.data;
+    //       this.deployStatus = res.data.status;
+    //       let isRunning = this.deployStatus == "RUNNING" ? true : false;
+    //       this.isRunning = isRunning;
+    //     })
+    //     .catch(e => {
+    //       this.$toast.open({
+    //         message: e.message || "服务器未知错误",
+    //         type: "is-danger"
+    //       });
+    //     });
+    // },
     //处理时间格式
     handleTime(time) {
       if (!time) {
@@ -186,17 +214,25 @@ export default {
           replicas: 1
         })
           .then(res => {
-            console.log(res);
+            if (res.data.status == "SUCCESS") {
+              this.$toast.open({
+                message: "不要重复部署哦~",
+                type: "is-warning"
+              });
+              return;
+            }
+            // console.log(res);
             this.$toast.open({
               message: "开始部署",
               type: "is-success"
             });
             this.isRunning = true;
-            setTimeout(() => {
-              this.getLatestDeployInfo(this.projectDetail.latestDeploy.id);
-            }, 1000);
+            this.deployInfo = res.data;
+            // setTimeout(() => {
+            //   this.getLatestDeployInfo(this.projectDetail.latestDeploy.id);
+            // }, 1000);
           })
-          .then(e => {
+          .catch(e => {
             this.$toast.open({
               message: e.message || "服务器未知错误",
               type: "is-danger"
@@ -205,8 +241,8 @@ export default {
       }
     },
     //获取最近n次部署成功记录
-    getLastNDeployInfoList(projectId, limit) {
-      getLatestDeployInfoList(projectId, limit)
+    getLastNDeployInfoList(projectId, limit, success) {
+      getLatestDeployInfoList(projectId, limit, success)
         .then(res => {
           this.latestDeployList = res.data;
           // this.latestMirrorIdList = this.latestMirrorIdList.concat(res.data);
@@ -233,17 +269,26 @@ export default {
         });
     },
     //获取部署日志
-    getDeployLogInfo(deployId) {
-      getDeployLogInfo(deployId)
-        .then(res => {
-          this.deployLog = res.data;
-        })
-        .catch(e => {
-          this.$toast.open({
-            message: e.message || "服务器未知错误",
-            type: "is-danger"
+    getDeployLogInfo() {
+      if (this.unfoldDeployLogInfo) {
+        this.unfoldDeployLogInfo = false;
+      } else {
+        let deployId = this.latestDeployId;
+        this.isfetchLog = true;
+        getDeployLogInfo(deployId)
+          .then(res => {
+            this.deployLog = res.data;
+            this.unfoldDeployLogInfo = true;
+            this.isfetchLog = false;
+          })
+          .catch(e => {
+            this.isfetchLog = false;
+            this.$toast.open({
+              message: e.message || "服务器未知错误",
+              type: "is-danger"
+            });
           });
-        });
+      }
     },
     //部署类型
     type(value) {

+ 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>

+ 14 - 3
src/views/student/Code/ProjectDetail/Test/UnitTestDetail.vue

@@ -18,16 +18,26 @@
         单元测试 #{{ 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>
       </template>
     </page-header>
-    <div class="console-section">{{ testDetail.consoleOutput }}</div>
+    <!--<div class="console-section">{{ testDetail.consoleOutput }}</div>-->
     <page-body>
       <div v-if="testDetailLoading"><page-section-loading show /></div>
       <div v-else>
+        <div class="gap-section">
+          <div class="page-section">
+            <a class="button is-small is-info" @click="showLog = !showLog">{{
+              showLog ? "收起控制台信息" : "查看控制台输出"
+            }}</a>
+            <div class="console-section" v-if="showLog">
+              {{ testDetail.consoleOutput }}
+            </div>
+          </div>
+        </div>
         <div
           v-for="item in testDetail.detail"
           :key="item.id"
@@ -64,7 +74,8 @@ export default {
   data() {
     return {
       testDetail: { detail: [] },
-      testDetailLoading: false
+      testDetailLoading: false,
+      showLog: false
     };
   },
   mixins: [timeMixins],

+ 15 - 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 v-if="item.status == 1" :pass="item.passAll" />
           <span style="padding-left: 10px">{{
             displayUnixTime(item.time)
           }}</span>
@@ -52,7 +52,7 @@
           tag="div"
         >
           <div><strong>FUNCTIONAL TEST : #</strong> {{ item.id }}</div>
-          <pass-tag :pass="item.isPassAll" />
+          <pass-tag v-if="item.status == 1" :pass="item.passAll" />
           <span style="padding-left: 10px">{{
             displayUnixTime(item.time)
           }}</span>
@@ -67,8 +67,12 @@ import PassTag from "@/views/student/Code/ProjectDetail/components/PassTag";
 import timeMixins from "@/mixins/time";
 import { makeFunctionalTest } from "@/api/codehw";
 import PageSectionLoading from "@/components/PageBody/PageSectionLoading/index";
+
 export default {
-  components: { PageSectionLoading, PassTag },
+  components: {
+    PageSectionLoading,
+    PassTag
+  },
   props: {
     projectDetail: {
       type: Object,
@@ -98,6 +102,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;

+ 17 - 0
src/views/student/Code/ProjectDetail/index.vue

@@ -32,6 +32,9 @@
       <template slot="content">
         <strong>git 地址 : </strong>
         <a :href="projectDetail.url" target="_blank">{{ projectDetail.url }}</a>
+        <a style="margin-left:10px;" class="button is-small" v-clipboard:copy="projectDetail.url"
+           v-clipboard:success="onCopy"
+           v-clipboard:error="onError">复制地址</a>
       </template>
     </page-header>
     <page-body>
@@ -58,6 +61,20 @@ export default {
       detailLoading: false
     };
   },
+  methods: {
+    onCopy() {
+      this.$toast.open({
+        message: "复制成功",
+        type: "is-success"
+      });
+    },
+    onError() {
+      this.$toast.open({
+        message: "复制失败",
+        type: "is-danger"
+      });
+    }
+  },
   async mounted() {
     const { projectId } = this.$route.params;
     this.detailLoading = true;

+ 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>

+ 6 - 0
src/views/student/Document/detail.vue

@@ -60,6 +60,12 @@
               <div class="subtitle is-6">{{ docResult.url }}</div>
             </div>
           </div>
+          <div class="columns is-desktop" v-show="isAvailable">
+            <div class="column">
+              <h5 class="title is-5">查看文档内容</h5>
+              <div class="subtitle is-6"><router-link :to="{path: `${$route.path}/content/${docResult.id}`}">查看文档内容</router-link></div>
+            </div>
+          </div>
           <div class="columns is-desktop" v-show="isAvailable">
             <div class="column">
               <h5 class="title is-5">题目描述</h5>

+ 130 - 0
src/views/student/Document/docContent.vue

@@ -0,0 +1,130 @@
+<template>
+  <div>
+    <page-header
+      :loading="loadingDocContent"
+      :routes="[
+        { name: '文档作业', path: 'document' },
+        {
+          name: `作业详情`,
+          path: `document/${$route.params.documentId}`
+        },
+        { name: `文档内容`, path: `${$route.path}` }
+      ]"
+    >
+      <template slot="title">
+        文档内容
+      </template>
+      <template slot="content">
+        题目名称:{{ contentResult.name }} <br />
+        <br />
+      对应提交: <b-tag type="is-primary">{{contentResult.gitCommit ? contentResult.gitCommit.substring(0,8) : '暂无commit记录' }}</b-tag>
+          <a class="button is-small" v-clipboard:copy="message"
+                  v-clipboard:success="onCopy"
+                  v-clipboard:error="onError" style="margin-left:10px;">复制</a>
+      <br/><br/>
+        小组成员:<span
+          v-for="member in contentResult.group.members"
+          :key="member.id"
+          >{{ member.username }}&emsp;</span
+        >
+      </template>
+      <template slot="extraContent">
+        <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>
+      <div class="data-table">
+        <page-section-loading :show="loadingDocContent" />
+        <div v-if="!loadingDocContent" class="page-section">
+          <div v-if="contentResult.content" class="content">
+            <vue-markdown>{{ contentResult.content }}</vue-markdown>
+          </div>
+        </div>
+      </div>
+    </page-body>
+  </div>
+</template>
+
+<script>
+import PageHeader from "@/components/PageHeader";
+import PageBody from "@/components/PageBody/index";
+import { getDocAssignmentContentByDocId } from "@/api/assignment";
+import VueMarkdown from "vue-markdown";
+import PageSectionLoading from "@/components/PageBody/PageSectionLoading/index";
+import timeMixins from "@/mixins/time";
+export default {
+  mixins: [timeMixins],
+  components: {
+    PageBody,
+    PageHeader,
+    VueMarkdown,
+    PageSectionLoading
+  },
+  methods: {
+    onCopy() {
+      this.$toast.open({
+        message: "复制成功",
+        type: "is-success"
+      });
+    },
+    onError() {
+      this.$toast.open({
+        message: "复制失败",
+        type: "is-danger"
+      });
+    }
+  },
+  data() {
+    return {
+      contentResult: {
+        content: "",
+        group: "",
+        result: null,
+        lastUpdateAt: "",
+        name: "",
+        message: ""
+      },
+      loadingDocContent: false
+    };
+  },
+
+  mounted() {
+    this.loadingDocContent = true;
+    const { groupWorkId } = this.$route.params;
+    getDocAssignmentContentByDocId(groupWorkId).then(res => {
+      this.contentResult = res.data;
+      this.message = res.data.gitCommit;
+      this.loadingDocContent = false;
+    });
+  }
+};
+</script>
+<style lang="scss" scoped>
+@import "../../../assets/scss/app";
+.right-part {
+  margin-bottom: -1.5rem;
+  margin-right: -1.5rem;
+  background: white;
+  border-top: 1px solid #eff2f7;
+  /*position: sticky;*/
+  top: 0;
+  /*max-height: 100vh;*/
+  /*overflow-y: auto;*/
+  box-shadow: $default-shadow;
+}
+
+.action-button {
+  width: 100%;
+  border-radius: 0;
+}
+</style>

+ 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>

+ 3 - 3
src/views/student/Review/ReviewDocDetail/index.vue

@@ -142,10 +142,10 @@ export default {
   margin-right: -1.5rem;
   background: white;
   border-top: 1px solid #eff2f7;
-  position: sticky;
+  /*position: sticky;*/
   top: 0;
-  max-height: 100vh;
-  overflow-y: auto;
+  /*max-height: 100vh;*/
+  /*overflow-y: auto;*/
   box-shadow: $default-shadow;
 }
 

+ 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>

+ 6 - 4
src/views/teacher/Document/docContent.vue

@@ -17,6 +17,9 @@
       <template slot="content">
         题目名称:{{ contentResult.name }} <br />
         <br />
+        对应提交: <b-tag type="is-primary">{{contentResult.gitCommit ? contentResult.gitCommit.substring(0,8) : '暂无commit记录' }}</b-tag>
+        <br/>
+        <br/>
         小组成员:<span
           v-for="member in contentResult.group.members"
           :key="member.id"
@@ -77,7 +80,6 @@ export default {
       loadingDocContent: false
     };
   },
-
   mounted() {
     this.loadingDocContent = true;
     const { groupWorkId } = this.$route.params;
@@ -95,10 +97,10 @@ export default {
   margin-right: -1.5rem;
   background: white;
   border-top: 1px solid #eff2f7;
-  position: sticky;
+  /*position: sticky;*/
   top: 0;
-  max-height: 100vh;
-  overflow-y: auto;
+  /*max-height: 100vh;*/
+  /*overflow-y: auto;*/
   box-shadow: $default-shadow;
 }
 

+ 3 - 3
vue.config.js

@@ -2,9 +2,9 @@ module.exports = {
   devServer: {
     proxy: {
       "^/api": {
-        target: "http://localhost:4000/",
-        // target: "http://10.1.1.198:8080/",
-        // target: "http://192.168.0.101: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/",
 
         ws: true,