181250114 4 лет назад
Родитель
Сommit
0a25df2b2a

+ 9 - 2
src/components/Analysis/AnalysisGroupCard.vue

@@ -202,8 +202,13 @@ import {getGroupAnalysis,getGroupScore} from "@/api/analysis/devcloud.js";
 
 export default {
   name: "AnalysisGroupCard",
+  props:{
+    "num": {type:Number,default:1},
+  },
   data() {
     return {
+      userId: this.num,
+
       commitContribution: [
         { name: "zqq", times: 0, proportion: 0 },
         { name: "ty", times: 2, proportion: 0.4 },
@@ -300,7 +305,8 @@ export default {
         let res = await getGroupAnalysis({
           params: {
             // user_id: this.$route.params.id,
-            user_id: 1575,
+            // user_id: 1575,
+            user_id: this.userId,
           },
         });
         // console.log(res);
@@ -329,7 +335,8 @@ export default {
         let res1 = await getGroupScore({
           params: {
             // user_id: this.$route.params.id,
-            user_id: 1575,
+            // user_id: 1575,
+            user_id: this.userId,
           }
         });
         // console.log(res1);

+ 9 - 2
src/components/Analysis/AnalysisStudentCard.vue

@@ -236,8 +236,13 @@ import { getStudentAnalysis,getStudentScore } from "@/api/analysis/devcloud.js";
 
 export default {
   name: "AnalysisStudentCard",
+  props:{
+    "num": {type:Number,default:1},
+  },
   data() {
     return {
+      userId: this.num,
+
       visible1: false,
       commitAnalysis: [],
       visible2: false,
@@ -275,7 +280,8 @@ export default {
         let res = await getStudentAnalysis({
           params: {
             // user_id: this.$route.params.id,
-            user_id: 1575,
+            // user_id: 1575,
+            user_id: this.userId,
           },
         });
         // console.log(res);
@@ -295,7 +301,8 @@ export default {
         let res1 = await getStudentScore({
           params: {
             // user_id: this.$route.params.id,
-            user_id: 1575,
+            // user_id: 1575,
+            user_id: this.userId,
           }
         });
         // console.log(res1);

+ 2 - 2
src/views/ProjectPage/ProjectPage.vue

@@ -95,11 +95,11 @@
         </div>
 
         <div v-if="this.activeIndex === '3'">
-            <AnalysisStudentCard/>
+            <AnalysisStudentCard :num="1757"/>
         </div>
 
         <div v-if="this.activeIndex === '4'">
-          <AnalysisGroupCard/>
+          <AnalysisGroupCard :num="1626"/>
         </div>
 
       </el-card>