Browse Source

优化

master
陈裕财 4 years ago
parent
commit
c4a31c7d1c
  1. 2
      src/views/xm/rpt/product/menuAgeDist.vue
  2. 2
      src/views/xm/rpt/product/menuAttDist.vue
  3. 2
      src/views/xm/rpt/product/menuDayAccumulate.vue
  4. 249
      src/views/xm/rpt/product/menuSort.vue
  5. 2
      src/views/xm/rpt/product/questionAgeDist.vue
  6. 2
      src/views/xm/rpt/product/questionAttDist.vue
  7. 2
      src/views/xm/rpt/product/questionDayAccumulate.vue
  8. 4
      src/views/xm/rpt/product/questionSort.vue
  9. 7
      src/views/xm/rpt/reportIndex.vue

2
src/views/xm/rpt/product/menuAgeDist.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'需求属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'需求属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>

2
src/views/xm/rpt/product/menuAttDist.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'需求属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'需求属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>

2
src/views/xm/rpt/product/menuDayAccumulate.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'需求累积图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'需求累积图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18"> <div>

249
src/views/xm/rpt/product/menuSort.vue

@ -0,0 +1,249 @@
<template>
<section>
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'用户故事排行榜'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>
<div class="main" id="xmMenuSort"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-col>
<el-col :span="6" class="border">
<el-form :label-position="'top'" label-width="120px" :model="filters">
<el-form-item label="分组属性">
<el-select v-model="groupBy" @change="onXmMenuSomeFieldsChange('groupBy',$event)" clearable>
<el-option v-for="i in this.groupBys" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<xm-product-select class="padding" v-if="!xmProduct && !xmIteration" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmIteration?xmIteration.id:null" @clear="onProductClear"></xm-product-select>
<xm-iteration-select ref="xmIterationSelect" class="padding" v-if="!xmIteration || !xmIteration.id" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select>
<el-form-item label="需求状态" prop="status">
<el-select v-model="filters.status" @change="onXmMenuSomeFieldsChange('status',$event)" clearable>
<el-option v-for="i in this.dicts.menuStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="需求类型" prop="dtype" >
<el-select v-model="filters.dtype" @change="onXmMenuSomeFieldsChange('dtype',$event)" clearable>
<el-option v-for="i in this.dicts.demandType" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="需求来源" prop="source">
<el-select v-model="filters.source" @change="onXmMenuSomeFieldsChange('source',$event)" clearable>
<el-option v-for="i in this.dicts.demandSource" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="需求层次" prop="dlvl" >
<el-select v-model="filters.dlvl" @change="onXmMenuSomeFieldsChange('dlvl',$event)" clearable>
<el-option v-for="i in this.dicts.demandLvl" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="优先级" prop="priority" >
<el-select v-model="filters.priority" @change="onXmMenuSomeFieldsChange('priority',$event)" clearable>
<el-option v-for="i in dicts.priority" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchXmMenuSort">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-dialog>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { getXmMenuSort } from '@/api/xm/core/xmMenu';
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
components: {
XmIterationSelect,XmProductSelect,
},
props:['xmProduct','xmIteration','xmProject'],
computed: {
...mapGetters([
'userInfo','roles'
]),
xmMenuSortsCpd(){
if(this.xmMenuSorts.length==0){
return []
}else{
return this.xmMenuSorts.map(i=>i.value)
}
},
title(){
return this.groupBys.find(i=>i.id==this.groupBy).name+'用户故事数量排行榜'
},
legendCpd(){
if(this.xmMenuSorts.length==0){
return []
}else{
return this.xmMenuSorts.map(i=>i.name)
}
}
},
watch: {
xmMenuSortsCpd(){
this.drawCharts();
}
},
data() {
return {
filters:{
product:null,
iteration:null,
},
groupBy:'proposer_id',
groupBys:[
{id:'proposer_id', name:'提出人'},
{id:'mm_userid', name:'负责人'},
],
dicts:{},// 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 },//...
dateRanger:[],
maxTableHeight:300,
visible:false,
xmMenuSorts:[],
pageInfo: {
//
total: 0, //0>0
pageSize: this.queryScope==='plan' || this.queryScope==='planTask'?50:20, //
count: false, //
pageNum: 1, //1
orderFields: ["value"], // ['sex','student_id']
orderDirs: ["desc"], // asc,desc ['asc','desc']
},
}//end return
},//end data
methods: {
open(params){
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
},
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("xmMenuSort"));
this.myChart.setOption(
{
xAxis: {
type: 'category',
data: this.legendCpd
},
yAxis: {
type: 'value'
},
series: [
{
data: this.xmMenuSortsCpd,
type: 'bar'
}
]
}
)
},
onXmMenuSomeFieldsChange(fieldName,$event){
this.xmMenuSorts=[]
},
searchXmMenuSort(){
if(!this.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count: this.pageInfo.count,
};
if(this.filters.dtype){
params.dtype=this.filters.dtype
}
if(this.filters.status){
params.status=this.filters.status
}
if(this.filters.source){
params.source=this.filters.source
}
if(this.filters.dlvl){
params.dlvl=this.filters.dlvl
}
if(this.filters.priority){
params.priority=this.filters.priority
}
params.groupBy=this.groupBy
if(this.filters.product){
params.productId=this.filters.product.id
}
if(this.filters.iteration){
params.iterationId=this.filters.iteration.id
}
if (
this.pageInfo.orderFields != null &&
this.pageInfo.orderFields.length > 0
) {
let orderBys = [];
for (var i = 0; i < this.pageInfo.orderFields.length; i++) {
orderBys.push(
this.pageInfo.orderFields[i] + " " + this.pageInfo.orderDirs[i]
);
}
params.orderBy = orderBys.join(",");
}
getXmMenuSort(params).then(res=>{
this.xmMenuSorts=res.data.data
})
},
onProductSelected(product){
this.filters.product=product
},
onProductClear(){
this.filters.product=null
},
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onIterationClear(){
this.filters.iteration=null
}
},//end method
mounted() {
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{
this.dicts=res.data.data;
})
//this.charts();
//this.drawCharts();
}//end mounted
}
</script>
<style scoped>
.image {
width: 100%;
display: block;
}
</style>

2
src/views/xm/rpt/product/questionAgeDist.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'缺陷属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'缺陷属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>

2
src/views/xm/rpt/product/questionAttDist.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'缺陷属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'缺陷属性分布'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>

2
src/views/xm/rpt/product/questionDayAccumulate.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'缺陷累积图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'缺陷累积图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18"> <div>

4
src/views/xm/rpt/product/questionSort.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'缺陷排行榜'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'缺陷排行榜'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div>
@ -132,7 +132,7 @@
pageInfo: {
//
total: 0, //0>0
pageSize: this.queryScope==='plan' || this.queryScope==='planTask'?50:20, //
pageSize: 20, //
count: false, //
pageNum: 1, //1
orderFields: ["value"], // ['sex','student_id']

7
src/views/xm/rpt/reportIndex.vue

@ -26,6 +26,7 @@
<xm-menu-day-accumulate ref="xmMenuDayAccumulate"></xm-menu-day-accumulate>
<xm-menu-att-dist ref="xmMenuAttDist"></xm-menu-att-dist>
<xm-menu-age-dist ref="xmMenuAgeDist"></xm-menu-age-dist>
<xm-menu-sort ref="xmMenuSort"></xm-menu-sort>
<xm-question-day-trend ref="xmQuestionDayTrend"></xm-question-day-trend>
@ -46,6 +47,7 @@
import xmMenuDayAccumulate from './product/menuDayAccumulate'
import xmMenuAttDist from './product/menuAttDist'
import xmMenuAgeDist from './product/menuAgeDist'
import xmMenuSort from './product/menuSort'
import xmProductWorkItemDayList from './product/productWorkItemDayList'
@ -65,7 +67,7 @@
export default {
components: {
xmIterationBurnout,xmMenuDayTrend,xmMenuDayAccumulate,xmMenuAttDist,xmMenuAgeDist,xmProductWorkItemDayList,xmQuestionDayTrend,xmQuestionDayAccumulate,xmQuestionAttDist,xmQuestionAgeDist,xmQuestionSort,
xmIterationBurnout,xmMenuDayTrend,xmMenuDayAccumulate,xmMenuAttDist,xmMenuAgeDist,xmMenuSort,xmProductWorkItemDayList,xmQuestionDayTrend,xmQuestionDayAccumulate,xmQuestionAttDist,xmQuestionAgeDist,xmQuestionSort,
},
props:['xmProduct','xmIteration','xmProject'],
computed: {
@ -112,13 +114,14 @@
{rptName:'需求每日累积',category:'产品级',ref:'xmMenuDayAccumulate',desc:'跟踪未开始、执行中、已完成、已关闭状态的需求数量按日期累积情况,识别需求工作的瓶颈',img:areaStack },
{rptName:'需求属性分布',category:'产品级',ref:'xmMenuAttDist',desc:'统计所有需求任意属性数量分布情况(实时数据)',img:pieSimple },
{rptName:'需求年龄分布',category:'产品级',ref:'xmMenuAgeDist',desc:'统计所有需求年龄分布情况(实时数据)',img:pieSimple },
{rptName:'需求排行榜',category:'产品级',ref:'xmMenuSort',desc:'需求提出人、负责人的用户故事数量排行(实时数据)',img:bar },
{rptName:'产品工作项每日趋势',category:'产品级',ref:'productWorkItemDayList',desc:'统计产品每日工作项数量分布情况',img:datasetLink },
{rptName:'缺陷每日趋势',category:'产品级',ref:'xmQuestionDayTrend',desc:'跟踪新提出、执行中、已解决、已关闭状态的缺陷数量按日期变化趋势,识别缺陷处理工作情况',img:lineStack },
{rptName:'缺陷每日累积',category:'产品级',ref:'xmQuestionDayAccumulate',desc:'跟踪新提出、执行中、已解决、已关闭状态的缺陷数量按日期累积情况,识别缺陷处理工作的瓶颈',img:areaStack },
{rptName:'缺陷属性分布',category:'产品级',ref:'xmQuestionAttDist',desc:'统计所有缺陷任意属性数量分布情况(实时数据)',img:pieSimple },
{rptName:'缺陷年龄分布',category:'产品级',ref:'xmQuestionAgeDist',desc:'统计所有缺陷年龄分布情况(实时数据)',img:pieSimple },
{rptName:'缺陷排行榜',category:'产品级',ref:'xmQuestionSort',desc:'统计所有缺陷按提出人、创建人、负责人、故事等维度统计排行(实时数据)',img:bar },
{rptName:'缺陷排行榜',category:'产品级',ref:'xmQuestionSort',desc:'从缺陷提出人、创建人、负责人、故事等维度统计缺陷数量排行(实时数据)',img:bar },
],
}//end return
},//end data

Loading…
Cancel
Save