|
|
@@ -74,31 +74,67 @@
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-card>
|
|
|
+
|
|
|
<!-- 测试信息 -->
|
|
|
- <el-card class="box-card" style="margin-top: 20px">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span>测试信息</span>
|
|
|
- </div>
|
|
|
- <el-card class="box-innercard">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span>接口测试</span>
|
|
|
- </div>
|
|
|
- <el-descriptions :column="2">
|
|
|
- <el-descriptions-item label="接口测试总数">{{
|
|
|
- test.test_times
|
|
|
- }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="接口测试执行次数">{{
|
|
|
- test.test_concurrency_count
|
|
|
- }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="接口测试失败次数">{{
|
|
|
- test.test_concurrency_failure
|
|
|
- }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="接口测试通过次数">{{
|
|
|
- test.test_concurrency_success
|
|
|
- }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+<!-- <el-card class="box-card" style="margin-top: 20px">-->
|
|
|
+<!-- <div slot="header" class="clearfix">-->
|
|
|
+<!-- <span>测试信息</span>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <el-card class="box-innercard">-->
|
|
|
+<!-- <div slot="header" class="clearfix">-->
|
|
|
+<!-- <span>接口测试</span>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <el-descriptions :column="2">-->
|
|
|
+<!-- <el-descriptions-item label="接口测试总数">{{-->
|
|
|
+<!-- test.test_times-->
|
|
|
+<!-- }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item label="接口测试执行次数">{{-->
|
|
|
+<!-- test.test_concurrency_count-->
|
|
|
+<!-- }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item label="接口测试失败次数">{{-->
|
|
|
+<!-- test.test_concurrency_failure-->
|
|
|
+<!-- }}</el-descriptions-item>-->
|
|
|
+<!-- <el-descriptions-item label="接口测试通过次数">{{-->
|
|
|
+<!-- test.test_concurrency_success-->
|
|
|
+<!-- }}</el-descriptions-item>-->
|
|
|
+<!-- </el-descriptions>-->
|
|
|
+<!-- </el-card>-->
|
|
|
+<!-- </el-card>-->
|
|
|
+
|
|
|
+ <!-- bug信息 -->
|
|
|
+ <el-card class="box-card" style="margin-top: 20px">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>缺陷信息</span>
|
|
|
+ </div>
|
|
|
+ <el-descriptions :column="2">
|
|
|
+ <el-descriptions-item label="缺陷数目">{{
|
|
|
+ bugList.bug_times
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="高优先级缺陷数目">{{
|
|
|
+ bugList.high_times
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="已经修复的缺陷数目">{{
|
|
|
+ bugList.finished_times
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ <!-- treeNode信息 -->
|
|
|
+ <el-card class="box-card" style="margin-top: 20px">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>需求树信息</span>
|
|
|
+ </div>
|
|
|
+ <el-descriptions :column="2">
|
|
|
+ <el-descriptions-item label="需求节点数目">{{
|
|
|
+ treeNode.treeNode_times
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="高优先级需求数目">{{
|
|
|
+ treeNode.high_treeNode_times
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <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">
|
|
|
<div slot="header" class="clearfix">
|
|
|
@@ -116,21 +152,29 @@
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
+
|
|
|
+
|
|
|
<!-- 图表 -->
|
|
|
<el-card class="box-card" style="margin-top: 20px">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<p class="table_font">commit贡献占比</p>
|
|
|
<div id="main1" class="pie"
|
|
|
/></el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <p class="table_font">接口测试贡献占比</p>
|
|
|
- <div id="main2" class="pie"
|
|
|
- /></el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <p class="table_font">流水线部署贡献占比</p>
|
|
|
- <div id="main3" 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>
|
|
|
@@ -168,9 +212,15 @@ export default {
|
|
|
// { name: "kcy", times: 2, proportion: 0.2 },
|
|
|
// { name: "pyy", times: 6, proportion: 0.6 },
|
|
|
],
|
|
|
+ bugContribution: [],
|
|
|
+ treeContribution: [],
|
|
|
+
|
|
|
commitPie: [],
|
|
|
testPie: [],
|
|
|
deployPie: [],
|
|
|
+ bugListPie: [],
|
|
|
+ treePie: [],
|
|
|
+
|
|
|
arrange: {
|
|
|
// total: 10,
|
|
|
// pass: 20,
|
|
|
@@ -194,6 +244,9 @@ export default {
|
|
|
// "- fix: 修复登录页面的错误",
|
|
|
// ],
|
|
|
},
|
|
|
+ bugList: {},
|
|
|
+ treeNode: {},
|
|
|
+
|
|
|
userList: [
|
|
|
// { id: 11, name: "测试", number: "2222" },
|
|
|
// { id: 12, name: "测试2", number: "2222" },
|
|
|
@@ -207,10 +260,12 @@ export default {
|
|
|
},
|
|
|
async mounted() {
|
|
|
await this.getData();
|
|
|
- this.getAnalysis();
|
|
|
+ await this.getAnalysis();
|
|
|
this.getCommitPie();
|
|
|
- this.getTestPie();
|
|
|
+ // this.getTestPie();
|
|
|
this.getDeployPie();
|
|
|
+ this.getBugPie();
|
|
|
+ this.getTreePie();
|
|
|
},
|
|
|
methods: {
|
|
|
async getData(){
|
|
|
@@ -232,6 +287,10 @@ export default {
|
|
|
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);
|
|
|
@@ -240,7 +299,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getAnalysis() {
|
|
|
+ async getAnalysis() {
|
|
|
// console.log("analysis");
|
|
|
// console.log(this.commitContribution);
|
|
|
for (let i = 0; i < this.commitContribution.length; i++) {
|
|
|
@@ -261,7 +320,21 @@ export default {
|
|
|
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"));
|
|
|
@@ -290,35 +363,35 @@ export default {
|
|
|
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("main3"));
|
|
|
+ var myChart3 = echarts.init(document.getElementById("main2"));
|
|
|
// 指定图表的配置项和数据
|
|
|
var option = {
|
|
|
title: {
|
|
|
@@ -343,6 +416,60 @@ export default {
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
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);
|
|
|
+ },
|
|
|
+
|
|
|
+ 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);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|