【银保app】切换日期请求不同数据

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2022-11-19 18:26:01 +08:00
parent 9cf7914b06
commit 1bea852908

View File

@@ -16,7 +16,7 @@
<img class="mainContainer_title_img" src="@/assets/YB_APP/images/33.png">
<span class="mainContainer_title_span">首期规模保费</span>
</p>
<div class="echartsContent">
<div v-show="echartsData.length != 0" class="echartsContent">
<div class="incomeChart" ref="incomeChart" id="incomeChartId" @click="parentsEvent"></div>
</div>
@@ -327,6 +327,8 @@
}
getPremByAgentCode(params).then(res=>{
if(res.result == 0){
this.echartsData = []
this.incomeOption.series[0].data = []
this.incomeOption.title.text = res.content.decimalAll + '万元'
if(res.content.premDTOList && res.content.premDTOList.length!=0){
this.echartsData = []
@@ -348,14 +350,16 @@
this.echartsData.forEach((item,index)=>{
item.color = this.incomeOption.color[index]
})
}else{
this.echartsData = []
this.incomeOption.series[0].data = []
}
this.incomeChart = echarts.init(this.$refs.incomeChart)
this.incomeChart.on('click',this.echartsClick)
this.incomeChart.setOption(this.incomeOption)
this.$nextTick(()=>{
this.incomeChart = echarts.init(this.$refs.incomeChart)
this.incomeChart.on('click',this.echartsClick)
this.incomeChart.setOption(this.incomeOption)
})
}else{
this.echartsData = []
this.incomeOption.series[0].data = []
this.$toast(res.resultMessage)
}
})
@@ -476,7 +480,17 @@
let yearNum = utils.formatDate(e, 'yyyy')
let monthNum = utils.formatDate(e, 'MM')
this.calendarValue = yearNum+'-'+monthNum
if(this.premType == 'QJ'){
this.getPremByAgentCode()
this.getIndexByAgentCode()
}else{
this.getBankNetDataYB()
if(this.channelORnetworkType == 'channel'){
this.getChannelPerformanceYB()
}else{
this.getBankNetPerformanceYB()
}
}
},
changePremType(type){
if(this.premType != type){