Browse Source

优化

master
陈裕财 4 years ago
parent
commit
5f78055b96
  1. 20
      src/views/xm/rpt/product/menuDayAccumulate.vue
  2. 20
      src/views/xm/rpt/product/menuDayTrend.vue
  3. 6
      src/views/xm/rpt/product/productWorkItemDayList.vue

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

@ -13,6 +13,9 @@
<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>
<el-form-item label="日期区间">
<date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>
@ -100,24 +103,17 @@
}//end return
},//end data
methods: {
findMax( list ) {
var i, max = list[0];
if(list.length < 2) return max;
for (i = 0; i < list.length; i++) {
if (list[i].distBudgetWorkload > max.distBudgetWorkload) {
max = list[i];
}
}
return max;
},
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;
})

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

@ -15,6 +15,9 @@
<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>
<el-form-item label="日期区间">
<date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>
@ -102,24 +105,17 @@
}//end return
},//end data
methods: {
findMax( list ) {
var i, max = list[0];
if(list.length < 2) return max;
for (i = 0; i < list.length; i++) {
if (list[i].distBudgetWorkload > max.distBudgetWorkload) {
max = list[i];
}
}
return max;
},
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;
})

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

@ -12,10 +12,10 @@
<el-form :label-position="'top'" label-width="120px" :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>
<el-form-item label="日期区间">
</el-form-item>
<el-form-item label="日期区间">
<date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></date-range>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>

Loading…
Cancel
Save