Browse Source

优化报告

master
陈裕财 3 years ago
parent
commit
b9467209bb
  1. 4
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 21
      src/views/xm/core/xmTestPlan/rpt/CompsSet.vue
  3. 44
      src/views/xm/core/xmTestPlan/rpt/biz/questionAskUserSort.vue
  4. 259
      src/views/xm/core/xmTestPlan/rpt/biz/questionDayAccumulate.vue
  5. 257
      src/views/xm/core/xmTestPlan/rpt/biz/questionDayTrend.vue
  6. 44
      src/views/xm/core/xmTestPlan/rpt/biz/questionFuncSort.vue
  7. 44
      src/views/xm/core/xmTestPlan/rpt/biz/questionHandlerUserSort.vue
  8. 44
      src/views/xm/core/xmTestPlan/rpt/biz/questionMenuSort.vue
  9. 58
      src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue

4
src/views/xm/core/xmTestPlan/rpt/CompsCard.vue

@ -67,9 +67,7 @@ export default {
GridLayout: VueGridLayout.GridLayout,
GridItem: VueGridLayout.GridItem,
XmTestPlanMng,
XmQuestionAgeDist,
xmQuestionDayTrend,
xmQuestionDayAccumulate,
XmQuestionAgeDist,
xmQuestionAttDist,
xmQuestionSort,
xmTestPlanCaseExecStatusDist,

21
src/views/xm/core/xmTestPlan/rpt/CompsSet.vue

@ -87,6 +87,27 @@ export default {
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionMenuDist',
icon: img4,
compName: '缺陷故事分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionAskUserSort',
icon: img4,
compName: '缺陷提出人排行榜',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionHandlerUserSort',
icon: img4,
compName: '缺陷人员排行榜',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionStateDist',
icon: img4,

44
src/views/xm/core/xmTestPlan/rpt/biz/questionAskUserSort.vue

@ -0,0 +1,44 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :rpt-config-visible="rptConfigVisible" :group-by="'ask_userid'"/>
</el-row>
</section>
</template>
<script>
import questionSort from './questionSort'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
components: {questionSort},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

259
src/views/xm/core/xmTestPlan/rpt/biz/questionDayAccumulate.vue

@ -1,259 +0,0 @@
<template>
<section>
<el-row :gutter="5">
<el-col :span="18"> <div>
<div class="main" id="questionDayAccumulate"
style="width:100%;height:600px;margin:0 auto;"></div>
</div>
</el-col>
<el-col :span="6" class="border padding">
<el-form :model="filters">
<el-form-item label="归属产品">
<xm-product-select v-if="!xmProduct" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" @clear="onProductClear"></xm-product-select>
</el-form-item>
<el-form-item label="日期区间">
<br>
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></mdp-date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
components: {
XmProductSelect,
},
props:['xmProduct','xmProject'],
computed: {
...mapGetters([
'userInfo','roles'
]),
datesCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.bizDate)
}
},
closedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.closedBugs)
}
},
activeBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=> i.menuUnstartCnt)
}
},
confirmedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=> i.confirmedBugs)
}
},
resolvedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.resolvedBugs)
}
},
},
watch: {
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
}
},
data() {
return {
filters:{
category:'',
product:null,
project:null,
},
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,
xmProductStateHiss:[],
}//end return
},//end data
methods: {
listXmProductStateHis(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
}
var params={productId:this.filters.product.id,orderBy:'biz_date asc'}
if(this.filters.startBizDate && this.filters.endBizDate){
params.startBizDate=this.filters.startBizDate;
params.endBizDate=this.filters.endBizDate;
}
listXmProductStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
})
},
open(params){
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
this.xmProductStateHiss=[]
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect();
this.$nextTick(()=>{
this.listXmProductStateHis();
})
},
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("questionDayAccumulate"));
this.myChart.setOption(
{
title: {
text: '缺陷累积图'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['新提出', '执行中', '已解决', '已关闭']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.datesCpd,
},
yAxis: {
type: 'value'
},
series: [
{
name: '新提出',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: this.activeBugsCpd
},
{
name: '执行中',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: this.confirmedBugsCpd,
},
{
name: '已解决',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: this.resolvedBugsCpd,
},
{
name: '已关闭',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
label: {
show: true,
position: 'top'
},
data: this.closedBugsCpd,
}
]
}
)
},
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
},
onProductClear(){
this.filters.product=null
this.xmProductStateHiss=[];
},
},//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>

257
src/views/xm/core/xmTestPlan/rpt/biz/questionDayTrend.vue

@ -1,257 +0,0 @@
<template>
<section>
<el-row :gutter="5">
<el-col :span="18">
<div>
<div class="main" id="questionDayTrend"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-col>
<el-col :span="6" class="border padding">
<el-form :model="filters">
<el-form-item label="归属产品" v-if="!xmProduct" >
<xm-product-select ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" @clear="onProductClear"></xm-product-select>
</el-form-item>
<el-form-item label="日期区间">
<br>
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></mdp-date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
components: {
XmProductSelect,
},
props:['xmProduct','xmProject'],
computed: {
...mapGetters([
'userInfo','roles'
]),
datesCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.bizDate)
}
},
closedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.closedBugs)
}
},
activeBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=> i.activeBugs)
}
},
confirmedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=> i.confirmedBugs)
}
},
resolvedBugsCpd(){
if(this.xmProductStateHiss.length==0){
return []
}else{
return this.xmProductStateHiss.map(i=>i.resolvedBugs)
}
},
},
watch: {
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
}
},
data() {
return {
filters:{
category:'',
product:null,
project:null,
},
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,
xmProductStateHiss:[],
}//end return
},//end data
methods: {
listXmProductStateHis(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
}
var params={productId:this.filters.product.id,orderBy:'biz_date asc'}
if(this.filters.startBizDate && this.filters.endBizDate){
params.startBizDate=this.filters.startBizDate;
params.endBizDate=this.filters.endBizDate;
}
listXmProductStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
})
},
open(params){
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect();
this.$nextTick(()=>{
this.listXmProductStateHis();
})
},
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("questionDayTrend"));
this.myChart.setOption(
{
legend: {
right: 40,
data: ['新提出','执行中','已解决','已关闭']
},
xAxis: {
type: 'category',
data: this.datesCpd
},
yAxis: {
type: 'value'
},
series: [
{
name:'新提出',
data: this.activeBugsCpd,
type: 'line',
smooth: true,
itemStyle: {
normal: {
//
color: 'orange',
lineStyle: {
// 线
color: 'orange'
}
}
},
},
{
name:'执行中',
data: this.confirmedBugsCpd,
type: 'line',
smooth: true,
itemStyle: {
normal: {
//
color: 'blue',
lineStyle: {
// 线
color: 'blue'
}
}
},
},
{
name:'已解决',
data: this.resolvedBugsCpd,
type: 'line',
smooth: true,
itemStyle: {
normal: {
//
color: 'green',
lineStyle: {
// 线
color: 'green'
}
}
},
},
{
name:'已关闭',
data: this.closedBugsCpd,
type: 'line',
smooth: true,
itemStyle: {
normal: {
//
color: 'red',
lineStyle: {
// 线
color: 'red'
}
}
},
}
]
}
)
},
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
},
onProductClear(){
this.filters.product=null
this.xmProductStateHiss=[];
},
},//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>

44
src/views/xm/core/xmTestPlan/rpt/biz/questionFuncSort.vue

@ -0,0 +1,44 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :rpt-config-visible="rptConfigVisible" :group-by="'func_id'"/>
</el-row>
</section>
</template>
<script>
import questionSort from './questionSort'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
components: {questionSort},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

44
src/views/xm/core/xmTestPlan/rpt/biz/questionHandlerUserSort.vue

@ -0,0 +1,44 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :rpt-config-visible="rptConfigVisible" :group-by="'handler_userid'"/>
</el-row>
</section>
</template>
<script>
import questionSort from './questionSort'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
components: {questionSort},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

44
src/views/xm/core/xmTestPlan/rpt/biz/questionMenuSort.vue

@ -0,0 +1,44 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :rpt-config-visible="rptConfigVisible" :group-by="'menu_id'"/>
</el-row>
</section>
</template>
<script>
import questionSort from './questionSort'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
components: {questionSort},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

58
src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue

@ -1,15 +1,10 @@
<template>
<section>
<el-row :gutter="5">
<el-col :span="18">
<div>
<div class="main" id="xmQuestionSort"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-col>
<el-col :span="6" class="border padding">
<el-form :model="filters">
<el-row class="padding">
<span>{{comp?comp.compName:'缺陷排行榜'}}</span>
<el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300">
<el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button>
<el-form :model="filters">
<el-form-item label="分组属性">
<el-select v-model="groupBy" @change="onXmQuestionSomeFieldsChange('groupBy',$event)" clearable>
<el-option v-for="i in this.groupBys" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -61,7 +56,14 @@
<el-button type="primary" icon="el-icon-search" @click="searchXmQuestionSort">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-popover>
</el-row>
<el-row >
<div>
<div class="main" id="xmQuestionSort"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-row>
</section>
</template>
@ -81,7 +83,7 @@
components: {
XmIterationSelect,XmProductSelect,
},
props:['xmProduct','xmIteration','xmProject'],
props:['xmTestPlan','xmRptConfig','comp','groupBy'],
computed: {
...mapGetters([
'userInfo','roles'
@ -94,7 +96,7 @@
}
},
title(){
return this.groupBys.find(i=>i.id==this.groupBy).name+'排行榜'
return this.groupBys.find(i=>i.id==this.filters.groupBy).name+'排行榜'
},
legendCpd(){
if(this.xmQuestionSorts.length==0){
@ -112,11 +114,9 @@
},
data() {
return {
filters:{
product:null,
iteration:null,
filters:{
groupBy:'handler_userid',
},
groupBy:'handler_userid',
groupBys:[
{id:'create_userid', name:'创建人'},
{id:'ask_userid', name:'提出人'},
@ -174,7 +174,7 @@
this.xmQuestionSorts=[]
},
searchXmQuestionSort(){
if(!this.groupBy){
if(!this.filters.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
@ -205,7 +205,7 @@
if(this.filters.priority){
params.priority=this.filters.priority
}
params.groupBy=this.groupBy
params.groupBy=this.filters.groupBy
if(this.filters.product){
params.productId=this.filters.product.id
}
@ -247,12 +247,32 @@
onIterationClear(){
this.filters.iteration=null
} ,
initData(){
if(this.groupBy){
this.filters.groupBy=this.groupBy
}
if(this.xmTestPlan){
this.filters.productId=this.xmTestPlan.productId
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.comp.id)
if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{
this.filters[k.id]=k.value
})
}
}
}
},//end method
mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{
this.dicts=res.data.data;
})
this.initData();
this.searchXmQuestionSort();
//this.charts();
//this.drawCharts();

Loading…
Cancel
Save