Browse Source

修改部分bug

181250114 4 years ago
parent
commit
6a15f017e3
3 changed files with 164 additions and 151 deletions
  1. 66 52
      src/components/Group.vue
  2. 59 59
      src/components/Home.vue
  3. 39 40
      src/components/Student.vue

+ 66 - 52
src/components/Group.vue

@@ -156,51 +156,65 @@
           { name: '处理中', value: 30},
           { name: '已完成', value: 50 }
         ],
-        // group_message:[
-        //   {
-        //   group: 1,
-        //   projects: [
-        //     {projectId:1, projectName:"abc",},
-        //   ],
-        //   members: [
-        //     {userId: 1,studentId:1, name:"aaa"},
-        //     {userId: 2,studentId: 2,name: "bbb"},
-        //   ],
-        //   commit: {
-        //     ["commit-times"]: 0,
-        //     ["valid-commit-times"]: 0,
-        //     ["buglist-commit"]: 0,
-        //     ["feature-commit"]: 0,
-        //     ["commit-msg-overview"]: [
-        //       "haha",
-        //       "init",
-        //     ],
-        //     ["commit-contribution"]: [
-        //       {name: "aaa", times: 0, proportion: 0},
-        //       {name:"bbb",times:1,proportion: 0.1},
-        //     ]
-        //   },
-        //   test: {
-        //     ["interface-test"]: {
-        //       ["interface-test-times"]: 0,
-        //       ["interface-test-concurrency-count"]: 0,
-        //       ["interface-test-concurrency-failure"]: 0,
-        //       ["interface-test-concurrency-pass"]: 0,
-        //       ["interface-test-contribution"]: [
-        //         {name: "aaa", times: 1, proportion: 0.1},
-        //       ]
-        //     },
-        //   },
-        //   pipeline: {
-        //     ["pipeline-deploy"]:0,
-        //     ["pipeline-pass"]:0,
-        //     ["pipeline-failure"]:0,
-        //     ["pipeline-contribution"]: [
-        //       {name: "aaa", times: 1, proportion: 0.1},
-        //     ]
-        //   },
-        // }],
-        group_message:[],
+        group_message:[
+          {
+          group: 10,
+          projects: [
+            {projectId:1, projectName:"fun_frontEnd",},
+            {projectId:2, projectName:"fun_backEnd",},
+          ],
+          members: [
+            {userId: 11,studentId: 201250076, name:"周棋秋"},
+            {userId: 12,studentId: 201250075,name: "田野"},
+            {userId: 13,studentId: 201250077,name: "金采源"},
+            {userId: 14,studentId: 201250230,name: "李泽玉"},
+          ],
+          commit: {
+            ["commit-times"]: 5,
+            ["valid-commit-times"]: 5,
+            ["buglist-commit"]: 2,
+            ["feature-commit"]: 3,
+            ["commit-msg-overview"]: [
+              "fix: 修改错误",
+              "feat: 增加评论区功能",
+              "feat: 增加头像上传",
+              "fix: 修复登录页面的错误",
+              "feat: 增加优惠券功能",
+            ],
+            ["commit-contribution"]: [
+              {name: "周棋秋", times: 0, proportion: 0},
+              {name:"田野",times:2, proportion: 0.4},
+              {name:"金采源",times:1, proportion: 0.2},
+              {name:"李泽玉",times:2, proportion: 0.4},
+            ]
+          },
+          test: {
+            ["interface-test"]: {
+              ["interface-test-times"]: 5,
+              ["interface-test-concurrency-count"]: 100,
+              ["interface-test-concurrency-failure"]: 20,
+              ["interface-test-concurrency-pass"]: 80,
+              ["interface-test-contribution"]: [
+                {name: "周棋秋", times: 4, proportion: 0.8},
+                {name:"田野",times:0, proportion: 0},
+                {name:"金采源",times:0, proportion: 0},
+                {name:"李泽玉",times:1, proportion: 0.2},
+              ]
+            },
+          },
+          pipeline: {
+            ["pipeline-deploy"]:10,
+            ["pipeline-pass"]:10,
+            ["pipeline-failure"]:0,
+            ["pipeline-contribution"]: [
+              {name: "周棋秋", times: 1, proportion: 0.1},
+              {name:"田野",times:1, proportion: 0.1},
+              {name:"金采源",times:2, proportion: 0.2},
+              {name:"李泽玉",times:6, proportion: 0.6},
+            ]
+          },
+        }],
+        // group_message:[],
         commitPie:[],
         testPie:[],
         deployPie:[],
@@ -216,10 +230,10 @@
 
     async mounted () {
       console.log('here');
-      await this.set_group({
-        groupId: Number(this.$route.params.groupId),
-      })
-      await this.initData(this.groupId);
+      // await this.set_group({
+      //   groupId: Number(this.$route.params.groupId),
+      // })
+      // await this.initData(this.groupId);
       this.getAnalysis();
       this.getCommitPie();
       this.getTestPie();
@@ -298,7 +312,7 @@
           },
           series: [
             {
-              name: 'commit类型',
+              name: 'commit次数',
               center: ['50%', '30%'],
               type: 'pie',    // 设置图表类型为饼图
               radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
@@ -325,7 +339,7 @@
           },
           series: [
             {
-              name: 'commit类型',
+              name: '测试次数',
               center: ['50%', '30%'],
               type: 'pie',    // 设置图表类型为饼图
               radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
@@ -353,7 +367,7 @@
           },
           series: [
             {
-              name: 'commit类型',
+              name: '部署次数',
               center: ['50%', '30%'],
               type: 'pie',    // 设置图表类型为饼图
               radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。

+ 59 - 59
src/components/Home.vue

@@ -59,65 +59,65 @@
     name: "Home",
     data() {
       return {
-          // groups:[
-          //   {
-          //     group: 1,
-          //     projects: [
-          //       {projectId:1, projectName:"abc",},
-          //       {projectId:2, projectName:"aaa",},
-          //     ],
-          //     members: [
-          //       {userId: 1,studentId:1, name:"aaa"},
-          //       {userId: 2,studentId: 2,name: "bbb"},
-          //     ],
-          //   },
-          //   {
-          //     group: 2,
-          //     projects: [
-          //       {projectId:3, projectName:"abc",},
-          //       {projectId:4, projectName:"aaa",},
-          //     ],
-          //     members: [
-          //       {userId: 3,studentId:111, name:"bbbaaa"},
-          //       {userId: 4,studentId: 222,name: "aaabbb"},
-          //     ],
-          //   },
-          //   {
-          //     group: 3,
-          //     projects: [
-          //       {projectId:3, projectName:"abc",},
-          //       {projectId:4, projectName:"aaa",},
-          //     ],
-          //     members: [
-          //       {userId: 3,studentId:111, name:"bbbaaa"},
-          //       {userId: 4,studentId: 222,name: "aaabbb"},
-          //     ],
-          //   },
-          //   {
-          //     group: 4,
-          //     projects: [
-          //       {projectId:3, projectName:"abc",},
-          //       {projectId:4, projectName:"aaa",},
-          //     ],
-          //     members: [
-          //       {userId: 3,studentId:111, name:"bbbaaa"},
-          //       {userId: 4,studentId: 222,name: "aaabbb"},
-          //     ],
-          //   },
-          //   {
-          //     group: 5,
-          //     projects: [
-          //       {projectId:3, projectName:"abc",},
-          //       {projectId:4, projectName:"aaa",},
-          //     ],
-          //     members: [
-          //       {userId: 3,studentId:111, name:"bbbaaa"},
-          //       {userId: 4,studentId: 222,name: "aaabbb"},
-          //     ],
-          //   },
-          // ],
+          groups:[
+            {
+              group: 1,
+              projects: [
+                {projectId:1, projectName:"abc",},
+                {projectId:2, projectName:"aaa",},
+              ],
+              members: [
+                {userId: 1,studentId:1, name:"aaa"},
+                {userId: 2,studentId: 2,name: "bbb"},
+              ],
+            },
+            {
+              group: 2,
+              projects: [
+                {projectId:3, projectName:"abc",},
+                {projectId:4, projectName:"aaa",},
+              ],
+              members: [
+                {userId: 3,studentId:111, name:"bbbaaa"},
+                {userId: 4,studentId: 222,name: "aaabbb"},
+              ],
+            },
+            {
+              group: 3,
+              projects: [
+                {projectId:3, projectName:"abc",},
+                {projectId:4, projectName:"aaa",},
+              ],
+              members: [
+                {userId: 3,studentId:111, name:"bbbaaa"},
+                {userId: 4,studentId: 222,name: "aaabbb"},
+              ],
+            },
+            {
+              group: 4,
+              projects: [
+                {projectId:3, projectName:"abc",},
+                {projectId:4, projectName:"aaa",},
+              ],
+              members: [
+                {userId: 3,studentId:111, name:"bbbaaa"},
+                {userId: 4,studentId: 222,name: "aaabbb"},
+              ],
+            },
+            {
+              group: 5,
+              projects: [
+                {projectId:3, projectName:"abc",},
+                {projectId:4, projectName:"aaa",},
+              ],
+              members: [
+                {userId: 3,studentId:111, name:"bbbaaa"},
+                {userId: 4,studentId: 222,name: "aaabbb"},
+              ],
+            },
+          ],
 
-        groups:[],
+        // groups:[],
         //存储组号和学号
         current_group:-1,
         current_student:-1,
@@ -125,7 +125,7 @@
     },
     async mounted () {
       console.log('here');
-      await this.initData();
+      // await this.initData();
     },
 
     methods: {

+ 39 - 40
src/components/Student.vue

@@ -168,42 +168,41 @@
 
     data() {
       return {
-        // student_message:[{
-        //   name:"sky",
-        //   userId:"MF21320091",
-        //   studentId:"MF21320091",
-        //   group:-1,
-        //   email:"443093653@qq.com",
-        //   project:[
-        //     {projectId:1,projectName:"abc",},
-        //     {projectId:2,projectName:"aaa",},
-        //     {projectId:3,projectName:"123456"},
-        //   ],
-        //   commit: {
-        //     ["commit-times"]: 0,
-        //     ["valid-commit-times"]: 0,
-        //     ["buglist-commit"]: 0,
-        //     ["feature-commit"]: 0,
-        //     ["commit-msg-overview"]: [
-        //       "haha",
-        //       "init",
-        //     ],
-        //   },
-        //   test: {
-        //     ["interface-test"]: {
-        //       ["interface-test-times"]: 0,
-        //       ["interface-test-concurrency-count"]: 0,
-        //       ["interface-test-concurrency-failure"]: 0,
-        //       ["interface-test-concurrency-pass"]: 0,
-        //     },
-        //   },
-        //   pipeline: {
-        //     ["pipeline-deploy"]:0,
-        //     ["pipeline-pass"]:0,
-        //     ["pipeline-failure"]:0,
-        //   },
-        // }],
-        student_message:[],
+        student_message:[{
+          name:"李泽玉",
+          userId:"14",
+          studentId:"201250230",
+          group: 10,
+          email:"443093653@qq.com",
+          project:[
+            {projectId:1, projectName:"fun_frontEnd",},
+            {projectId:2, projectName:"fun_backEnd",},
+          ],
+          commit: {
+            ["commit-times"]: 2,
+            ["valid-commit-times"]: 2,
+            ["buglist-commit"]: 1,
+            ["feature-commit"]: 1,
+            ["commit-msg-overview"]: [
+              "fix: 修复登录页面的错误",
+              "feat: 增加优惠券功能",
+            ],
+          },
+          test: {
+            ["interface-test"]: {
+              ["interface-test-times"]: 1,
+              ["interface-test-concurrency-count"]: 30,
+              ["interface-test-concurrency-failure"]: 10,
+              ["interface-test-concurrency-pass"]: 20,
+            },
+          },
+          pipeline: {
+            ["pipeline-deploy"]:6,
+            ["pipeline-pass"]:6,
+            ["pipeline-failure"]:0,
+          },
+        }],
+        // student_message:[],
 
         visible1: false,
         commitAnalysis:[],
@@ -226,7 +225,7 @@
       await this.set_student({
         studentId: Number(this.$route.params.studentId),
       })
-      await this.initData(this.studentId);
+      // await this.initData(this.studentId);
       console.log("-----");
       console.log(this.student_message[0])
       this.getAnaylysis();
@@ -348,7 +347,7 @@
             },
             series: [
               {
-                name: 'commit类型',
+                name: 'commit次数',
                 type: 'pie',    // 设置图表类型为饼图
                 radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
                 data: this.commitAnalysis,
@@ -375,7 +374,7 @@
             },
             series: [
               {
-                name: '接口测试通过率',
+                name: '测试次数',
                 type: 'pie',    // 设置图表类型为饼图
                 radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
                 data: this.testAnalysis,
@@ -402,7 +401,7 @@
             },
             series: [
               {
-                name: '部署通过率',
+                name: '部署次数',
                 type: 'pie',    // 设置图表类型为饼图
                 radius: '55%',  // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
                 data: this.deployAnalysis,