|
|
@@ -1,15 +1,15 @@
|
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
|
<div class="main">
|
|
|
-<!-- 小组信息-->
|
|
|
+ <!-- 小组信息-->
|
|
|
<el-card class="box-card">
|
|
|
<template v-slot:header class="clearfix">
|
|
|
<span>小组信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="小组总得分">{{
|
|
|
+ <el-descriptions-item label="小组总得分:">{{
|
|
|
totalScore
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="额外得分bonus">{{
|
|
|
+ <el-descriptions-item label="额外得分bonus:">{{
|
|
|
bonus
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -47,13 +47,36 @@
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
-<!-- commit信息-->
|
|
|
+ <!-- 图表-->
|
|
|
+ <el-card class="box-card" style="margin-top: 20px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6">
|
|
|
+ <p class="table_font">commit贡献占比</p>
|
|
|
+ <div id="main1" class="pie"
|
|
|
+ /></el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <p class="table_font">流水线部署贡献占比</p>
|
|
|
+ <div id="main2" class="pie"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <p class="table_font">缺陷贡献占比</p>
|
|
|
+ <div id="main3" class="pie"
|
|
|
+ /></el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <p class="table_font">需求树贡献占比</p>
|
|
|
+ <div id="main4" class="pie"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <!-- commit信息-->
|
|
|
<el-card class="box-card" style="margin-top: 20px">
|
|
|
<template v-slot:header class="clearfix">
|
|
|
<span>commit信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="1">
|
|
|
- <el-descriptions-item label="commit得分">{{
|
|
|
+ <el-descriptions-item label="commit得分:">{{
|
|
|
commitScore
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -62,16 +85,16 @@
|
|
|
<span>commit统计信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="commit总次数">{{
|
|
|
+ <el-descriptions-item label="commit总次数:">{{
|
|
|
commitMessage.commit_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="有效commit次数">{{
|
|
|
+ <el-descriptions-item label="有效commit次数:">{{
|
|
|
commitMessage.valid_commit_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="bugList_commit次数">{{
|
|
|
+ <el-descriptions-item label="bugList_commit次数:">{{
|
|
|
commitMessage.buglist_commit
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="feature_commit次数">{{
|
|
|
+ <el-descriptions-item label="feature_commit次数:">{{
|
|
|
commitMessage.feature_commit
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -89,13 +112,13 @@
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
-<!-- bug信息-->
|
|
|
+ <!-- bug信息-->
|
|
|
<el-card class="box-card" style="margin-top: 20px">
|
|
|
<template v-slot:header class="clearfix">
|
|
|
<span>缺陷信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="1">
|
|
|
- <el-descriptions-item label="缺陷得分">{{
|
|
|
+ <el-descriptions-item label="缺陷得分:">{{
|
|
|
bugScore
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -104,25 +127,25 @@
|
|
|
<span>缺陷统计信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="缺陷数目">{{
|
|
|
+ <el-descriptions-item label="缺陷数目:">{{
|
|
|
bugList.bug_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="高优先级缺陷数目">{{
|
|
|
+ <el-descriptions-item label="高优先级缺陷数目:">{{
|
|
|
bugList.high_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="已经修复的缺陷数目">{{
|
|
|
+ <el-descriptions-item label="已经修复的缺陷数目:">{{
|
|
|
bugList.finished_times
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
-<!-- treeNode信息-->
|
|
|
+ <!-- treeNode信息-->
|
|
|
<el-card class="box-card" style="margin-top: 20px">
|
|
|
<template v-slot:header class="clearfix">
|
|
|
<span>需求树信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="1">
|
|
|
- <el-descriptions-item label="需求得分">{{
|
|
|
+ <el-descriptions-item label="需求得分:">{{
|
|
|
nodeScore
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -131,25 +154,25 @@
|
|
|
<span>需求统计信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="需求节点数目">{{
|
|
|
+ <el-descriptions-item label="需求节点数目:">{{
|
|
|
treeNode.treeNode_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="高优先级需求数目">{{
|
|
|
+ <el-descriptions-item label="高优先级需求数目:">{{
|
|
|
treeNode.high_treeNode_times
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="已经完成的需求数目">{{
|
|
|
+ <el-descriptions-item label="已经完成的需求数目:">{{
|
|
|
treeNode.finished_treeNode_times
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
-<!-- 部署信息-->
|
|
|
+ <!-- 部署信息-->
|
|
|
<el-card class="box-card" style="margin-top: 20px">
|
|
|
<template v-slot:header class="clearfix">
|
|
|
<span>流水线部署信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="1">
|
|
|
- <el-descriptions-item label="部署得分">{{
|
|
|
+ <el-descriptions-item label="部署得分:">{{
|
|
|
pipelineScore
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
@@ -158,378 +181,416 @@
|
|
|
<span>部署统计信息</span>
|
|
|
</template>
|
|
|
<el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="流水线部署次数">{{
|
|
|
+ <el-descriptions-item label="流水线部署次数:">{{
|
|
|
arrange.pipeline_deploy
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="流水线部署成功次数">{{
|
|
|
+ <el-descriptions-item label="流水线部署成功次数:">{{
|
|
|
arrange.pipeline_pass
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="流水线部署失败次数">{{
|
|
|
+ <el-descriptions-item label="流水线部署失败次数:">{{
|
|
|
arrange.pipline_failure
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
-<!-- 图表-->
|
|
|
- <el-card class="box-card" style="margin-top: 20px">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="6">
|
|
|
- <p class="table_font">commit贡献占比</p>
|
|
|
- <div id="main1" class="pie"
|
|
|
- /></el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <p class="table_font">流水线部署贡献占比</p>
|
|
|
- <div id="main2" class="pie"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <p class="table_font">缺陷贡献占比</p>
|
|
|
- <div id="main3" class="pie"
|
|
|
- /></el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <p class="table_font">需求树贡献占比</p>
|
|
|
- <div id="main4" class="pie"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-card>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import * as echarts from "echarts";
|
|
|
-import {getGroupAnalysis,getGroupScore} from "@/api/analysis/devcloud.js";
|
|
|
+ import * as echarts from "echarts";
|
|
|
+ import {getGroupAnalysis,getGroupScore} from "@/api/analysis/devcloud.js";
|
|
|
|
|
|
-export default {
|
|
|
- name: "AnalysisGroupCard",
|
|
|
- props:{
|
|
|
- "num": {type:Number,default:1},
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- userId: this.num,
|
|
|
+ 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 },
|
|
|
- { name: "kcy", times: 1, proportion: 0.2 },
|
|
|
- { name: "pyy", times: 2, proportion: 0.4 },
|
|
|
- ],
|
|
|
- interfaceContribution: [
|
|
|
- // { name: "zqq", times: 4, proportion: 0.8 },
|
|
|
- // { name: "ty", times: 0, proportion: 0 },
|
|
|
- // { name: "kcy", times: 0, proportion: 0 },
|
|
|
- // { name: "pyy", times: 1, proportion: 0.2 },
|
|
|
- ],
|
|
|
- pipelineContribution: [
|
|
|
- // { name: "zqq", times: 1, proportion: 0.1 },
|
|
|
- // { name: "ty", times: 1, proportion: 0.1 },
|
|
|
- // { name: "kcy", times: 2, proportion: 0.2 },
|
|
|
- // { name: "pyy", times: 6, proportion: 0.6 },
|
|
|
- ],
|
|
|
- bugContribution: [],
|
|
|
- treeContribution: [],
|
|
|
+ commitContribution: [
|
|
|
+ // { name: "zqq", times: 0, proportion: 0 },
|
|
|
+ // { name: "ty", times: 2, proportion: 0.4 },
|
|
|
+ // { name: "kcy", times: 1, proportion: 0.2 },
|
|
|
+ // { name: "pyy", times: 2, proportion: 0.4 },
|
|
|
+ ],
|
|
|
+ interfaceContribution: [
|
|
|
+ // { name: "zqq", times: 4, proportion: 0.8 },
|
|
|
+ // { name: "ty", times: 0, proportion: 0 },
|
|
|
+ // { name: "kcy", times: 0, proportion: 0 },
|
|
|
+ // { name: "pyy", times: 1, proportion: 0.2 },
|
|
|
+ ],
|
|
|
+ pipelineContribution: [
|
|
|
+ // { name: "zqq", times: 1, proportion: 0.1 },
|
|
|
+ // { name: "ty", times: 1, proportion: 0.1 },
|
|
|
+ // { name: "kcy", times: 2, proportion: 0.2 },
|
|
|
+ // { name: "pyy", times: 6, proportion: 0.6 },
|
|
|
+ ],
|
|
|
+ bugContribution: [],
|
|
|
+ treeContribution: [],
|
|
|
|
|
|
- commitPie: [],
|
|
|
- testPie: [],
|
|
|
- deployPie: [],
|
|
|
- bugListPie: [],
|
|
|
- treePie: [],
|
|
|
+ commitPie: [],
|
|
|
+ testPie: [],
|
|
|
+ deployPie: [],
|
|
|
+ bugListPie: [],
|
|
|
+ treePie: [],
|
|
|
|
|
|
- arrange: {
|
|
|
- pipeline_deploy: 10,
|
|
|
- pipeline_pass: 20,
|
|
|
- pipline_failure: 20,
|
|
|
- },
|
|
|
- test: {
|
|
|
- // total: 20,
|
|
|
- // execute: 200,
|
|
|
- // pass: 10,
|
|
|
- // fail: 20,
|
|
|
- },
|
|
|
- commitMessage: {
|
|
|
- commit_times: 5,
|
|
|
- valid_commit_times: 3,
|
|
|
- buglist_commit: 4,
|
|
|
- feature_commit: 3,
|
|
|
- commit_msg_overview: [
|
|
|
- "- fix: 修改错误",
|
|
|
- "- feat: 增加评论区功能",
|
|
|
- "- feat: 增加头像上传",
|
|
|
- "- fix: 修复登录页面的错误",
|
|
|
- ],
|
|
|
- },
|
|
|
- bugList: {
|
|
|
- bug_times: 10,
|
|
|
- high_times: 5,
|
|
|
- finished_times: 9,
|
|
|
- },
|
|
|
- treeNode: {
|
|
|
- treeNode_times: 10,
|
|
|
- high_treeNode_times: 5,
|
|
|
- finished_treeNode_times: 9,
|
|
|
- },
|
|
|
+ arrange: {
|
|
|
+ pipeline_deploy: 10,
|
|
|
+ pipeline_pass: 20,
|
|
|
+ pipline_failure: 20,
|
|
|
+ },
|
|
|
+ test: {
|
|
|
+ // total: 20,
|
|
|
+ // execute: 200,
|
|
|
+ // pass: 10,
|
|
|
+ // fail: 20,
|
|
|
+ },
|
|
|
+ commitMessage: {
|
|
|
+ // commit_times: 5,
|
|
|
+ // valid_commit_times: 3,
|
|
|
+ // buglist_commit: 4,
|
|
|
+ // feature_commit: 3,
|
|
|
+ // commit_msg_overview: [
|
|
|
+ // "- fix: 修改错误",
|
|
|
+ // "- feat: 增加评论区功能",
|
|
|
+ // "- feat: 增加头像上传",
|
|
|
+ // "- fix: 修复登录页面的错误",
|
|
|
+ // ],
|
|
|
+ },
|
|
|
+ bugList: {
|
|
|
+ // bug_times: 10,
|
|
|
+ // high_times: 5,
|
|
|
+ // finished_times: 9,
|
|
|
+ },
|
|
|
+ treeNode: {
|
|
|
+ // treeNode_times: 10,
|
|
|
+ // high_treeNode_times: 5,
|
|
|
+ // finished_treeNode_times: 9,
|
|
|
+ },
|
|
|
|
|
|
- userList: [
|
|
|
- { userId: 11, name: "测试", email: "2222" },
|
|
|
- { userId: 12, name: "测试2", email: "2222" },
|
|
|
- { userId: 13, name: "测试3", email: "2222" },
|
|
|
- ],
|
|
|
- productList: [
|
|
|
- { projectId: 1, projectName: "fun_frontEnd" },
|
|
|
- { projectId: 2, projectName: "fun_backEnd" },
|
|
|
- ],
|
|
|
+ userList: [
|
|
|
+ // { userId: 11, name: "测试", email: "2222" },
|
|
|
+ // { userId: 12, name: "测试2", email: "2222" },
|
|
|
+ // { userId: 13, name: "测试3", email: "2222" },
|
|
|
+ ],
|
|
|
+ productList: [
|
|
|
+ // { projectId: 1, projectName: "fun_frontEnd" },
|
|
|
+ // { projectId: 2, projectName: "fun_backEnd" },
|
|
|
+ ],
|
|
|
|
|
|
- totalScore: 0.0,
|
|
|
- commitScore: 0.0,
|
|
|
- bugScore: 0.0,
|
|
|
- nodeScore: 0.0,
|
|
|
- pipelineScore: 0.0,
|
|
|
- bonus: 0.0,
|
|
|
- };
|
|
|
- },
|
|
|
+ totalScore: 0.0,
|
|
|
+ commitScore: 0.0,
|
|
|
+ bugScore: 0.0,
|
|
|
+ nodeScore: 0.0,
|
|
|
+ pipelineScore: 0.0,
|
|
|
+ bonus: 0.0,
|
|
|
+ };
|
|
|
+ },
|
|
|
|
|
|
- async mounted() {
|
|
|
- await this.getData();
|
|
|
- await this.getAnalysis();
|
|
|
- this.getCommitPie();
|
|
|
- // this.getTestPie();
|
|
|
- this.getDeployPie();
|
|
|
- this.getBugPie();
|
|
|
- this.getTreePie();
|
|
|
- },
|
|
|
+ async mounted() {
|
|
|
+ await this.getData();
|
|
|
+ await this.getAnalysis();
|
|
|
+ this.getCommitPie();
|
|
|
+ // this.getTestPie();
|
|
|
+ this.getDeployPie();
|
|
|
+ this.getBugPie();
|
|
|
+ this.getTreePie();
|
|
|
+ },
|
|
|
|
|
|
- methods: {
|
|
|
- async getData(){
|
|
|
- try{
|
|
|
- let res = await getGroupAnalysis({
|
|
|
- params: {
|
|
|
- // user_id: this.$route.params.id,
|
|
|
- // user_id: 1575,
|
|
|
- user_id: this.userId,
|
|
|
- },
|
|
|
- });
|
|
|
- // console.log(res);
|
|
|
- // console.log("here");
|
|
|
- // console.log(res.content.commit["commit_contribution"]);
|
|
|
- if(res.success){
|
|
|
- this.userList = res.content.students;
|
|
|
- this.productList = res.content.projects;
|
|
|
- this.commitMessage = res.content.commit;
|
|
|
- this.commitContribution = res.content.commit.commit_contribution;
|
|
|
- this.test = res.content.test;
|
|
|
- this.interfaceContribution = res.content.test.test_contribution;
|
|
|
- this.arrange = res.content.pipeline;
|
|
|
- this.pipelineContribution = res.content.pipeline.pipeline_contribution;
|
|
|
- this.bugList = res.content.buglist;
|
|
|
- this.bugContribution = res.content.buglist.bug_contribution;
|
|
|
- this.treeNode = res.content.treeNode;
|
|
|
- this.treeContribution = res.content.treeNode.treeNode_contribution;
|
|
|
- }
|
|
|
- // console.log("done");
|
|
|
- // console.log(this.commitContribution);
|
|
|
- } catch(e) {
|
|
|
- this.$message.error(e.message);
|
|
|
- }
|
|
|
- try{
|
|
|
- let res1 = await getGroupScore({
|
|
|
- params: {
|
|
|
- // user_id: this.$route.params.id,
|
|
|
- // user_id: 1575,
|
|
|
- user_id: this.userId,
|
|
|
- }
|
|
|
- });
|
|
|
- // console.log(res1);
|
|
|
- if(res1.success){
|
|
|
- this.totalScore = res1.content.totalScore;
|
|
|
- this.commitScore = res1.content.commitScore;
|
|
|
- this.bugScore = res1.content.bugScore;
|
|
|
- this.nodeScore = res1.content.nodeScore;
|
|
|
- this.pipelineScore = res1.content.pipelineScore;
|
|
|
- this.bonus = res1.content.bonus;
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- this.$message.error(e.message);
|
|
|
- }
|
|
|
- },
|
|
|
+ methods: {
|
|
|
+ async getData(){
|
|
|
+ try{
|
|
|
+ let res = await getGroupAnalysis({
|
|
|
+ params: {
|
|
|
+ // user_id: this.$route.params.id,
|
|
|
+ // user_id: 1575,
|
|
|
+ user_id: this.userId,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ // console.log(res);
|
|
|
+ // console.log("here");
|
|
|
+ // console.log(res.content.commit["commit_contribution"]);
|
|
|
+ if(res.success){
|
|
|
+ this.userList = res.content.students;
|
|
|
+ this.productList = res.content.projects;
|
|
|
+ this.commitMessage = res.content.commit;
|
|
|
+ this.commitContribution = res.content.commit.commit_contribution;
|
|
|
+ this.test = res.content.test;
|
|
|
+ this.interfaceContribution = res.content.test.test_contribution;
|
|
|
+ this.arrange = res.content.pipeline;
|
|
|
+ this.pipelineContribution = res.content.pipeline.pipeline_contribution;
|
|
|
+ this.bugList = res.content.buglist;
|
|
|
+ this.bugContribution = res.content.buglist.bug_contribution;
|
|
|
+ this.treeNode = res.content.treeNode;
|
|
|
+ this.treeContribution = res.content.treeNode.treeNode_contribution;
|
|
|
+ }
|
|
|
+ // console.log("done");
|
|
|
+ // console.log(this.commitContribution);
|
|
|
+ } catch(e) {
|
|
|
+ // this.$message.error("暂未查找到相关数据");
|
|
|
+ alert("暂未查找到相关数据");
|
|
|
+ }
|
|
|
+ try{
|
|
|
+ let res1 = await getGroupScore({
|
|
|
+ params: {
|
|
|
+ // user_id: this.$route.params.id,
|
|
|
+ // user_id: 1575,
|
|
|
+ user_id: this.userId,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(res1);
|
|
|
+ if(res1.success){
|
|
|
+ this.totalScore = res1.content.totalScore;
|
|
|
+ this.commitScore = res1.content.commitScore;
|
|
|
+ this.bugScore = res1.content.bugScore;
|
|
|
+ this.nodeScore = res1.content.nodeScore;
|
|
|
+ this.pipelineScore = res1.content.pipelineScore;
|
|
|
+ this.bonus = res1.content.bonus;
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ // this.$message.error(e.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- async getAnalysis() {
|
|
|
- console.log("analysis:");
|
|
|
- console.log(this.commitContribution);
|
|
|
- for (let i = 0; i < this.commitContribution.length; i++) {
|
|
|
- this.commitPie.push({
|
|
|
- value: this.commitContribution[i].times,
|
|
|
- name: this.commitContribution[i].name,
|
|
|
- });
|
|
|
- }
|
|
|
- for (let i = 0; i < this.interfaceContribution.length; i++) {
|
|
|
- this.testPie.push({
|
|
|
- value: this.interfaceContribution[i].times,
|
|
|
- name: this.interfaceContribution[i].name,
|
|
|
- });
|
|
|
- }
|
|
|
- for (let i = 0; i < this.pipelineContribution.length; i++) {
|
|
|
- this.deployPie.push({
|
|
|
- value: this.pipelineContribution[i].times,
|
|
|
- name: this.pipelineContribution[i].name,
|
|
|
- });
|
|
|
- }
|
|
|
- for(let i = 0; i < this.bugContribution.length; i++) {
|
|
|
- this.bugListPie.push({
|
|
|
- value : this.bugContribution[i].times,
|
|
|
- name: this.bugContribution[i].name,
|
|
|
- });
|
|
|
- }
|
|
|
- // console.log(this.bugListPie);
|
|
|
- for(let i = 0; i < this.treeContribution.length; i++) {
|
|
|
- this.treePie.push({
|
|
|
- value: this.treeContribution[i].times,
|
|
|
- name: this.treeContribution[i].name,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ async getAnalysis() {
|
|
|
+ console.log("analysis:");
|
|
|
+ console.log(this.commitContribution);
|
|
|
+ for (let i = 0; i < this.commitContribution.length; i++) {
|
|
|
+ this.commitPie.push({
|
|
|
+ value: this.commitContribution[i].times,
|
|
|
+ name: this.commitContribution[i].name,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.interfaceContribution.length; i++) {
|
|
|
+ this.testPie.push({
|
|
|
+ value: this.interfaceContribution[i].times,
|
|
|
+ name: this.interfaceContribution[i].name,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.pipelineContribution.length; i++) {
|
|
|
+ this.deployPie.push({
|
|
|
+ value: this.pipelineContribution[i].times,
|
|
|
+ name: this.pipelineContribution[i].name,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ for(let i = 0; i < this.bugContribution.length; i++) {
|
|
|
+ this.bugListPie.push({
|
|
|
+ value : this.bugContribution[i].times,
|
|
|
+ name: this.bugContribution[i].name,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // console.log(this.bugListPie);
|
|
|
+ for(let i = 0; i < this.treeContribution.length; i++) {
|
|
|
+ this.treePie.push({
|
|
|
+ value: this.treeContribution[i].times,
|
|
|
+ name: this.treeContribution[i].name,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- getCommitPie() {
|
|
|
- // 绘制图表
|
|
|
- var myChart1 = echarts.init(document.getElementById("main1"));
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90,
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "item",
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "commit次数",
|
|
|
- center: ["50%", "40%"],
|
|
|
- type: "pie", // 设置图表类型为饼图
|
|
|
- radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.commitPie,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart1.setOption(option);
|
|
|
- },
|
|
|
+ getCommitPie() {
|
|
|
+ // 绘制图表
|
|
|
+ var myChart1 = echarts.init(document.getElementById("main1"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "commit次数",
|
|
|
+ center: ["50%", "40%"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.commitPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart1.setOption(option);
|
|
|
+ },
|
|
|
|
|
|
- // getTestPie() {
|
|
|
- // var myChart2 = echarts.init(document.getElementById("main2"));
|
|
|
- // // 指定图表的配置项和数据
|
|
|
- // var option = {
|
|
|
- // title: {
|
|
|
- // // text: 'commit占比信息',
|
|
|
- // },
|
|
|
- // grid: {
|
|
|
- // top: 90,
|
|
|
- // },
|
|
|
- // tooltip: {
|
|
|
- // trigger: "item",
|
|
|
- // },
|
|
|
- // series: [
|
|
|
- // {
|
|
|
- // name: "测试次数",
|
|
|
- // center: ["50%", "40%"],
|
|
|
- // type: "pie", // 设置图表类型为饼图
|
|
|
- // radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- // data: this.testPie,
|
|
|
- // },
|
|
|
- // ],
|
|
|
- // };
|
|
|
- // // 使用刚指定的配置项和数据显示图表。
|
|
|
- // myChart2.setOption(option);
|
|
|
- // },
|
|
|
+ // getTestPie() {
|
|
|
+ // var myChart2 = echarts.init(document.getElementById("main2"));
|
|
|
+ // // 指定图表的配置项和数据
|
|
|
+ // var option = {
|
|
|
+ // title: {
|
|
|
+ // // text: 'commit占比信息',
|
|
|
+ // },
|
|
|
+ // grid: {
|
|
|
+ // top: 90,
|
|
|
+ // },
|
|
|
+ // tooltip: {
|
|
|
+ // trigger: "item",
|
|
|
+ // },
|
|
|
+ // series: [
|
|
|
+ // {
|
|
|
+ // name: "测试次数",
|
|
|
+ // center: ["50%", "40%"],
|
|
|
+ // type: "pie", // 设置图表类型为饼图
|
|
|
+ // radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ // data: this.testPie,
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // };
|
|
|
+ // // 使用刚指定的配置项和数据显示图表。
|
|
|
+ // myChart2.setOption(option);
|
|
|
+ // },
|
|
|
|
|
|
- getDeployPie() {
|
|
|
- var myChart3 = echarts.init(document.getElementById("main2"));
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90,
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "item",
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "部署次数",
|
|
|
- center: ["50%", "40 %"],
|
|
|
- type: "pie", // 设置图表类型为饼图
|
|
|
- radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.deployPie,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart3.setOption(option);
|
|
|
- },
|
|
|
+ getDeployPie() {
|
|
|
+ var myChart3 = echarts.init(document.getElementById("main2"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "部署次数",
|
|
|
+ center: ["50%", "40 %"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.deployPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart3.setOption(option);
|
|
|
+ },
|
|
|
|
|
|
- getBugPie() {
|
|
|
- var myChart4 = echarts.init(document.getElementById("main3"));
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90,
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "item",
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "提交缺陷次数",
|
|
|
- center: ["50%", "40 %"],
|
|
|
- type: "pie", // 设置图表类型为饼图
|
|
|
- radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.bugListPie,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart4.setOption(option);
|
|
|
- },
|
|
|
+ getBugPie() {
|
|
|
+ var myChart4 = echarts.init(document.getElementById("main3"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "提交缺陷次数",
|
|
|
+ center: ["50%", "40 %"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.bugListPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart4.setOption(option);
|
|
|
+ },
|
|
|
|
|
|
- getTreePie() {
|
|
|
- var myChart5 = echarts.init(document.getElementById("main4"));
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90,
|
|
|
+ getTreePie() {
|
|
|
+ var myChart5 = echarts.init(document.getElementById("main4"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "提交需求次数",
|
|
|
+ center: ["50%", "40 %"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.treePie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart5.setOption(option);
|
|
|
+ },
|
|
|
},
|
|
|
- tooltip: {
|
|
|
- trigger: "item",
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "提交需求次数",
|
|
|
- center: ["50%", "40 %"],
|
|
|
- type: "pie", // 设置图表类型为饼图
|
|
|
- radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.treePie,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart5.setOption(option);
|
|
|
- },
|
|
|
- },
|
|
|
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+ .score-box {
|
|
|
+ width: 20px;
|
|
|
+ height: 10px;
|
|
|
+ background-color: #98e7ff;
|
|
|
+ }
|
|
|
+ .nui-scroll {
|
|
|
+ margin-top: 5px;
|
|
|
+ width: 99%;
|
|
|
+ height: 300px;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .nui-scroll::-webkit-scrollbar {
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ }
|
|
|
+ /*正常情况下滑块的样式*/
|
|
|
+
|
|
|
+ .nui-scroll::-webkit-scrollbar-thumb {
|
|
|
+ background-color: rgba(0, 0, 0, .05);
|
|
|
+ border-radius: 10px;
|
|
|
+ -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1);
|
|
|
+ }
|
|
|
+ /*鼠标悬浮在该类指向的控件上时滑块的样式*/
|
|
|
+
|
|
|
+ .nui-scroll:hover::-webkit-scrollbar-thumb {
|
|
|
+ background-color: rgba(0, 0, 0, .2);
|
|
|
+ border-radius: 10px;
|
|
|
+ -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1);
|
|
|
+ }
|
|
|
+ /*鼠标悬浮在滑块上时滑块的样式*/
|
|
|
+
|
|
|
+ .nui-scroll::-webkit-scrollbar-thumb:hover {
|
|
|
+ background-color: rgba(0, 0, 0, .4);
|
|
|
+ -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1);
|
|
|
+ }
|
|
|
+ /*正常时候的主干部分*/
|
|
|
+
|
|
|
+ .nui-scroll::-webkit-scrollbar-track {
|
|
|
+ border-radius: 10px;
|
|
|
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
|
|
|
+ background-color: white;
|
|
|
+ }
|
|
|
+ /*鼠标悬浮在滚动条上的主干部分*/
|
|
|
+
|
|
|
+ .nui-scroll::-webkit-scrollbar-track:hover {
|
|
|
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .4);
|
|
|
+ background-color: rgba(0, 0, 0, .01);
|
|
|
+ }
|
|
|
|
|
|
-</style>
|
|
|
+ .box-innercard {
|
|
|
+ /*background-color: #1f00f5;*/
|
|
|
+ }
|
|
|
+ .pie {
|
|
|
+ width: 200px;
|
|
|
+ height: 150px;
|
|
|
+ }
|
|
|
+ /* .main{
|
|
|
+ display: flex;
|
|
|
+ } */
|
|
|
+</style>
|