|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="">
|
|
<view class="">
|
|
|
- <StatSingleData :is_fixed="is_tabs_fixed"></StatSingleData>
|
|
|
|
|
- <StatLoanChart :genre="1" :leftText="'放款汇总占比'"></StatLoanChart>
|
|
|
|
|
- <StatLoanChart :genre="2" :leftText="'回款汇总占比'"></StatLoanChart>
|
|
|
|
|
- <StatRanking is_group :leftText="'汇总明细'"></StatRanking>
|
|
|
|
|
|
|
+ <HeadData :money-data="moneyData"></HeadData>
|
|
|
|
|
+ <StatLoanChart ref="outObj" :genre="1" :leftText="'放款汇总占比'"></StatLoanChart>
|
|
|
|
|
+ <StatLoanChart ref="putObj" :genre="2" :leftText="'回款汇总占比'"></StatLoanChart>
|
|
|
|
|
+ <stat_gather is_group :leftText="'汇总明细'" :out-list="outList" :put-list="putList"></stat_gather>
|
|
|
<view class="sys-background-fff r-30">
|
|
<view class="sys-background-fff r-30">
|
|
|
<StatCapital :leftColor="0" :rightColor="1" :leftText="'任务资金汇总'">
|
|
<StatCapital :leftColor="0" :rightColor="1" :leftText="'任务资金汇总'">
|
|
|
</StatCapital>
|
|
</StatCapital>
|
|
@@ -19,19 +19,122 @@
|
|
|
import StatRanking from "../module/stat_ranking.vue"
|
|
import StatRanking from "../module/stat_ranking.vue"
|
|
|
import StatCapital from "../module/stat_capital.vue"
|
|
import StatCapital from "../module/stat_capital.vue"
|
|
|
import StatSituation from "../module/stat_situation.vue"
|
|
import StatSituation from "../module/stat_situation.vue"
|
|
|
|
|
+ import HeadData from "@/pages/statistics/module/head_data.vue";
|
|
|
|
|
+ import { getDepartmentMoney} from "@/api/statistics";
|
|
|
|
|
+ import md5 from "js-md5";
|
|
|
|
|
+ import Stat_gather from "@/pages/statistics/module/stat_gather.vue";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ props:{
|
|
|
|
|
+ 'dateTypeObj':{
|
|
|
|
|
+ default:()=>{
|
|
|
|
|
+ return {
|
|
|
|
|
+ dateType:4,
|
|
|
|
|
+ selectDate:'2023-02-25',
|
|
|
|
|
+ money_type:1,
|
|
|
|
|
+ censusUserType:0,
|
|
|
|
|
+ product_id:5,
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ Stat_gather,
|
|
|
|
|
+ HeadData,
|
|
|
StatLoanChart,
|
|
StatLoanChart,
|
|
|
StatRanking,
|
|
StatRanking,
|
|
|
StatCapital,
|
|
StatCapital,
|
|
|
StatSituation
|
|
StatSituation
|
|
|
},
|
|
},
|
|
|
|
|
+ watch:{
|
|
|
|
|
+ 'dateTypeObj':function () {
|
|
|
|
|
+ this.initData()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.initData()
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
-
|
|
|
|
|
|
|
+ moneyData:{
|
|
|
|
|
+ out_money: 0,
|
|
|
|
|
+ out_num: 0,
|
|
|
|
|
+ put_money: 0,
|
|
|
|
|
+ put_num: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ outList:[],
|
|
|
|
|
+ putList:[],
|
|
|
|
|
+ sendMd5:''
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ setSendMd5(){
|
|
|
|
|
+ let str=JSON.stringify(this.dateTypeObj)
|
|
|
|
|
+ return md5(str)
|
|
|
|
|
+ },
|
|
|
|
|
+ initData(){
|
|
|
|
|
+ if(this.dateTypeObj.censusUserType>0){
|
|
|
|
|
+ let sendMd5=this.setSendMd5()
|
|
|
|
|
+ if(sendMd5 !== this.sendMd5){
|
|
|
|
|
+ this.sendMd5=sendMd5
|
|
|
|
|
+ this.getDepartmentMoney(1)
|
|
|
|
|
+ this.getDepartmentMoney(2)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getDepartmentMoney(money_type){
|
|
|
|
|
+ let selectData=this.dateTypeObj
|
|
|
|
|
+ selectData.money_type=money_type
|
|
|
|
|
+ getDepartmentMoney(selectData).then((res)=>{
|
|
|
|
|
+ if(res.code === 1){
|
|
|
|
|
+ if(money_type===1){
|
|
|
|
|
+ this.moneyData.out_money=res.data.moneyData.loanMoney
|
|
|
|
|
+ this.moneyData.out_num=res.data.moneyData.loanNum
|
|
|
|
|
+ this.outList=res.data.items
|
|
|
|
|
+ this.$refs.outObj.setPeakChartData(this.outList)
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.moneyData.put_money=res.data.moneyData.loanMoney
|
|
|
|
|
+ this.moneyData.put_num=res.data.moneyData.loanNum
|
|
|
|
|
+ this.putList=res.data.items
|
|
|
|
|
+ this.$refs.putObj.setPeakChartData(this.putList)
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.list = res.data.items
|
|
|
|
|
+ // this.userType = res.data.userType
|
|
|
|
|
+ // let ret = {series: [{data: []}]};
|
|
|
|
|
+ // let totalMoney=0;
|
|
|
|
|
+ // let totalNum=0;
|
|
|
|
|
+ // res.data.items.forEach(v=>{
|
|
|
|
|
+ // if(v.value > 0){
|
|
|
|
|
+ // totalMoney+=(v.value*1)
|
|
|
|
|
+ // totalNum+=(v.total_num*1)
|
|
|
|
|
+ // ret.series[0].data.push(v)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.totalMoney=totalMoney
|
|
|
|
|
+ // this.totalNum=totalNum
|
|
|
|
|
+ // let moneyData={
|
|
|
|
|
+ // censusUserType:this.selectData.censusUserType,
|
|
|
|
|
+ // totalNum: res.data.moneyData.loanNum,
|
|
|
|
|
+ // totalMoney: res.data.moneyData.loanMoney,
|
|
|
|
|
+ // money_type:this.selectData.money_type,
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.$emit('SetTotalMoneyOrNum',moneyData)
|
|
|
|
|
+ // this.$refs.chartsMountView.show = true
|
|
|
|
|
+ // this.$refs.chartsMountView.chartData = JSON.parse(JSON.stringify(ret));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // this.lisy = []
|
|
|
|
|
+ // let moneyData={
|
|
|
|
|
+ // censusUserType:this.selectData.censusUserType,
|
|
|
|
|
+ // totalNum: 0,
|
|
|
|
|
+ // totalMoney: 0,
|
|
|
|
|
+ // money_type:this.selectData.money_type,
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.$emit('SetTotalMoneyOrNum',moneyData)
|
|
|
|
|
+ // this.$refs.chartsMountView.setNoList()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|