Browse Source

团队概览,其他概览调整

master
chentaiyu 5 years ago
parent
commit
7072f74776
  1. 2
      src/views/xm/core/xmIteration/XmIterationOverview.vue
  2. 2
      src/views/xm/core/xmMenu/XmMenuOverview.vue
  3. 2
      src/views/xm/core/xmProduct/XmProductOverview.vue
  4. 2
      src/views/xm/core/xmProject/XmProjectOverview.vue
  5. 99
      src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue
  6. 643
      src/views/xm/core/xmProjectGroupState/XmProjectGroupStateOverview.vue
  7. 6
      src/views/xm/core/xmProjectPhase/XmProjectPhaseOverview.vue

2
src/views/xm/core/xmIteration/XmIterationOverview.vue

@ -254,7 +254,7 @@ export default {
return this.xmIteration.taskCnt-this.xmIteration.finishTaskCnt;
},
taskProgress: function (){
return Math.round(this.xmIteration.finishTaskCnt/this.xmIteration.taskCnt*100);
return this.xmIteration.finishRate;
},
iterationStartTime: function (){
return this.xmIteration.startTime.substring(0,10);

2
src/views/xm/core/xmMenu/XmMenuOverview.vue

@ -248,7 +248,7 @@
return this.xmMenu.taskCnt-this.xmMenu.finishTaskCnt;
},
taskProgress: function (){
return Math.round(this.xmMenu.finishTaskCnt/this.xmMenu.taskCnt*100);
return this.xmMenu.finishRate;
},
menuStartTime: function (){
if(this.xmMenu.planStartTime){

2
src/views/xm/core/xmProduct/XmProductOverview.vue

@ -250,7 +250,7 @@ export default {
return this.xmProduct.taskCnt-this.xmProduct.finishTaskCnt;
},
taskProgress: function (){
return Math.round(this.xmProduct.finishTaskCnt/this.xmProduct.taskCnt*100);
return this.xmProduct.finishRate;
},
productStartTime: function (){
if(this.xmProduct.planStartTime){

2
src/views/xm/core/xmProject/XmProjectOverview.vue

@ -281,7 +281,7 @@ export default {
return this.selProject.totalTaskCnt;
},
taskProgress: function (){
return Math.round(this.selProject.totalCompleteTaskCnt/this.selProject.totalTaskCnt*100);
return this.selProject.totalProgress;
},
taskStartTime: function (){
return this.selProject.startTime.substring(0,10);

99
src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue

@ -1,20 +1,20 @@
<template>
<section class="page-container page-full-height padding border">
<el-row>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询"></el-input>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询"></el-input>
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmProjectGroupStates">查询</el-button>
<el-button type="warning" v-loading="load.edit" @click="loadTasksToXmProjectGroupState">刷新数据</el-button>
</el-row>
<el-row class="page-main page-height-90">
<el-row class="page-main page-height-90">
<!--列表 XmProjectGroupState 功能状态表,无需前端维护所有数据由汇总统计得出-->
<el-table ref="table" :height="tableHeight" :data="xmProjectGroupStates" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="index" width="45"></el-table-column>
<el-table-column sortable type="index" width="45"></el-table-column>
<el-table-column prop="groupName" label="团队名称" min-width="80" >
<template slot-scope="scope">
<el-link type="primary" @click="overviewVisible=true">{{scope.row.groupName}}</el-link>
</template>
</el-table-column>
<el-table-column prop="finishRate" label="总体进度" min-width="80" ></el-table-column>
</el-table-column>
<el-table-column prop="finishRate" label="总体进度" min-width="80" ></el-table-column>
<el-table-column prop="planWorkload" label="计划工作量" min-width="80" ></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量" min-width="80" ></el-table-column>
<el-table-column prop="planCostAmount" label="计划成本" min-width="80" ></el-table-column>
@ -23,7 +23,7 @@
<el-table-column prop="taskCnt" label="任务数" min-width="80" ></el-table-column>
<el-table-column prop="finishTaskCnt" label="完成的任务数" min-width="80" ></el-table-column>
<el-table-column prop="planWorkerCnt" label="总人数" min-width="80" ></el-table-column>
<el-table-column prop="bugCnt" label="bug总数" min-width="80" ></el-table-column>
<el-table-column prop="bugCnt" label="bug总数" min-width="80" ></el-table-column>
<el-table-column prop="closedBugs" label="总关闭bugs" min-width="80" ></el-table-column>
<el-table-column prop="activeBugs" label="激活bugs" min-width="80" ></el-table-column>
<el-table-column prop="confirmedBugs" label="已确认bugs总数" min-width="80" ></el-table-column>
@ -31,34 +31,34 @@
<el-table-column prop="testCases" label="测试用例总数" min-width="80" ></el-table-column>
<el-table-column prop="execCases" label="测试中用例总数" min-width="80" ></el-table-column>
<el-table-column prop="designCases" label="设计中用例总数" min-width="80" ></el-table-column>
<el-table-column prop="finishCases" label="完成用例总数" min-width="80" ></el-table-column>
<el-table-column prop="finishCases" label="完成用例总数" min-width="80" ></el-table-column>
<el-table-column prop="calcTime" label="汇总时间" min-width="80" ></el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
<el-drawer
append-to-body
title="小组概览"
title="小组概览"
:visible.sync="overviewVisible"
size="60%"
>
<xm-project-group-state-overview :xm-project-group-state="editForm"></xm-project-group-state-overview>
</el-drawer>
</section>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmProjectGroupState, delXmProjectGroupState, batchDelXmProjectGroupState,loadTasksToXmProjectGroupState } from '@/api/xm/core/xmProjectGroupState';
import { listXmProjectGroupState, delXmProjectGroupState, batchDelXmProjectGroupState,loadTasksToXmProjectGroupState } from '@/api/xm/core/xmProjectGroupState';
import { mapGetters } from 'vuex'
import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
export default {
export default {
computed: {
...mapGetters([
'userInfo','roles'
@ -90,29 +90,29 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
sels: [],//
options:{
//sex:[],
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
addFormVisible: false,//xmProjectGroupState
//xmProjectGroupState
addForm: {
id:'',planStartTime:'',planEndTime:'',actStartTime:'',actEndTime:'',planWorkload:'',actWorkload:'',planCostAmount:'',actCostAmount:'',finishRate:'',demandRate:'',designRate:'',devRate:'',uatRate:'',sitRate:'',ctime:'',calcTime:'',planWorkhours:'',planWorkerCnt:'',closedBugs:'',activeBugs:'',confirmedBugs:'',resolvedBugs:'',testCases:'',execCases:'',designCases:'',finishCases:'',iterationCnt:'',taskCnt:'',finishTaskCnt:'',bizDate:'',bugCnt:'',groupId:'',projectId:'',projectName:'',groupName:''
},
editFormVisible: false,//
//xmProjectGroupState
editForm: {
id:'',planStartTime:'',planEndTime:'',actStartTime:'',actEndTime:'',planWorkload:'',actWorkload:'',planCostAmount:'',actCostAmount:'',finishRate:'',demandRate:'',designRate:'',devRate:'',uatRate:'',sitRate:'',ctime:'',calcTime:'',planWorkhours:'',planWorkerCnt:'',closedBugs:'',activeBugs:'',confirmedBugs:'',resolvedBugs:'',testCases:'',execCases:'',designCases:'',finishCases:'',iterationCnt:'',taskCnt:'',finishTaskCnt:'',bizDate:'',bugCnt:'',groupId:'',projectId:'',projectName:'',groupName:''
},
/**begin 自定义属性请在下面加 请加备注**/
tableHeight:300,
tableHeight:300,
overviewVisible:false,
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
methods: {
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
this.getXmProjectGroupStates();
},
handleCurrentChange(pageNum) {
@ -134,7 +134,7 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
this.getXmProjectGroupStates();
},
searchXmProjectGroupStates(){
this.pageInfo.count=true;
this.pageInfo.count=true;
this.getXmProjectGroupStates();
},
// XmProjectGroupState ,
@ -147,9 +147,9 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
};
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
for(var i=0;i<this.pageInfo.orderFields.length;i++){
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i])
}
}
params.orderBy= orderBys.join(",")
}
if(this.filters.key!==""){
@ -163,13 +163,13 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
this.load.list = true;
listXmProjectGroupState(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
if(tips.isOk){
this.pageInfo.total = res.data.total;
this.pageInfo.count=false;
this.xmProjectGroupStates = res.data.data;
}else{
this.$message({showClose: true, message: tips.msg, type: 'error' });
}
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
@ -195,44 +195,45 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
//xmProjectGroupState
selsChange: function (sels) {
this.sels = sels;
},
},
//xmProjectGroupState
handleDel: function (row,index) {
handleDel: function (row,index) {
this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning'
}).then(() => {
}).then(() => {
this.load.del=true;
let params = { id: row.id };
delXmProjectGroupState(params).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if(tips.isOk){
if(tips.isOk){
this.pageInfo.count=true;
this.getXmProjectGroupStates();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.del=false );
});
},
//xmProjectGroupState
batchDel: function () {
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
}).then(() => {
this.load.del=true;
batchDelXmProjectGroupState(this.sels).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if( tips.isOk ){
if( tips.isOk ){
this.pageInfo.count=true;
this.getXmProjectGroupStates();
this.getXmProjectGroupStates();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false );
});
},
rowClick: function(row, event, column){
this.editForm=row
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
loadTasksToXmProjectGroupState(){
@ -247,26 +248,26 @@ import XmProjectGroupStateOverview from './XmProjectGroupStateOverview.vue';
})
}
/**begin 自定义函数请在下面加**/
/**end 自定义函数请在上面加**/
},//end methods
components: {
XmProjectGroupStateOverview
XmProjectGroupStateOverview
//
},
mounted() {
mounted() {
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=70/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
var subHeight=70/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.getXmProjectGroupStates();
});
});
/**
listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{
if(res.data.tips.isOk){
if(res.data.tips.isOk){
this.options=res.data.data
}
});
@ -278,4 +279,4 @@ XmProjectGroupStateOverview
<style scoped>
</style>
</style>

643
src/views/xm/core/xmProjectGroupState/XmProjectGroupStateOverview.vue

@ -1,51 +1,608 @@
<template>
<section>
</section>
<section>
<el-row class="page-main page-height-75" style="overflow-x: hidden;">
<el-row :gutter="10" style="margin-bottom:10px">
<el-col :span="12" >
<el-card class="box-card" style="padding:0px ;height:425px">
<div slot="header" class="clearfix">
<span>团队信息</span>
</div>
<el-row style="margin-bottom:18px">
<el-row>
<span>团队名称:</span>
<span v-text="this.xmProjectGroupState.groupName"></span>
</el-row>
</el-row>
<el-row style="margin-bottom:18px">
<el-col :span="8" @click="">
<div class="item">
<div class="icon" style="background-color: rgb(79, 140, 255);">
<i class="el-icon-right"></i>
</div>
<div class="info">
<div v-text="this.xmProjectGroupState.taskCnt"></div>
<div class="title">总任务量</div>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="item">
<div class="icon" style="background-color: rgb(255, 153, 51);">
<i class="el-icon-loading"></i>
</div>
<div class="info">
<div v-text="notStart">
</div>
<div class="title">待完成</div>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="item">
<div class="icon" style="background-color: rgb(0, 153, 51);">
<i class="el-icon-check"></i>
</div>
<div class="info">
<div v-text="this.xmProjectGroupState.finishTaskCnt" >
</div>
<div class="title">已完成</div>
</div>
</div>
</el-col>
</el-row>
<el-row style="margin-bottom:18px">
<div class="item">
<div class="icon2" style="background-color: rgb(204, 204, 204);">
<i class="el-icon-date"></i>
</div>
<div class="info">
<div v-text="planStartTime+'~'+planEndTime">
</div>
<div class="title">计划周期</div>
</div>
</div>
</el-row>
<el-row style="margin-bottom:18px">
<div class="item">
<div class="icon2" style="background-color: rgb(204, 204, 204);">
<i class="el-icon-star-off"></i>
</div>
<div class="info">
<div class="title"> 汇总时间 {{this.calcTime}}</div>
</div>
</div>
</el-row>
<el-row style="margin-bottom:18px">
<div class="item">
<div class="icon2" style="background-color: rgb(204, 204, 204);">
<i class="el-icon-refresh"></i>
</div>
<div class="info">
<div class="title"> 关联迭代数 {{(this.xmProjectGroupState.iterationCnt)}} </div>
</div>
</div>
</el-row>
<el-row style="margin-bottom:18px">
<div class="item">
<div class="icon2" style="background-color: rgb(204, 204, 204);">
<i class="el-icon-alarm-clock"></i>
</div>
<div>
<div class="progress-item">
<el-progress v-if="!isNaN(finishRate)" :percentage="finishRate"></el-progress>
<div class="title">任务进度</div>
</div>
</div>
</div>
</el-row>
</el-card>
</el-col>
<el-col :span="12" >
<el-card class="box-card" style="height:425px">
<div slot="header" class="clearfix">
<span>所有工作项数量分布</span>
</div>
<div>
<div id="allChart" :style="{width: '100%', height: '350px'}"></div>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="10" style="margin-bottom:10px">
<el-col :span="12">
<el-card class="box-card" style="padding:0px ;height:425px">
<div slot="header" class="clearfix">
<span>工作量情况</span>
</div>
<div>
<el-row style="padding:25px;">
<div class="item">
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="this.xmProjectGroupState.planWorkload"></span>
<span style="font-size:5px;">h</span>
</div>
<div style="text-align:center;font-size:5px;">计划工作量</div>
</div>
</el-col>
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="this.xmProjectGroupState.actWorkload"></span>
<span style="font-size:5px;">h</span>
</div>
<div style="text-align:center;font-size:5px;">完成工作量</div>
</div>
</el-col>
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="workloadProgress"></span>
<span style="font-size:5px;">%</span>
</div>
<div style="text-align:center;font-size:5px;">工作量进度</div>
</div>
</el-col>
</div>
</el-row>
<el-row style="padding:25px;">
<div class="item">
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="remainWorkload"></span>
<span style="font-size:5px;">h</span>
</div>
<div style="text-align:center;font-size:5px;">剩余工作量</div>
</div>
</el-col>
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="deviation"></span>
<span style="font-size:5px;">h</span>
</div>
<div style="text-align:center;font-size:5px;">预估偏差</div>
</div>
</el-col>
<el-col :span="8">
<div>
<div style="text-align:center;">
<span style="font-size:24px;" v-text="deviationRate"></span>
<span style="font-size:5px;">%</span>
</div>
<div style="text-align:center;font-size:5px;">预估偏差率</div>
</div>
</el-col>
</div>
</el-row>
<el-row>
<span style="margin-left:20px;">工作量预计进度</span>
<el-progress style="width: 90%;margin-left:20px;margin-top: 10px;margin-bottom: 20px;" :text-inside="true"
:stroke-width="24" :percentage="planProgress"></el-progress>
</el-row>
<el-row>
<span style="margin-left:20px;">工作量实际进度</span>
<el-progress style="width: 90%;margin-left:20px;margin-top: 10px;" :text-inside="true" :stroke-width="24"
:percentage="realProgress"></el-progress>
</el-row>
</div>
</el-card>
</el-col>
<el-col :span="12" >
<el-card class="box-card" style="height:425px">
<div slot="header" class="clearfix">
<span>缺陷情况</span>
</div>
<div style="'100%'">
<div id="bugPieChart" :style="{width: '100%', height: '300px'}"></div>
</div>
</el-card>
</el-col>
</el-row>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
])
},
props:['xmProjectGroupState'],
watch: {
},
data() {
return {
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
/**end 在上面加自定义属性**/
}//end return
},//end data
methods: {
},//end method
components: {
},
mounted() {
}//end mounted
}
import util from '@/common/js/util';//
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters(['userInfo','roles']),
finishRate:function (){
return parseFloat(this.xmProjectGroupState.finishRate);
},
notStart: function() {
return this.xmProjectGroupState.taskCnt-this.xmProjectGroupState.finishTaskCnt;
},
planStartTime: function (){
if(this.xmProjectGroupState.planStartTime){
return this.xmProjectGroupState.planStartTime.substring(0,10);
} else{
return '暂无';
}
},
planEndTime: function (){
if(this.xmProjectGroupState.planEndTime){
return this.xmProjectGroupState.planEndTime.substring(0,10);
} else{
return '暂无';
}
},
calcTime:function (){
if(this.xmProjectGroupState.calcTime){
return this.xmProjectGroupState.calcTime.substring(0,10);
}else{
return '暂无';
}
},
workloadProgress:function (){
if(this.xmProjectGroupState && this.xmProjectGroupState.actWorkload){
return Math.round(this.xmProjectGroupState.actWorkload/this.xmProjectGroupState.planWorkload*100);
}else{
return 0;
}
},
deviation:function (){
let now = new Date();
let startTime = new Date(this.xmProjectGroupState.planStartTime);
let endTime = new Date(this.xmProjectGroupState.planEndTime);
let allDays=endTime-startTime;
if(now<=endTime && allDays){
return this.xmProjectGroupState.planWorkload - Math.round((now-startTime)/allDays*this.xmProjectGroupState.planWorkload)
}else{
return this.xmProjectGroupState.actWorkload - this.xmProjectGroupState.planWorkload;
}
},
deviationRate:function (){
if(this.xmProjectGroupState.planWorkload){
return Math.round(this.deviation/this.xmProjectGroupState.planWorkload*100);
}else{
return '暂无';
}
},
remainWorkload:function (){
return this.xmProjectGroupState.planWorkload - this.xmProjectGroupState.actWorkload;
},
planProgress:function (){
let now = new Date();
let startTime = new Date(this.xmProjectGroupState.planStartTime);
let endTime = new Date(this.xmProjectGroupState.planEndTime);
let allDays=endTime-startTime;
if(now<=endTime && allDays){
return Math.round((now-startTime)/allDays*100);
}else{
return 100;
}
},
realProgress:function (){
if(this.xmProjectGroupState.actWorkload < this.xmProjectGroupState.planWorkload && this.xmProjectGroupState.planWorkload){
return Math.round(this.xmProjectGroupState.actWorkload/this.xmProjectGroupState.planWorkload*100);
}else{
return 100;
}
},
xmProjectGroupStateCpd(){
return this.xmProjectGroupState
},
},
props:['xmProjectGroupState'],
watch:{
xmProjectGroupStateCpd:function(){
this.drawAllBar();
this.drawPieBug();
}
},
data() {
return {
isActive:true,
};
},
methods:{
drawAllBar() {
// domecharts
let allChart = this.$echarts.init(document.getElementById("allChart"));
let option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '10%',
containLabel: true
},
yAxis: {
type: 'value'
},
xAxis: {
type: 'category',
data: ['测试案例', '任务', '缺陷']
},
series: [
{
label: {
normal:{
show: true,
position: 'top',
color:'#000000',
}
},
data: [
{
value: this.xmProjectGroupState.testCases,
itemStyle: {
normal:{
color: '#99CCFF'
}
}
},
{
value: this.xmProjectGroupState.taskCnt,
itemStyle: {
normal:{
color: '#99CCFF'
}
}
},
{
value: this.xmProjectGroupState.bugCnt,
itemStyle: {
normal:{
color: '#99CCFF'
}
}
},
],
type: 'bar'
}
]
};
//
allChart.setOption(option);
},
drawPieBug() {
let bugPieChart = this.$echarts.init(document.getElementById("bugPieChart"));
let option = {
tooltip: {
trigger: 'item',
formatter: '{b} : {c} ({d}%)'
},
legend: {
orient: 'vertical',
left: 'left',
},
series: [
{
center:['55%','40%'],//
type: 'pie',
radius: '50%',//
label:{ //
normal:{
show:true,
position:'outer', //:
textStyle : {
fontWeight : 100 ,
fontSize: document.body.clientWidth / 120, //
color: "#000000"
},
formatter:'{b}\n{c}({d}%)',//bname,c:value,d:
alignTo:'edge',
margin:10
}
},
data: [
{value: this.xmProjectGroupState.closedBugs,
itemStyle: {
normal:{
color: '#5470C6'
}
},
name: '已关闭'},
{value: this.xmProjectGroupState.resolvedBugs,
itemStyle: {
normal:{
color: '#91CC75'
}
},
name: '已解决'},
{value: this.xmProjectGroupState.activeBugs,
itemStyle: {
normal:{
color: '#FAC858'
}
},
name: '已激活'},
{value: this.xmProjectGroupState.confirmedBugs,
itemStyle: {
normal:{
color: '#EE6666'
}
},
name: '已确认'},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
//
bugPieChart.setOption(option);
},
drawCasePie() {
let casePie = this.$echarts.init(document.getElementById("casePie"));
let option = {
tooltip: {
trigger: 'item',
formatter: '{b} :<br/> {c} ({d}%)'
},
legend: {
bottom: 10,
left: 'center',
},
series: [
{
center:['55%','40%'],//
type: 'pie',
radius: '50%',//
label:{ //
normal:{
show:true,
position:'outer', //:
textStyle : {
fontWeight : 100 ,
fontSize: document.body.clientWidth / 120, //
color: "#000000"
},
formatter:'{b}\n{c}({d}%)',//bname,c:value,d:
alignTo:'edge',
margin:10
}
},
data: [
{value: this.xmProjectGroupState.execCases,
itemStyle: {
normal:{
color: '#73C0DE'
}
},
name: '测试中案例'},
{value: this.xmProjectGroupState.designCases,
itemStyle: {
normal:{
color: '#FAC858'
}
},
name: '设计中案例'},
{value: this.xmProjectGroupState.finishCases,
itemStyle: {
normal:{
color: '#91CC75'
}
},
name: '完成案例'},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
//
casePie.setOption(option);
},
},
mounted() {
this.$nextTick(() => {
});
this.drawAllBar();
this.drawPieBug();
},
};
</script>
<style scoped>
<style scoped lang="scss">
.container {
margin: 10px;
}
.header {
display: flex;
justify-content: flex-start;
padding: 10px;
span {
padding-right: 15px;
}
}
.col {
margin-bottom: 20px;
}
.icon {
color: #fff;
height: 30px;
width: 30px;
border-radius: 15px;
text-align: center;
line-height: 30px;
font-size: 20px;
display: inline-block;
margin-right: 5px;
}
.icon2 {
color: #000000;
height: 30px;
width: 30px;
border-radius: 15px;
text-align: center;
line-height: 30px;
font-size: 20px;
display: inline-block;
margin-right: 5px;
margin-left: 5px;
}
.item {
display: flex;
justify-content: flex-start;
position: relative;
.progress-item{
position:absolute; width:80%;
}
}
.card-font {
color: #000000;
font-size: 12px;
.el-col {
margin-bottom: 20px;
}
}
.value {
cursor: pointer;
}
.click {
background: #e9f7ff;
}
</style>
</style>
<style>
.app-container{
padding: 20px;
padding-bottom: 0;
}
</style>

6
src/views/xm/core/xmProjectPhase/XmProjectPhaseOverview.vue

@ -235,11 +235,11 @@ export default {
return this.xmProjectPhase.taskCnt-this.xmProjectPhase.finishTaskCnt;
},
taskProgress: function (){
if(this.xmProjectPhase.taskCnt){
return Math.round(this.xmProjectPhase.finishTaskCnt/this.xmProjectPhase.taskCnt*100);
if(this.xmProjectPhase.actRate){
return this.xmProjectPhase.actRate;
}else{
return 0;
};
}
},
phaseBeginDate: function (){
if(this.xmProjectPhase.beginDate){

Loading…
Cancel
Save