Browse Source

优化

master
陈裕财 4 years ago
parent
commit
3a98e1cc66
  1. 12
      src/components/dateRange/index.vue
  2. 78
      src/views/xm/rpt/iteration/burnout.vue
  3. 10
      src/views/xm/rpt/product/menuDayAccumulate.vue
  4. 10
      src/views/xm/rpt/product/menuDayTrend.vue
  5. 11
      src/views/xm/rpt/product/productWorkItemDayList.vue

12
src/components/dateRange/index.vue

@ -1,5 +1,5 @@
<template> <template>
<el-date-picker :type="type" :style="style" v-model="dateRange" :value-format="valueFormat" :format="format"
<el-date-picker :type="type" :style="styleObj" v-model="dateRange" :value-format="valueFormat" :format="format"
unlink-panels unlink-panels
:range-separator="rangeSepaSrator" :range-separator="rangeSepaSrator"
:start-placeholder="startPlaceholder" :start-placeholder="startPlaceholder"
@ -46,9 +46,9 @@ export default {
default: 'startTime' default: 'startTime'
}, },
style:{
styleObj:{
typeof:Object, typeof:Object,
default:{'display':'inline'}
default:function(){return {'display':'inline'}}
}, },
endKey: { endKey: {
@ -80,7 +80,7 @@ export default {
}, },
pickerOptions:{ pickerOptions:{
typeof:Object, typeof:Object,
default:util.pickerOptions('datarange')
default:function(){return util.pickerOptions('datarange')}
}, },
autoDefault:{ autoDefault:{
type:Boolean, type:Boolean,
@ -88,7 +88,9 @@ export default {
}, },
defaultRange:{ defaultRange:{
type:Array, type:Array,
default:[-15,15]
default:function(){
return [-15,15]
}
} }
}, },
methods: { methods: {

78
src/views/xm/rpt/iteration/burnout.vue

@ -1,11 +1,30 @@
<template> <template>
<section> <section>
<el-dialog :title="filters.iteration?'【'+filters.iterationName+'】':''+'迭代燃尽图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<div>
<div class="main" id="burnout"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
<el-dialog :title="( filters.iteration?'【'+filters.iteration.iterationName+'】':'')+'迭代燃尽图'" 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="burnout"
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>
<xm-product-select v-if="!xmProduct&&!xmIteration" 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>
<xm-iteration-select v-if="!xmIteration || !xmIteration.id" style="display:inline;" :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>
<el-button type="primary" icon="el-icon-search" @click="listXmIterationStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -16,9 +35,15 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { listXmIterationStateHis } from '@/api/xm/core/xmIterationStateHis'; import { listXmIterationStateHis } from '@/api/xm/core/xmIterationStateHis';
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default { export default {
components: { components: {
XmIterationSelect,XmProductSelect,
}, },
props:['xmProduct','xmIteration','xmProject'], props:['xmProduct','xmIteration','xmProject'],
computed: { computed: {
@ -62,8 +87,10 @@
}, },
watch: { watch: {
xmIterationStateHiss(){
this.drawWorkload();
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
} }
}, },
data() { data() {
@ -97,7 +124,11 @@
return max; return max;
}, },
listXmIterationStateHis(){ listXmIterationStateHis(){
var params={iterationId:'IT2022-0001-Z5TA',orderBy:'biz_date asc'}
if(!this.filters.iteration|| !this.filters.iteration.id){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中迭代',type:'warning'})
return;
}
var params={iterationId:this.filters.iteration.id,orderBy:'biz_date asc'}
listXmIterationStateHis(params).then(res=>{ listXmIterationStateHis(params).then(res=>{
this.xmIterationStateHiss=res.data.tips.isOk?res.data.data:this.xmIterationStateHiss; this.xmIterationStateHiss=res.data.tips.isOk?res.data.data:this.xmIterationStateHiss;
}) })
@ -112,7 +143,7 @@
}) })
}, },
drawWorkload() {
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("burnout")); this.myChart = this.$echarts.init(document.getElementById("burnout"));
this.myChart.setOption({ this.myChart.setOption({
title: { title: {
@ -188,7 +219,30 @@
}, },
] ]
}) })
}
},
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
},
onProductClear(){
this.filters.product=null
this.xmProductStateHiss=[];
},
onIterationSelected(iteration){
this.filters.iteration=iteration
this.xmProductStateHiss=[];
this.listXmIterationStateHis();
},
onIterationClear(){
this.filters.iteration=null
this.xmProductStateHiss=[];
},
},//end method },//end method
mounted() { mounted() {
/** /**
@ -197,7 +251,7 @@
}) })
*/ */
//this.charts(); //this.charts();
//this.drawWorkload();
//this.drawCharts();
}//end mounted }//end mounted
} }

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

@ -38,7 +38,7 @@
components: { components: {
XmProductSelect, XmProductSelect,
}, },
props:['xmProduct'],
props:['xmProduct','xmProject'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -82,8 +82,12 @@
}, },
watch: { watch: {
xmProductStateHiss(){
this.drawCharts();
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
} }
}, },
data() { data() {

10
src/views/xm/rpt/product/menuDayTrend.vue

@ -40,7 +40,7 @@
components: { components: {
XmProductSelect, XmProductSelect,
}, },
props:['xmProduct'],
props:['xmProduct','xmProject'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -84,8 +84,12 @@
}, },
watch: { watch: {
xmProductStateHiss(){
this.drawCharts();
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
} }
}, },
data() { data() {

11
src/views/xm/rpt/product/productWorkItemDayList.vue

@ -9,7 +9,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="border"> <el-col :span="6" class="border">
<el-form :label-position="'top'" label-width="120px" :model="filters">
<el-form :label-position="'top'" :model="filters">
<el-form-item> <el-form-item>
<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> <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>
@ -38,7 +38,7 @@
components: { components: {
XmProductSelect, XmProductSelect,
}, },
props:['xmProduct'],
props:['xmProduct','xmProject'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -57,8 +57,11 @@
}, },
watch: { watch: {
xmProductStateHiss(){
this.drawCharts();
dataSetCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
} }
}, },
data() { data() {

Loading…
Cancel
Save