|
@@ -125,6 +125,10 @@
|
|
|
|
|
|
|
|
<script setup name="">
|
|
<script setup name="">
|
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
|
|
|
+ import {
|
|
|
|
|
+ getRegisterChannelStats,
|
|
|
|
|
+ getIndustryScattergram
|
|
|
|
|
+ } from '@/api/agent/indexTwo.js'
|
|
|
import { ref, getCurrentInstance, onMounted } from 'vue'
|
|
import { ref, getCurrentInstance, onMounted } from 'vue'
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
|
@@ -148,6 +152,18 @@
|
|
|
didx.value = ''
|
|
didx.value = ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const getRegisterChannelStatsFn = () => {
|
|
|
|
|
+ let colors = ['#009191','#35CBCA','#7CC5C5','#FBD438']
|
|
|
|
|
+ getRegisterChannelStats().then(res => {
|
|
|
|
|
+ yhzcqdTypeList.value = res.data.map((item,index) => {
|
|
|
|
|
+ return { color:colors[index],name:item.channelName,num:item.registerCount??0 }
|
|
|
|
|
+ })
|
|
|
|
|
+ let data = yhzcqdTypeList.value.map(d=>({name:d.name,value:d.num}))
|
|
|
|
|
+ let sum = data.reduce((total,item)=>{return total+item.value},0)
|
|
|
|
|
+ initYhzcqdData(colors,data,sum)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const initYhglEchart = () => {
|
|
const initYhglEchart = () => {
|
|
|
const chart = echarts.init(yhglRef.value)
|
|
const chart = echarts.init(yhglRef.value)
|
|
|
let option = {
|
|
let option = {
|
|
@@ -208,20 +224,14 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const initHyfbData = () => {
|
|
const initHyfbData = () => {
|
|
|
- hyfbData.value = [
|
|
|
|
|
- {name:'IT/互联网',num:3623},
|
|
|
|
|
- {name:'金融语专业服务',num:2311},
|
|
|
|
|
- {name:'制造与工业',num:1523},
|
|
|
|
|
- {name:'医疗保健与生命科学',num:965},
|
|
|
|
|
- {name:'消费品与零售',num:623},
|
|
|
|
|
- {name:'文化、媒体与教育',num:311},
|
|
|
|
|
- {name:'能源、资源与公共事业',num:223},
|
|
|
|
|
- {name:'政府与非营利组织',num:123},
|
|
|
|
|
- {name:'其他',num:111}
|
|
|
|
|
- ]
|
|
|
|
|
- let sum = hyfbData.value.reduce((total,item)=>{return total+item.num},0)
|
|
|
|
|
- hyfbData.value.forEach(item=>{
|
|
|
|
|
- item.bl = (item.num/sum*100).toFixed(2)
|
|
|
|
|
|
|
+ getIndustryScattergram().then(res => {
|
|
|
|
|
+ hyfbData.value = res.data.map(item => {
|
|
|
|
|
+ return {name:item.industryName,num:item.industryCount}
|
|
|
|
|
+ })
|
|
|
|
|
+ let sum = hyfbData.value.reduce((total,item)=>{return total+item.num},0)
|
|
|
|
|
+ hyfbData.value.forEach(item=>{
|
|
|
|
|
+ item.bl = (item.num/sum*100).toFixed(2)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -297,18 +307,10 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const initYhzcqdData = () => {
|
|
|
|
|
- yhzcqdTypeList.value = [
|
|
|
|
|
- {color:'#009191',name:'创衡运营邀请渠道',num:8928},
|
|
|
|
|
- {color:'#35CBCA',name:'用户搜索注册',num:10233},
|
|
|
|
|
- {color:'#7CC5C5',name:'用户推荐转发',num:7344},
|
|
|
|
|
- {color:'#FBD438',name:'团队教练转发问卷任务',num:10987}
|
|
|
|
|
- ]
|
|
|
|
|
- let data = yhzcqdTypeList.value.map(d=>({name:d.name,value:d.num}))
|
|
|
|
|
- let sum = data.reduce((total,item)=>{return total+item.value},0)
|
|
|
|
|
|
|
+ const initYhzcqdData = (color,data,sum) => {
|
|
|
const chart = echarts.init(yhzcqdRef.value)
|
|
const chart = echarts.init(yhzcqdRef.value)
|
|
|
let option = {
|
|
let option = {
|
|
|
- color: ['#009191','#35CBCA','#7CC5C5','#FBD438'],
|
|
|
|
|
|
|
+ color,
|
|
|
grid: {
|
|
grid: {
|
|
|
left: 20,
|
|
left: 20,
|
|
|
right: 20,
|
|
right: 20,
|
|
@@ -384,9 +386,9 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(()=>{
|
|
onMounted(()=>{
|
|
|
|
|
+ getRegisterChannelStatsFn()
|
|
|
initYhglEchart()
|
|
initYhglEchart()
|
|
|
initHyfbData()
|
|
initHyfbData()
|
|
|
- initYhzcqdData()
|
|
|
|
|
initYhhxEchart()
|
|
initYhhxEchart()
|
|
|
initNlfbEcharts()
|
|
initNlfbEcharts()
|
|
|
proxy.$nextTick(()=>{
|
|
proxy.$nextTick(()=>{
|