|
|
@@ -1,405 +1,329 @@
|
|
|
<template>
|
|
|
- <Layout >
|
|
|
- <Title title="Devcloud小组数据分析"></Title>
|
|
|
- <a-row style="margin-top: 5px;">
|
|
|
- <a-button type="link" @click="clickBackHome">
|
|
|
- <a-icon type="caret-left" theme="filled"/>
|
|
|
- 返回首页
|
|
|
- </a-button>
|
|
|
- </a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <!-- 小组信息-->
|
|
|
- <div style="padding: 5px">
|
|
|
- <a-card title="小组信息" v-model="group_message" class="outer_border_color" :bordered="false">
|
|
|
- <a-row>
|
|
|
- <a-col :span="12" style="font-size: 15px">
|
|
|
- 组号:{{group_message[0].group}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-card title="项目信息:" class="inner_border_color">
|
|
|
- <a-row v-for="projectItem in group_message[0].projects" :key="projectItem" style="margin-top: 5px" >
|
|
|
- <a-col :span="12">
|
|
|
- 项目id:{{projectItem.projectId}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 项目名称:{{projectItem.projectName}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- <a-card title="小组成员:" class="inner_border_color">
|
|
|
- <a-row v-for="memberItem in group_message[0].members" :key="memberItem" style="margin-top: 5px">
|
|
|
- <a-col :span="8">
|
|
|
- 用户id:{{memberItem.userId}}
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- 学号:
|
|
|
- <a-button type="link" @click="clickStudent(memberItem.studentId)">
|
|
|
- {{memberItem.studentId}}
|
|
|
- </a-button>
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 姓名:{{memberItem.name}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- </a-card>
|
|
|
- </div>
|
|
|
- <!-- commit信息-->
|
|
|
- <div style="padding: 5px">
|
|
|
- <a-card title="commit信息" v-model="group_message" class="outer_border_color" :bordered="false">
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- commit总次数:{{group_message[0].commit["commit-times"]}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 有效commit次数:{{group_message[0].commit["valid-commit-times"]}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- bugList_commit次数:{{group_message[0].commit["buglist-commit"]}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- feature_commit次数:{{group_message[0].commit["feature-commit"]}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-card title="commit具体信息:" class="inner_border_color">
|
|
|
- <a-row v-for="commitItem in group_message[0].commit['commit-msg-overview']" :key="commitItem" style="margin-top: 2px" >
|
|
|
- <a-col :span="1"/>
|
|
|
- <a-col :span="12">
|
|
|
- - {{commitItem}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- </a-card>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
+ <Layout>
|
|
|
+ <Title title="Devcloud小组数据分析"></Title>
|
|
|
+ <div class="main">
|
|
|
+ <!-- 小组信息 -->
|
|
|
+ <el-card class="box-card">
|
|
|
+ <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">
|
|
|
+ <template v-for="item in productList">
|
|
|
+ <el-descriptions-item label="项目id" :key="item.id">{{
|
|
|
+ item.id
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="项目名称" :key="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </template>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-innercard" style="margin-top: 20px">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>小组成员</span>
|
|
|
+ </div>
|
|
|
+ <el-descriptions :column="3">
|
|
|
+ <template v-for="item in userList">
|
|
|
+ <el-descriptions-item label="用户id" :key="item.id">{{
|
|
|
+ item.id
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="学号" :key="item.number">{{
|
|
|
+ item.number
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="姓名" :key="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </template>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-card>
|
|
|
+ <!-- 提交信息 -->
|
|
|
+ <el-card class="box-card" style="margin-top: 20px">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>commit信息</span>
|
|
|
+ </div>
|
|
|
+ <el-descriptions :column="2">
|
|
|
+ <el-descriptions-item label="commit总次数">{{
|
|
|
+ commitMessage.commitTotal
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="有效commit次数">{{
|
|
|
+ commitMessage.commit
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="bugList_commit次数">{{
|
|
|
+ commitMessage.bugList_commit
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="feature_commit次数">{{
|
|
|
+ commitMessage.feature_commit
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
|
|
|
- <a-col :span="12">
|
|
|
- <!-- 测试信息-->
|
|
|
- <div style="padding: 5px">
|
|
|
- <a-card title="测试信息" v-model="group_message" class="outer_border_color" :bordered="false">
|
|
|
- <a-card title="接口测试" class="inner_border_color" :bordered="false">
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- 接口测试总数:{{group_message[0].test["interface-test"]["interface-test-times"]}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 接口测试执行次数:{{group_message[0].test["interface-test"]["interface-test-concurrency-count"]}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row style="margin-top: 5px">
|
|
|
- <a-col :span="12">
|
|
|
- 接口测试失败次数:{{group_message[0].test["interface-test"]["interface-test-concurrency-failure"]}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 接口测试通过次数:{{group_message[0].test["interface-test"]["interface-test-concurrency-pass"]}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- </a-card>
|
|
|
- </div>
|
|
|
- <!-- 流水线信息-->
|
|
|
- <div style="padding: 5px">
|
|
|
- <a-card title="流水线部署信息" v-model="group_message" class="outer_border_color" :bordered="false">
|
|
|
- <a-row>
|
|
|
- 流水线部署次数:{{group_message[0].pipeline["pipeline-deploy"]}}
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- 部署成功次数:{{group_message[0].pipeline["pipeline-pass"]}}
|
|
|
- </a-col>
|
|
|
- <a-col>
|
|
|
- 部署失败次数:{{group_message[0].pipeline["pipeline-failure"]}}
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div style="padding: 5px">
|
|
|
- <a-row class="outer_border_color">
|
|
|
- <a-row>
|
|
|
- <a-col :span="7">
|
|
|
- <p class="table_font">commit贡献占比</p>
|
|
|
- <div id="main1" class="pie"/>
|
|
|
- </a-col>
|
|
|
- <a-col :span="1"/>
|
|
|
- <a-col :span="7">
|
|
|
- <p class="table_font">接口测试贡献占比</p>
|
|
|
- <div id="main2" class="pie"/>
|
|
|
- </a-col>
|
|
|
- <a-col :span="1"/>
|
|
|
- <a-col :span="7">
|
|
|
- <a-col>
|
|
|
- <p class="table_font">流水线部署贡献占比</p>
|
|
|
- <div id="main3" class="pie"/>
|
|
|
- </a-col>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-row>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- </Layout>
|
|
|
+ <el-card class="box-innercard">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>commit具体信息</span>
|
|
|
+ </div>
|
|
|
+ <el-descriptions :column="1" :colon="false">
|
|
|
+ <template v-for="item in commitMessage.commitDetail">
|
|
|
+ <el-descriptions-item :key="item">{{
|
|
|
+ item
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </template>
|
|
|
+ </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.total
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="接口测试执行次数">{{
|
|
|
+ test.execute
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="接口测试失败次数">{{
|
|
|
+ test.fail
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="接口测试通过次数">{{
|
|
|
+ test.pass
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-card>
|
|
|
+ <!-- 部署信息 -->
|
|
|
+ <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="流水线部署次数">{{
|
|
|
+ arrange.total
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="流水线部署成功次数">{{
|
|
|
+ arrange.pass
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="流水线部署失败次数">{{
|
|
|
+ arrange.fail
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ <!-- 图表 -->
|
|
|
+ <el-card class="box-card" style="margin-top: 20px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <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-row>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ </Layout>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {mapGetters, mapMutations} from "vuex"
|
|
|
- import * as echarts from 'echarts';
|
|
|
- import Layout from "@/components/content/Layout";
|
|
|
- import Title from "@/components/content/Title";
|
|
|
- export default {
|
|
|
- name: "Group",
|
|
|
- components: {
|
|
|
- Layout,
|
|
|
- Title
|
|
|
+import * as echarts from "echarts";
|
|
|
+import Layout from "@/components/content/Layout";
|
|
|
+import Title from "@/components/content/Title";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ Layout,
|
|
|
+ Title,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ 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 },
|
|
|
+ ],
|
|
|
+ commitPie: [],
|
|
|
+ testPie: [],
|
|
|
+ deployPie: [],
|
|
|
+ arrange: {
|
|
|
+ total: 10,
|
|
|
+ pass: 20,
|
|
|
+ fail: 20,
|
|
|
+ },
|
|
|
+ test: {
|
|
|
+ total: 20,
|
|
|
+ execute: 200,
|
|
|
+ pass: 10,
|
|
|
+ fail: 20,
|
|
|
+ },
|
|
|
+ commitMessage: {
|
|
|
+ commitTotal: 5,
|
|
|
+ commit: 3,
|
|
|
+ bugList_commit: 4,
|
|
|
+ feature_commit: 3,
|
|
|
+ commitDetail: [
|
|
|
+ "- fix: 修改错误",
|
|
|
+ "- feat: 增加评论区功能",
|
|
|
+ "- feat: 增加头像上传",
|
|
|
+ "- fix: 修复登录页面的错误",
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ userList: [
|
|
|
+ { id: 11, name: "测试", number: "2222" },
|
|
|
+ { id: 12, name: "测试2", number: "2222" },
|
|
|
+ { id: 13, name: "测试3", number: "2222" },
|
|
|
+ ],
|
|
|
+ productList: [
|
|
|
+ { id: 1, name: "fun_frontEnd" },
|
|
|
+ { id: 2, name: "fun_backEnd" },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getAnalysis();
|
|
|
+ this.getCommitPie();
|
|
|
+ this.getTestPie();
|
|
|
+ this.getDeployPie();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getAnalysis() {
|
|
|
+ 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,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getCommitPie() {
|
|
|
+ // 绘制图表
|
|
|
+ var myChart1 = echarts.init(document.getElementById("main1"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- testData: [ //每个模块的名字和值
|
|
|
- { name: '未领取', value: 10 },
|
|
|
- { name: '处理中', value: 30},
|
|
|
- { name: '已完成', value: 50 }
|
|
|
- ],
|
|
|
- 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:[],
|
|
|
- current_student:-1,
|
|
|
- };
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
},
|
|
|
-
|
|
|
- async mounted () {
|
|
|
- console.log('here');
|
|
|
- // await this.set_group({
|
|
|
- // groupId: Number(this.$route.params.groupId),
|
|
|
- // })
|
|
|
- // await this.initData(this.groupId);
|
|
|
- this.getAnalysis();
|
|
|
- this.getCommitPie();
|
|
|
- this.getTestPie();
|
|
|
- this.getDeployPie();
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
},
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "commit次数",
|
|
|
+ center: ["50%", "40%"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.commitPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart1.setOption(option);
|
|
|
+ },
|
|
|
|
|
|
- clickStudent(studentId){
|
|
|
- console.log(studentId);
|
|
|
- this.current_student = studentId;
|
|
|
- this.$router.push({
|
|
|
- name: 'student',
|
|
|
- params: {
|
|
|
- studentId: this.current_student,
|
|
|
- }
|
|
|
- })
|
|
|
+ getTestPie() {
|
|
|
+ var myChart2 = echarts.init(document.getElementById("main2"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
},
|
|
|
-
|
|
|
- async initData(groupId){
|
|
|
- // var res = await getGroupAPI(groupId);
|
|
|
- // this.group_message = [];
|
|
|
- // this.group_message.push({
|
|
|
- // group: res.data.group,
|
|
|
- // projects: res.data.projects,
|
|
|
- // members: res.data.members,
|
|
|
- // commit: res.data.commit,
|
|
|
- // test: res.data.test,
|
|
|
- // pipeline: res.data.pipeline,
|
|
|
- // })
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
},
|
|
|
-
|
|
|
- getAnalysis(){
|
|
|
- for(let i=0;i<this.group_message[0].commit["commit-contribution"].length;i++){
|
|
|
- this.commitPie.push({
|
|
|
- value: this.group_message[0].commit["commit-contribution"][i].times,
|
|
|
- name: this.group_message[0].commit["commit-contribution"][i].name,
|
|
|
- })
|
|
|
- }
|
|
|
- for(let i=0;i<this.group_message[0].test["interface-test"]["interface-test-contribution"].length;i++){
|
|
|
- this.testPie.push({
|
|
|
- value: this.group_message[0].test["interface-test"]["interface-test-contribution"][i].times,
|
|
|
- name: this.group_message[0].test["interface-test"]["interface-test-contribution"][i].name,
|
|
|
- })
|
|
|
- }
|
|
|
- for(let i=0;i<this.group_message[0].pipeline["pipeline-contribution"].length;i++){
|
|
|
- this.deployPie.push({
|
|
|
- value: this.group_message[0].pipeline["pipeline-contribution"][i].times,
|
|
|
- name: this.group_message[0].pipeline["pipeline-contribution"][i].name,
|
|
|
- })
|
|
|
- }
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
},
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "测试次数",
|
|
|
+ center: ["50%", "40%"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.testPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart2.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%', '30%'],
|
|
|
- type: 'pie', // 设置图表类型为饼图
|
|
|
- radius: '55%', // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.commitPie,
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart1.setOption(option)
|
|
|
+ getDeployPie() {
|
|
|
+ var myChart3 = echarts.init(document.getElementById("main3"));
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ var option = {
|
|
|
+ title: {
|
|
|
+ // text: 'commit占比信息',
|
|
|
},
|
|
|
-
|
|
|
- getTestPie(){
|
|
|
- var myChart2 = echarts.init(document.getElementById('main2'))
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'item'
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '测试次数',
|
|
|
- center: ['50%', '30%'],
|
|
|
- type: 'pie', // 设置图表类型为饼图
|
|
|
- radius: '55%', // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.testPie,
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart2.setOption(option)
|
|
|
+ grid: {
|
|
|
+ top: 90,
|
|
|
},
|
|
|
-
|
|
|
- getDeployPie(){
|
|
|
- console.log("start Deploy")
|
|
|
- var myChart3 = echarts.init(document.getElementById('main3'))
|
|
|
- // 指定图表的配置项和数据
|
|
|
- var option = {
|
|
|
- title: {
|
|
|
- // text: 'commit占比信息',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: 90
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'item'
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '部署次数',
|
|
|
- center: ['50%', '30%'],
|
|
|
- type: 'pie', // 设置图表类型为饼图
|
|
|
- radius: '55%', // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
- data: this.deployPie,
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart3.setOption(option)
|
|
|
- }
|
|
|
-
|
|
|
- };
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "部署次数",
|
|
|
+ center: ["50%", "40 %"],
|
|
|
+ type: "pie", // 设置图表类型为饼图
|
|
|
+ radius: "55%", // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
|
|
+ data: this.deployPie,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart3.setOption(option);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .el-carousel__item h2 {
|
|
|
- color: #475669;
|
|
|
- font-size: 14px;
|
|
|
- opacity: 0.75;
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .outer_border_color {
|
|
|
- min-width: 550px;
|
|
|
- border-radius: 20px;
|
|
|
- margin: 15px;
|
|
|
- background-color: #f9f9f9;
|
|
|
- border: 2px solid #d6d6d6;
|
|
|
- }
|
|
|
-
|
|
|
- .inner_border_color{
|
|
|
- min-width: 150px;
|
|
|
- border-radius: 10px;
|
|
|
- margin-top: 10px;
|
|
|
- background-color: #ffffff;
|
|
|
- }
|
|
|
-
|
|
|
- .table_font{
|
|
|
- font-size: 15px;
|
|
|
- margin: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .pie{
|
|
|
- width: 200px;
|
|
|
- height: 120px;
|
|
|
- }
|
|
|
-
|
|
|
+.box-innercard {
|
|
|
+ /* background-color: #F0F2F5; */
|
|
|
+}
|
|
|
+.pie {
|
|
|
+ width: 200px;
|
|
|
+ height: 150px;
|
|
|
+}
|
|
|
+/* .main{
|
|
|
+ display: flex;
|
|
|
+} */
|
|
|
</style>
|