|
|
@@ -4,11 +4,11 @@
|
|
|
<StatisticsTitle :genre="0" :leftText="'财务汇总占比'" :rightText="'同比环比'" @onHandle="onHandle"></StatisticsTitle>
|
|
|
<view class="content_chart row-justify-sb center">
|
|
|
<view class="chart_item column-c sys-from-background-color m-r30 r-20 p-tb20">
|
|
|
- <CircleChart :bgColor="'#2B7DFA'"></CircleChart>
|
|
|
+ <CircleChart ref="outObj" :bgColor="'#2B7DFA'"></CircleChart>
|
|
|
<text class="size-24 sys-from-background-color m-t16">放款</text>
|
|
|
</view>
|
|
|
<view class="chart_item column-c sys-from-background-color r-20 p-tb20">
|
|
|
- <CircleChart :bgColor="'#ED9A2C'"></CircleChart>
|
|
|
+ <CircleChart ref="putObj" :bgColor="'#ED9A2C'"></CircleChart>
|
|
|
<text class="size-24 sys-from-background-color m-t16">回款</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -20,21 +20,50 @@
|
|
|
import StatisticsTitle from "./statistics_title.vue";
|
|
|
|
|
|
export default {
|
|
|
- name: 'content_chart',
|
|
|
+ name: 'stat_finance_chart',
|
|
|
+ props:{
|
|
|
+ 'moneyData':{
|
|
|
+ default:()=>{
|
|
|
+ return {
|
|
|
+ out_money: 0,
|
|
|
+ out_num: 0,
|
|
|
+ put_money: 0,
|
|
|
+ put_num: 0,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
CircleChart,
|
|
|
StatisticsTitle
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'moneyData':function (){
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ 'outRatio':function (){
|
|
|
+ this.$refs.outObj.setServerData(this.outRatio)
|
|
|
+ },
|
|
|
+ 'putRatio':function () {
|
|
|
+ this.$refs.putObj.setServerData(this.putRatio)
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ totalMoney:0,
|
|
|
+ outRatio:0,
|
|
|
+ putRatio:0,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- onHandle() {
|
|
|
- console.log(999);
|
|
|
- // 业务跳转
|
|
|
- }
|
|
|
+ initData(){
|
|
|
+ this.totalMoney=this.moneyData.out_money+this.moneyData.put_money
|
|
|
+ if(this.totalMoney>0){
|
|
|
+ this.outRatio=(this.moneyData.out_money/this.totalMoney).toFixed(2)
|
|
|
+ this.putRatio=(this.moneyData.put_money/this.totalMoney).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|