Browse Source

优化

master
陈裕财 3 years ago
parent
commit
c999947aee
  1. 7
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 30
      src/views/xm/core/xmTestPlan/rpt/CompsSet.vue
  3. 30
      src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue

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

@ -2,7 +2,7 @@
<section>
<el-row v-if="rptConfigVisible" class="page-center border">
<el-col :span="6" :style="{height:maxTableHeight+'px',overflow:'auto'}">
<comps-set :comp-ids="compIds"></comps-set>
<comps-set :comp-ids="compIds" @row-click="onCompSelect"></comps-set>
</el-col>
<el-col :span="18" :style="{height:maxTableHeight+'px',overflow:'auto'}" ref="table">
<div>
@ -47,6 +47,7 @@
<script>
import util from '@/common/js/util';//
import seq from '@/common/js/sequence';//
import VueGridLayout from 'vue-grid-layout';
import { mapGetters } from 'vuex'
import XmTestPlanMng from '@/views/xm/core/xmTestPlan/XmTestPlanMng'
@ -138,6 +139,10 @@ export default {
}else{
this.compCfgList=JSON.parse(JSON.stringify(this.initCompCfg))
}
},
onCompSelect(comp){
var compCfg={compId:comp.compId,name:comp.name,id:comp.compId+seq.sn(),params:[]}
this.compCfgList.push(compCfg)
}
},

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

@ -4,7 +4,7 @@
<div class="nav_item" :class="{itemActive: item.isChecked}" v-for="(item, index) in compsCpd" :key="index" @click="selectItem(item, index)">
<img :src="item.icon" alt="">
<div class="desc">
<p>{{item.compName}}</p>
<p>{{item.name}}</p>
<span>
{{item.compDesc}}
</span>
@ -48,91 +48,91 @@ export default {
{
compId: 'xmTestRptOverview',
icon: img1,
compName: '报告总览',
name: '报告总览',
compDesc: '可以直接显示全部待审批列表,也可根据审批分类详细筛选单条待审批事项',
isChecked: false,
},
{
compId: 'xmTestRptSummary',
icon: img2,
compName: '报告总结',
name: '报告总结',
compDesc: '可以直接显示全部任务列表,也可根据状态、类型详细筛选分类的任务',
isChecked: false,
},
{
compId: 'xmTestPlanCaseExecStatusDist',
icon: img3,
compName: '执行结果分布',
name: '执行结果分布',
compDesc: '可以直接显示全部项目列表,也可根据项目状态产品筛选单条项目',
isChecked: false,
},
{
compId: 'xmTestPlanCaseUserDist',
icon: img3,
compName: '成员执行结果分布',
name: '成员执行结果分布',
compDesc: '可以直接显示全部项目列表,也可根据项目状态产品筛选单条项目',
isChecked: false,
},
{
compId: 'xmTestDayTimesCalc',
icon: img4,
compName: '每日测试次数统计',
name: '每日测试次数统计',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionFuncDist',
icon: img4,
compName: '缺陷模块分布',
name: '缺陷模块分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionMenuDist',
icon: img4,
compName: '缺陷故事分布',
name: '缺陷故事分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionAskUserSort',
icon: img4,
compName: '缺陷提出人排行榜',
name: '缺陷提出人排行榜',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionHandlerUserSort',
icon: img4,
compName: '缺陷人员排行榜',
name: '缺陷人员排行榜',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionStateDist',
icon: img4,
compName: '缺陷状态分布',
name: '缺陷状态分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionReTestingDist',
icon: img4,
compName: '缺陷回归分布',
name: '缺陷回归分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionAttDist',
icon: img4,
compName: '缺陷属性分布',
name: '缺陷属性分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
},
{
compId: 'xmQuestionAgeDist',
icon: img4,
compName: '缺陷年龄分布',
name: '缺陷年龄分布',
compDesc: '可以直接显示全部产品列表,可新增我的产品',
isChecked: false,
}
@ -143,7 +143,7 @@ export default {
methods: {
selectItem(item){
item.isChecked=!item.isChecked
this.$emit("row-click",item)
}

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

@ -1,7 +1,7 @@
<template>
<section>
<el-row class="padding">
<span>{{comp?comp.compName:'缺陷排行榜'}}</span>
<span>{{compCfg?compCfg.name:'缺陷排行榜'}}</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">
@ -10,12 +10,6 @@
<el-option v-for="i in this.groupBys" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="归属产品" v-if="!xmProduct && !xmIteration">
<xm-product-select 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>
</el-form-item>
<el-form-item label="归属迭代" v-if="!xmIteration || !xmIteration.id">
<xm-iteration-select ref="xmIterationSelect" :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>
<el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -89,24 +83,24 @@
'userInfo','roles'
]),
xmQuestionSortsCpd(){
if(this.xmQuestionSorts.length==0){
if(!this.xmQuestionSorts || this.xmQuestionSorts.length==0){
return []
}else{
return this.xmQuestionSorts.map(i=>i.value)
}
},
title(){
return compCfg.name
return this.compCfg.name
},
legendCpd(){
if(this.xmQuestionSorts.length==0){
if(!this.xmQuestionSorts || this.xmQuestionSorts.length==0){
return []
}else{
return this.xmQuestionSorts.map(i=>i.name)
}
},
id(){
return compCfg.id
return this.compCfg.id
},
@ -134,6 +128,7 @@
maxTableHeight:300,
visible:false,
xmQuestionSorts:[],
conditionBtnVisible:false,
pageInfo: {
//
total: 0, //0>0
@ -147,13 +142,6 @@
}//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(this.id));
this.myChart.setOption(
@ -233,9 +221,9 @@
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.compCfg && compCfg.id){
if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{
if(this.compCfg && this.compCfg.id){
if(this.compCfg && this.compCfg.params){
this.compCfg.params.forEach(k=>{
this.filters[k.id]=k.value
})
}

Loading…
Cancel
Save