|
@@ -207,7 +207,7 @@
|
|
|
import BarChart from './dashboard/BarChart2'
|
|
|
import BarChart3 from './dashboard/BarChart3'
|
|
|
import PieChart from './dashboard/PieChart2'
|
|
|
- import { riskcode } from "@/api/index";
|
|
|
+ import { ageSexDis, riskcode, bdNumDis } from "@/api/index";
|
|
|
export default {
|
|
|
name: "UserInfoDetails",
|
|
|
components: {
|
|
@@ -220,12 +220,9 @@
|
|
|
return {
|
|
|
// 客户年龄段性别分布
|
|
|
barTwoWayChartData:{
|
|
|
- legendData:["男生", "女生"],
|
|
|
- xAxisData:["儿童", "少年", "青年", "中年", "老年", "大龄", "高龄"],
|
|
|
- seriesData:[
|
|
|
- [4, 5, 9, 12, 19, 22, 23, ],
|
|
|
- [5,12,12,19,19,23,23]
|
|
|
- ]
|
|
|
+ legendData:[],
|
|
|
+ xAxisData:[],
|
|
|
+ seriesData:[]
|
|
|
},
|
|
|
// 险种类别
|
|
|
barChartData:{
|
|
@@ -236,13 +233,8 @@
|
|
|
},
|
|
|
// 拥有保单件数分布
|
|
|
pieChartData:{
|
|
|
- color:['#0084F1','#ED475B','#F39801','#00C7FF'],
|
|
|
- seriesData:[
|
|
|
- { value: 320, name: '1-3' },
|
|
|
- { value: 240, name: '4-7' },
|
|
|
- { value: 149, name: '8-10' },
|
|
|
- { value: 100, name: '>10' },
|
|
|
- ]
|
|
|
+ color:['#0084F1','#ED475B','#F39801','#00C7FF','rgb(242,158,194)','rgb(250,216,137)','rgb(127,229,154)','rgb(33,201,205)'],
|
|
|
+ seriesData:[]
|
|
|
},
|
|
|
// 近10年有效客户数
|
|
|
barChartVistorsData:{
|
|
@@ -315,6 +307,8 @@
|
|
|
mounted() {
|
|
|
this.lunboFn();
|
|
|
this.getRiskcode();
|
|
|
+ this.getAgeSexDis();
|
|
|
+ this.getBdNumDis();
|
|
|
},
|
|
|
methods: {
|
|
|
_$ (el) {
|
|
@@ -359,6 +353,19 @@
|
|
|
toUserInfoList(){
|
|
|
this.$router.push({ path:'/userInfoList'})
|
|
|
},
|
|
|
+ // 客户年龄段性别分布
|
|
|
+ getAgeSexDis(){
|
|
|
+ let that = this;
|
|
|
+ ageSexDis().then(response => {
|
|
|
+ console.log(response);
|
|
|
+ that.barTwoWayChartData.xAxisData = response.data.xaxisData;
|
|
|
+ that.barTwoWayChartData.seriesData = response.data.seriesData;
|
|
|
+ that.barTwoWayChartData.legendData = response.data.legendData;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 险种类别
|
|
|
getRiskcode(){
|
|
|
let that = this;
|
|
|
riskcode().then(response => {
|
|
@@ -369,6 +376,16 @@
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ // 拥有保单件数分布
|
|
|
+ getBdNumDis(){
|
|
|
+ let that = this;
|
|
|
+ bdNumDis().then(response => {
|
|
|
+ console.log(response);
|
|
|
+ that.pieChartData.seriesData = response.data.seriesData;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|