-
+
+
+
{{item.name}}
-
{{item.avgZxl}}%
+
{{item.zxl}}%
@@ -203,43 +241,329 @@ import * as echarts from "echarts";
export default {
data() {
return {
- customtime: "",
- TimetoAhoose: 2,
+ pickerOptions: {
+ disabledDate(time) {
+ //根据当前日期 --- 禁止选中之后的日期
+ return time.getTime() > Date.now();
+ },
+ },
+ role:'',
+ customtime: [],
+ TimetoAhoose: 4,
fromobj: {
- starttime: "",
- endoftime: "",
+ statDateStart: "",
+ statDateEnd: "",
},
houseId: "",
- options: [{
- value: '选项1',
- label: '黄金糕'
- }, {
- value: '选项2',
- label: '双皮奶'
- }],
- value: '',
- ceratelist:[
- {name:'还是得',avgZxl:80},
- {name:'大大奥德赛',avgZxl:90},
- {name:'沙发和',avgZxl:20},
- {name:'还是得',avgZxl:10},
- {name:'还客户家客户是得',avgZxl:80},
- ]
+ ceratelist:{
+ avg:'',
+ sum:'',
+ num:'',
+ list:[]
+ },
+ ceratelist1:{
+ avg:'',
+ sum:'',
+ num:'',
+ list:[]
+ },
+ cardobj:{},
+ cardindex:1,
+ departmentlist:[],
+ departmentsri:'',
+ consultantlist:[],
+ consultantsri:'',
+ Brokenline:[],
+ Pinspeak:{
+ avg:'',
+ sum:'',
+ list:[]
+ },
+ Pinspeak2:{
+ avg:'',
+ sum:'',
+ list:[]
+ },
+ Zxllist:[],
+ Zxllistchildren:[],
+ marketingId:''
+
};
},
mounted() {
- this.SwitchCARDS()
- //客户来源
- this.Brokenlinefun()
- //客户性别
- this.Broken2inefun()
- //团队销讲
- this.Pinspeakfun1()
- //员工销讲
- this.Pinspeakfun2()
+ this.role=localStorage.getItem("orgType");
+ if(this.role==3){
+ this.houseId = localStorage.getItem("houseId");
+ this.overviewfindList()
+ this.overviewfindUserListByHouseId()
+ this.overviewreceptionOverview()
+ this.overviewreceptionData()
+
+ this.overviewreceptionRanking()
+ this.overviewreceptionRanking1()
+ this.overviewreceptionOverviewZxl()
+ }
},
methods: {
- SwitchCARDS(){
+ //切换二级
+ zxltapchang(){
+ this.Zxllistchildren=[];
+ this.Zxllist.forEach(item=>{
+ if(this.marketingId==item.marketingId){
+ this.Zxllistchildren=item.children
+ }
+ })
+ },
+ //获取执行率
+ overviewreceptionOverviewZxl(){
+ this.Zxllistchildren=[];
+ this.Zxllist=[];
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd,
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewreceptionOverviewZxl(parmo).then((res) => {
+ this.Zxllist=res.data.list || [];
+ if(this.Zxllist.length!==0){
+ this.marketingId=res.data.list[0].marketingId;
+ this.Zxllistchildren=res.data.list[0].children;
+ }
+ })
+ },
+ //接待量排名
+ overviewreceptionRanking(){
+ this.ceratelist={
+ avg:'',
+ sum:'',
+ num:'',
+ list:[]
+ }
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd,
+ type:0
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewreceptionRanking(parmo).then((res) => {
+ let arr=[]
+ res.data.list.map(item=>{
+ let obj={}
+ obj.name=item.accountName
+ obj.zxl=item.activeCustomer
+ arr.push(obj)
+ })
+ arr=this.dealData(arr)
+ this.ceratelist={
+ avg: res.data.avg,
+ sum: res.data.sum,
+ num: res.data.num,
+ list:arr
+ }
+ })
+ },
+ //接待时长排名
+ overviewreceptionRanking1(){
+ this.ceratelist1={
+ avg:'',
+ sum:'',
+ num:'',
+ list:[]
+ }
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd,
+ type:1
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewreceptionRanking(parmo).then((res) => {
+ let arr=[]
+ res.data.list.map(item=>{
+ let obj={}
+ obj.name=item.accountName
+ obj.zxl=Math.floor(item.sumDuration /60) || 0;
+ arr.push(obj)
+ })
+ arr=this.dealData(arr)
+ this.ceratelist1={
+ avg: res.data.avg,
+ sum: res.data.sum,
+ num: res.data.num,
+ list:arr
+ }
+ })
+ },
+
+ //团队员工下拉切换
+ Pinspeaktap(i){
+ if(i==1){
+ this.overviewteamOrAccountSellingTrends()
+ }else{
+ this.overviewteamOrAccountSellingTrends1()
+ }
+ },
+ //团队销讲趋势
+ overviewteamOrAccountSellingTrends(){
+ this.Pinspeak={
+ avg:'',
+ sum:'',
+ list:[]
+ }
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd,
+ deptId:this.departmentsri
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewteamOrAccountSellingTrends(parmo).then((res) => {
+ this.Pinspeak=res.data;
+ var newline=[];
+ var newline2=[];
+ this.Pinspeak.list.map(item=>{
+ newline.push(item.fraction)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ this.Pinspeakfun1(newline,newline2)
+ })
+ },
+ //员工销讲趋势
+ overviewteamOrAccountSellingTrends1(){
+ this.Pinspeak2={
+ avg:'',
+ sum:'',
+ list:[]
+ }
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd,
+ accountId:this.consultantsri
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewteamOrAccountSellingTrends(parmo).then((res) => {
+ this.Pinspeak2=res.data;
+ var newline=[];
+ var newline2=[];
+ this.Pinspeak2.list.map(item=>{
+ newline.push(item.fraction)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ this.Pinspeakfun2(newline,newline2)
+ })
+ },
+ //卡片切换
+ Overviewxlick(i){
+ this.cardindex=i;
+ var newline=[];
+ var newline2=[];
+ var Strname=''
+ if(this.cardindex==1){
+ Strname='接待客户/个'
+ this.Brokenline.map(item=>{
+ newline.push(item.receptionCount)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ }else if(this.cardindex==2){
+ Strname='接待客户/个'
+ this.Brokenline.map(item=>{
+ newline.push(item.activeCustomer)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ }else if(this.cardindex==3){
+ Strname='接待时长/分钟'
+ this.Brokenline.map(item=>{
+ newline.push(Math.floor(item.avgDuration/60))
+ newline2.push(item.statDate.slice(5,10))
+ })
+ }else if(this.cardindex==4){
+ Strname='执行率/%'
+ this.Brokenline.map(item=>{
+ newline.push(item.fraction)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ }else{
+ Strname='违禁/次'
+ this.Brokenline.map(item=>{
+ newline.push(item.prohibitedCustomer)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ }
+ this.SwitchCARDS(newline,newline2,Strname)
+ },
+ //获取卡片数据
+ overviewreceptionOverview(){
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewreceptionOverview(parmo).then((res) => {
+ this.cardobj=res.data
+ })
+ },
+ //获取卡片下折线图
+ overviewreceptionData(){
+ let parmo={
+ houseId:this.houseId,
+ dateType:this.TimetoAhoose,
+ statDateStart:this.fromobj.statDateStart,
+ statDateEnd:this.fromobj.statDateEnd
+ }
+ if(this.TimetoAhoose==8){
+ parmo.dateType=null;
+ }
+ this.$api.http.overviewreceptionData(parmo).then((res) => {
+ this.Brokenline=res.data;
+ this.Overviewxlick(1)
+ })
+ },
+ //获取部门下拉菜单
+ overviewfindList(){
+ this.$api.http.overviewfindList({
+ houseId:this.houseId,
+ }).then((res) => {
+ this.departmentlist=[{name:'全部',deptId:''}]
+ this.departmentlist=this.departmentlist.concat(res.data);
+ this.departmentsri='';
+ })
+ this.overviewteamOrAccountSellingTrends()
+ },
+ //获取顾问
+ overviewfindUserListByHouseId(){
+ this.$api.http.overviewfindUserListByHouseId({
+ orgType:localStorage.getItem("orgType"),
+ projectId:this.houseId,
+ }).then((res) => {
+ this.consultantlist=res.data;
+ this.consultantsri=res.data[0].accountId;
+ this.overviewteamOrAccountSellingTrends1()
+ })
+ },
+ //卡片下折线图
+ SwitchCARDS(newline,newline2,Strname){
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
@@ -249,7 +573,7 @@ export default {
trigger: 'axis'
},
legend: {
- data: ['来访人数/个'],
+ data: [Strname],
bottom: '10',
},
grid: {
@@ -260,7 +584,7 @@ export default {
},
xAxis: {
type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ data: newline2,
axisLabel: { //重点在这一块,其余可以忽略
textStyle: {
color: '#212121', //更改坐标轴文字颜色
@@ -300,142 +624,19 @@ export default {
},
},
series: [{
- name:'来访人数/个',
- data: [820, 932, 901, 934, 1290, 1330, 1320,],
+ name:Strname,
+ data: newline,
type: 'line',
smooth: true,
}]
};
-
- option && myChart.setOption(option);
- window.addEventListener("resize", () => { myChart.resize();});
- },
- //客户来源
- Brokenlinefun(){
- let chartDom = document.getElementById('Brokenline1');
- let myChart = echarts.init(chartDom);
- let option = {
- tooltip: {
- trigger: "item",
- },
- graphic: [
- {
- type: "text",
- left: "center",
- top: "42%",
- style: {
- text: '80',
- textAlign: "center",
- fill: "#000",
- width: 30,
- height: 30,
- fontSize: 24,
- color: "#32363D",
- fontFamily: "Microsoft YaHei",
- },
- },
- {
- type: "text",
- left: "center",
- top: "55%",
- style: {
- text: "接待总数",
- textAlign: "center",
- fill: "#000",
- width: 30,
- height: 30,
- fontSize: 16,
- color: "#666666",
- },
- },
- ],
- series: [
- {
- name: "",
- type: "pie",
- radius: ["48%", "70%"],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 10,
- borderColor: '#fff',
- borderWidth: 2
- },
- data: [
- {value: 1048, name: '搜索引擎'},
- {value: 735, name: '直接访问'},
- {value: 580, name: '邮件营销'},
- {value: 484, name: '联盟广告'},
- {value: 300, name: '视频广告'}
- ]
- },
- ],
- };
- option && myChart.setOption(option);
- window.addEventListener("resize", () => { myChart.resize();});
- },
- //客户性别
- Broken2inefun(){
- let chartDom = document.getElementById('Brokenline2');
- let myChart = echarts.init(chartDom);
- let option = {
- tooltip: {
- trigger: "item",
- },
- graphic: [
- {
- type: "text",
- left: "center",
- top: "42%",
- style: {
- text: '80',
- textAlign: "center",
- fill: "#000",
- width: 30,
- height: 30,
- fontSize: 24,
- color: "#32363D",
- fontFamily: "Microsoft YaHei",
- },
- },
- {
- type: "text",
- left: "center",
- top: "55%",
- style: {
- text: "接待总数",
- textAlign: "center",
- fill: "#000",
- width: 30,
- height: 30,
- fontSize: 16,
- color: "#666666",
- },
- },
- ],
- series: [
- {
- name: "",
- type: "pie",
- radius: ["48%", "70%"],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 10,
- borderColor: '#fff',
- borderWidth: 2
- },
- data: [
- {value: 1048, name: '搜索引擎'},
- {value: 735, name: '直接访问'},
- ]
- },
- ],
- };
option && myChart.setOption(option);
window.addEventListener("resize", () => { myChart.resize();});
},
+
//团队销讲
- Pinspeakfun1(){
+ Pinspeakfun1(newline,newline2){
let chartDom = document.getElementById('Pinspeak1');
let myChart = echarts.init(chartDom);
let option= {
@@ -443,7 +644,7 @@ export default {
trigger: 'axis'
},
legend: {
- data: ['来访人数/个'],
+ data: ['执行率/%'],
bottom: '10',
},
grid: {
@@ -454,7 +655,7 @@ export default {
},
xAxis: {
type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ data: newline2,
axisLabel: { //重点在这一块,其余可以忽略
textStyle: {
color: '#212121', //更改坐标轴文字颜色
@@ -494,8 +695,8 @@ export default {
},
},
series: [{
- name:'来访人数/个',
- data: [820, 932, 901, 934, 1290, 1330, 1320,],
+ name:'执行率/%',
+ data: newline,
type: 'line',
smooth: true,
@@ -506,7 +707,7 @@ export default {
window.addEventListener("resize", () => { myChart.resize();});
},
//员工销讲
- Pinspeakfun2(){
+ Pinspeakfun2(newline,newline2){
let chartDom = document.getElementById('Pinspeak2');
let myChart = echarts.init(chartDom);
let option= {
@@ -514,7 +715,7 @@ export default {
trigger: 'axis'
},
legend: {
- data: ['来访人数/个'],
+ data: ['执行率/%'],
bottom: '10',
},
grid: {
@@ -525,7 +726,7 @@ export default {
},
xAxis: {
type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ data: newline2,
axisLabel: { //重点在这一块,其余可以忽略
textStyle: {
color: '#212121', //更改坐标轴文字颜色
@@ -565,8 +766,8 @@ export default {
},
},
series: [{
- name:'来访人数/个',
- data: [820, 932, 901, 934, 1290, 1330, 1320,],
+ name:'执行率/%',
+ data:newline,
type: 'line',
smooth: true,
@@ -580,23 +781,37 @@ export default {
//时间选择
tabtimetap(index) {
this.TimetoAhoose = index;
- this.fromobj.starttime = "";
- this.fromobj.endoftime = "";
- this.customtime = "";
- this.getorgCode();
+ this.fromobj.statDateStart = "";
+ this.fromobj.statDateEnd = "";
+ this.customtime = [];
+ this.overviewreceptionOverview()
+ this.overviewreceptionData()
+ this.overviewteamOrAccountSellingTrends()
+ this.overviewteamOrAccountSellingTrends1()
+ this.overviewreceptionRanking()
+ this.overviewreceptionRanking1()
+ this.overviewreceptionOverviewZxl()
},
//自定义时间
confirmtime() {
- if (this.customtime == "") {
-
- } else {
- this.TimetoAhoose = 6;
- const d = new Date(this.customtime[0]);
- this.fromobj.starttime = d.getFullYear() + "-" + this.Zeropadding(d.getMonth() + 1) + "-" + this.Zeropadding(d.getDate());
- const c = new Date(this.customtime[1]);
- this.fromobj.endoftime = c.getFullYear() + "-" + this.Zeropadding(c.getMonth() + 1) + "-" + this.Zeropadding(c.getDate());
- }
+ this.fromobj.statDateStart= this.customtime[0]
+ this.fromobj.statDateEnd= this.customtime[1]
+ this.TimetoAhoose = 8;
+ this.overviewreceptionOverview()
+ this.overviewreceptionData()
+ this.overviewteamOrAccountSellingTrends()
+ this.overviewteamOrAccountSellingTrends1()
+ this.overviewreceptionRanking()
+ this.overviewreceptionRanking1()
+ this.overviewreceptionOverviewZxl()
},
+ dealData(arr){
+ let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3
+ arr.map(item=>{
+ item.zxl1=Math.floor(item.zxl/num*100)
+ })
+ return arr
+ },
},
};
@@ -610,6 +825,13 @@ export default {
padding-bottom: 100px;
}
+.container {
+ display: grid;
+ grid-template-columns: repeat(5, 19%) ;
+ grid-column-gap: 18px;
+}
+
+
// 进度条
.jinbox {
width: 100%;
@@ -644,7 +866,7 @@ export default {
}
.jinboxbott {
width: 16%;
- text-indent: 50px;
+ text-indent: 20px;
}
}
@@ -673,7 +895,7 @@ export default {
}
.app-box-san{
width: 100%;
- height: 400px;
+ // height: 400px;
display: flex;
margin-top: 15px;
.zuo{
@@ -753,7 +975,6 @@ export default {
height: 16px;
font-size: 16px;
font-weight: 400;
- color: #333333;
line-height: 16px;
text-indent: 20px;
margin-top: 20px;
@@ -762,7 +983,6 @@ export default {
height: 32px;
font-size: 32px;
font-weight: normal;
- color: #32363D;
line-height: 32px;
text-indent: 20px;
margin-top: 10px;
@@ -776,6 +996,9 @@ export default {
color: #ffffff;
background: #2671e2;
}
+.tophovese{
+ color: #2671e2;
+}
.app-top{
width: 100%;
background: #ffffff;
@@ -814,4 +1037,17 @@ export default {
font-size: 14px;
}
}
+ .hejisan{
+ width: 92%;
+ margin: 0 auto;
+ display: flex;
+ margin-top: 15px;
+ .text1-1{
+ color: #666666;
+ }
+ .text1-2{
+ color: #333333;
+ margin-top: 10px;
+ }
+ }