Browse Source

优化

master
陈裕财 4 years ago
parent
commit
ad76ea816a
  1. 40
      src/views/xm/rpt/product/menuDayTrend.vue
  2. 1
      src/views/xm/rpt/product/productWorkItemDayList.vue

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

@ -1,11 +1,26 @@
<template> <template>
<section> <section>
<el-dialog :title="filters.product?'产品【'+filters.product.productName+'】':''+'需求每日趋势'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog :title="(filters.product?'产品【'+filters.product.productName+'】':'')+'需求每日趋势'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
<div> <div>
<div class="main" id="menuDayTrend" <div class="main" id="menuDayTrend"
style="width:100%;height:600px;margin:0 auto;"></div> style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div> <div class="progress"></div>
</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" 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>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -16,9 +31,11 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis'; import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default { export default {
components: { components: {
XmProductSelect,
}, },
props:['xmProduct'], props:['xmProduct'],
computed: { computed: {
@ -98,7 +115,11 @@
return max; return max;
}, },
listXmProductStateHis(){ listXmProductStateHis(){
var params={productId:'mmcloud-xm',orderBy:'biz_date asc'}
if(!this.filters.product){
this.$notify({showClose:true,message:'请先选中产品',type:'warning'})
return;
}
var params={productId:this.filters.product.id,orderBy:'biz_date asc'}
listXmProductStateHis(params).then(res=>{ listXmProductStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
}) })
@ -199,7 +220,20 @@
] ]
} }
) )
}
},
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
},
onProductClear(){
this.filters.product=null
this.xmProductStateHiss=[];
},
},//end method },//end method
mounted() { mounted() {
/** /**

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

@ -212,6 +212,7 @@
onProductSelected(product){ onProductSelected(product){
this.filters.product=product this.filters.product=product
this.xmProductStateHiss=[]; this.xmProductStateHiss=[];
this.listXmProductStateHis();
}, },
onProductClear(){ onProductClear(){

Loading…
Cancel
Save