|
@@ -10,7 +10,7 @@
|
|
|
<div class="chart">
|
|
|
<div id="financialCollectionAnalysisChart" style="height: 300px;" ref="chartRef"></div>
|
|
|
</div>
|
|
|
- <div style="font-size: 16px">{{tableParam.content.unwriteoffamounttype}}</div>
|
|
|
+ <div style="font-size: 16px">{{tableParam.content.unwriteoffamounttype?tableParam.content.unwriteoffamounttype:''}}</div>
|
|
|
<div :style="{height:list.length < 5 ? '366px':'985px'}">
|
|
|
<tableTemplate style="margin-top: 10px" ref="table" :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="list.length < 5 ? '242px':'862px'">
|
|
|
<template v-slot:customcol="scope">
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
return {
|
|
|
key: item.key,
|
|
|
typr: item.typr,
|
|
|
- value: Math.round(((item.value /10000)*100)/100)
|
|
|
+ value: Math.round(((item.value)*100)/100)
|
|
|
}
|
|
|
})
|
|
|
this.chartBar.changeData(this.chartData)
|
|
@@ -118,12 +118,22 @@ export default {
|
|
|
xField: 'value',
|
|
|
yField: 'typr',
|
|
|
seriesField: 'key',
|
|
|
- interactions: [{ type: 'element-single-selected' }],
|
|
|
+ tooltip: {
|
|
|
+ formatter: (datum) => {
|
|
|
+ console.log(datum,'datum')
|
|
|
+ return {
|
|
|
+ name:datum.key,
|
|
|
+ value:'¥'+this.tool.formatAmount(datum.value,2)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
this.chartBar.render()
|
|
|
+ this.chartBar.on('tooltip:change',ev=>{
|
|
|
+ this.hoverData = ev.data.items[0]
|
|
|
+ })
|
|
|
this.chartBar.on('plot:click',ev=>{
|
|
|
- const states = this.chartBar.getStates();
|
|
|
- this.tableParam.content.unwriteoffamounttype = states.length === 0 ? '' : ev.data.data.typr
|
|
|
+ this.tableParam.content.unwriteoffamounttype = this.hoverData.data.typr
|
|
|
this.tableParam.content.pageNumber = 1
|
|
|
this.tableData(this.param.content.dataid)
|
|
|
})
|