Browse Source

优化

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

12
src/components/dateRange/index.vue

@ -1,5 +1,5 @@
<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
:range-separator="rangeSepaSrator"
:start-placeholder="startPlaceholder"
@ -46,9 +46,9 @@ export default {
default: 'startTime'
},
style:{
styleObj:{
typeof:Object,
default:{'display':'inline'}
default:function(){return {'display':'inline'}}
},
endKey: {
@ -80,7 +80,7 @@ export default {
},
pickerOptions:{
typeof:Object,
default:util.pickerOptions('datarange')
default:function(){return util.pickerOptions('datarange')}
},
autoDefault:{
type:Boolean,
@ -88,7 +88,9 @@ export default {
},
defaultRange:{
type:Array,
default:[-15,15]
default:function(){
return [-15,15]
}
}
},
methods: {

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

@ -1,11 +1,30 @@
<template>
<section>
<el-dialog :title="filters.iteration?'【'+filters.iterationName+'】':''+'迭代燃尽图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<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>
</section>
</template>
@ -16,9 +35,15 @@
import { mapGetters } from 'vuex'
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 {
components: {
XmIterationSelect,XmProductSelect,
},
props:['xmProduct','xmIteration','xmProject'],
computed: {
@ -62,8 +87,10 @@
},
watch: {
xmIterationStateHiss(){
this.drawWorkload();
datesCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
}
},
data() {
@ -97,7 +124,11 @@
return max;
},
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=>{
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.setOption({
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
mounted() {
/**
@ -197,7 +251,7 @@
})
*/
//this.charts();
//this.drawWorkload();
//this.drawCharts();
}//end mounted
}

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

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

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

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

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

@ -9,7 +9,7 @@
</div>
</el-col>
<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>
<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>
@ -38,7 +38,7 @@
components: {
XmProductSelect,
},
props:['xmProduct'],
props:['xmProduct','xmProject'],
computed: {
...mapGetters([
'userInfo','roles'
@ -57,8 +57,11 @@
},
watch: {
xmProductStateHiss(){
dataSetCpd(){
this.$nextTick(()=>{
this.drawCharts();
})
}
},
data() {

Loading…
Cancel
Save