+
+
+
合计
1
@@ -175,6 +178,30 @@
人均接待量
1
+
+
+
+
{{item.name}}
+
+
{{item.avgZxl}}%
+
+
+
+
+
+
@@ -195,9 +222,13 @@
export default {
data() {
return {
+ role:'',
houseId: "",
+ orgCode:'',
+ page:1,
+ pagesize:3,
buildingoptions:[],
- TimetoAhoose: 2,
+ TimetoAhoose: 4,
customtime: [],
currentPage4:1,
total:20,
@@ -216,13 +247,43 @@ export default {
{name:'还是得',avgZxl:10},
{name:'还客户家客户是得',avgZxl:80},
],
+ tableData:[],
};
},
mounted() {
-
+ this.role=localStorage.getItem("orgType");
+ this.houseId = localStorage.getItem("houseId");
+ this.orgCode= localStorage.getItem("orgCode");
+ this.houseTable()
},
methods: {
+ houseTable(){
+ let pamaet={
+ orgType:this.role,
+ dateType:0,
+ statDateStart:this.statDateStart,
+ statDateEnd:this.statDateEnd,
+ current:this.page,
+ size:this.pagesize
+ }
+ if(this.role==3){
+ pamaet.houseId=this.houseId
+ }else{
+ pamaet.orgCode=this.orgCode
+ }
+
+
+ if(this.TimetoAhoose==7){
+ pamaet.dateType=null
+ }else{
+ pamaet.dateType=this.TimetoAhoose
+ }
+ this.$api.http.houseTable(pamaet).then((res) => {
+ console.log(res.data)
+ })
+ },
+
handleCurrentChange(){
},
diff --git a/src/views/Statistics/ReceptionStatistical.vue b/src/views/Statistics/ReceptionStatistical.vue
new file mode 100644
index 0000000..8e8b8ef
--- /dev/null
+++ b/src/views/Statistics/ReceptionStatistical.vue
@@ -0,0 +1,16 @@
+
+
+111
+
+
+
+
+
+
diff --git a/src/views/Statistics/TheTeamCompared.vue b/src/views/Statistics/TheTeamCompared.vue
new file mode 100644
index 0000000..f322cb1
--- /dev/null
+++ b/src/views/Statistics/TheTeamCompared.vue
@@ -0,0 +1,857 @@
+
+
+
+
+
接待时间:
+
+
+ 近7天
+
+
+ 近15天
+
+
+ 近30天
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}} |
+
+
+ 合计/平均 |
+ {{iddex+1}} |
+
+ {{item.deptName}} |
+ {{item.receptionCount}} |
+ {{item.accountNum}} |
+ {{item.activeCustomer||0}} |
+ {{item.prohibitedCustomer||0}} |
+ {{Math.floor(item.sumDuration/60) ||0}} |
+ {{item.fraction ||0}} |
+ {{item.prohibitedZb||0}} |
+ {{che.zxl}}% |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
团队总数
+
{{teamobj1.num}}
+
+
+
均值
+
{{teamobj1.avg}}个
+
+
+
+
+
{{item.name}}
+
+
{{item.zxl}}个
+
+
+
+
+
+
+
+
团队总数
+
{{teamobj2.num}}
+
+
+
均值
+
{{Math.floor(teamobj2.avg/60)}}分钟
+
+
+
+
+
{{item.name}}
+
+
{{item.zxl}}分钟
+
+
+
+
+
+
+
+
+
+
+
团队总数
+
{{teamobj3.num}}
+
+
+
均值
+
{{teamobj3.avg || 0}}%
+
+
+
+
+
{{item.name}}
+
+
{{item.zxl}}%
+
+
+
+
+
+
+
+
+
+
+
+
团队总数
+
{{teamobj5.num||0}}
+
+
+
均值
+
{{teamobj5.avg}}次
+
+
+
+
+
{{item.name}}
+
+
{{item.zxl}}次
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Statistics/TrendAnalysis.vue b/src/views/Statistics/TrendAnalysis.vue
index 53d0251..20d25f0 100644
--- a/src/views/Statistics/TrendAnalysis.vue
+++ b/src/views/Statistics/TrendAnalysis.vue
@@ -45,6 +45,7 @@
@change="timeChange"
ref="time"
type="date"
+ :clearable='false'
placeholder="选择日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@@ -114,42 +115,66 @@
销讲一级
销讲二级
-
+
+ 部门:
+
-
+
+
+
+
+ 顾问:
+
+
+
+
+
+
+
+
+ 一级:
+
-
-->
-
+ 二级:
+
+
+
+
+
+
+
+
-
+
对比报表
@@ -168,6 +193,7 @@
{{scope.row.heji}}%
+ {{scope.row.heji}}%
{{scope.row.heji}}%
@@ -175,6 +201,32 @@
+
+
+
+
+
+
+ {{item.name}} |
+
+
+ {{item.name}} |
+
+
+ {{item.name}} |
+
+
+
+ {{item.name}}
+ {{item.name}}%
+ {{item.name}}%
+ {{item.name}}%
+ |
+
+
+
+
+
@@ -204,21 +256,266 @@ export default {
checked: false,//是否对比
Confirmthecontrast:false,
tableData: [],//表格数据
- cardobj:{}
+ cardobj:{},
+ departmentlist:[],
+ departmentid:'',
+ echartsisshow:true,
+ consultantlist:[],
+ consultantid:'',
+ tablelist1:[],
+ tablelist2:[],
+ tablelist3:[],
+ tablelist4:[],
+ Level1:[],
+ Level2:[],
+ Level1id:'',
+ Level2id:''
};
},
mounted() {
this.houseId = localStorage.getItem("houseId");
this.tabtimetap(4);
+ this.overviewfindList()
},
methods: {
- //获取部门下拉菜单
- overviewfindList(){
- this.$api.http.overviewfindList({
- houseId:this.houseId,
- }).then((res) => {
- console.log(res)
- })
+ //销讲二级
+ trendAnalysisLevel2(){
+ let pamaet={
+ showStatus:'',
+ houseId:this.houseId,
+ timeType:0,
+ firstStartDate:this.page.openTime,
+ firstEndDate:this.page.closeTime,
+ lastStartDate:this.selectTime,
+ lastEndDate:this.selectTime1,
+ marketingId:this.Level2id
+ }
+
+ if(this.timeType==-1){
+ pamaet.timeType=null
+ }else{
+ pamaet.timeType=this.timeType
+ }
+ if(this.checked==true){
+ pamaet.showStatus=1;
+ pamaet.timeType=null
+ }else{
+ pamaet.showStatus=0
+ }
+ this.$api.http.trendAnalysisLevel2(pamaet).then((res) => {
+ if(this.Confirmthecontrast==false){
+ let newlist=res.data.startList || [];
+ var newline=[];
+ var newline2=[];
+ newlist.map(item=>{
+ newline.push(item.zxl)
+ newline2.push(item.statDate.slice(5,10))
+ })
+ this.SwitchCARDS(newline,newline2)
+ }else{
+ let newlist=res.data.startList || [];
+ let newlist2=res.data.endList || [];
+ let hejilist=res.data.comparedList || [];
+ var newline=[];//起始数据
+ var newline2=[];//对比数据
+ var newline1=[];//时间
+
+ let arr=[];
+ newlist.map(item=>{
+ newline.push(item.zxl)
+ })
+ newlist2.map(item=>{
+ newline1.push(item.zxl)
+ })
+ newlist.forEach((item, sdf) => {
+ newlist2.forEach((child, zxc) => {
+ if (sdf == zxc) {
+ newline2.push(item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10))
+ arr.push({
+ name:item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10),
+ shiduan1:item.zxl,
+ shiduan2:child.zxl,
+ });
+ }
+ })
+ })
+ hejilist.forEach((acd,xdx)=>{
+ arr.forEach((che,ind)=>{
+ if(xdx==ind){
+ che.heji=acd.zxl;
+ }
+ })
+ })
+ arr.unshift({
+ name:'项目合计',
+ shiduan1:res.data.startSum,
+ shiduan2:res.data.endSum,
+ heji:res.data.comparedSum,
+ })
+
+ this.SwitchCARDS2(newline,newline1,newline2)
+ this.tableData=arr;
+ console.log( this.tableData)
+ }
+ })
+
+ },
+ //切换一级
+ Level1tap(){
+ this.Level1.forEach((item,index)=>{
+ if(this.Level1id==item.marketingId){
+ this.Level2=item.children || [];
+ this.Level2id=item.children[0].marketingId || '';
+ }
+ })
+ this.trendAnalysisLevel2()
+ },
+ //切换er级
+ Level2tap(){
+ this.trendAnalysisLevel2()
+ },
+ //一二级
+ trendAnalysisAllLevel(){
+ let pamaet={
+ showStatus:'',
+ houseId:this.houseId,
+ timeType:0,
+ firstStartDate:this.page.openTime,
+ firstEndDate:this.page.closeTime,
+ lastStartDate:this.selectTime,
+ lastEndDate:this.selectTime1,
+ }
+
+ if(this.timeType==-1){
+ pamaet.timeType=null
+ }else{
+ pamaet.timeType=this.timeType
+ }
+ if(this.checked==true){
+ pamaet.showStatus=1;
+ pamaet.timeType=null
+ }else{
+ pamaet.showStatus=0
+ }
+ this.$api.http.trendAnalysisAllLevel(pamaet).then((res) => {
+ this.Level1=res.data || [];
+ this.Level1id=res.data[0].marketingId || '';
+ this.Level2=res.data[0].children || [];
+ this.Level2id=res.data[0].children[0].marketingId || '';
+ this.trendAnalysisLevel2()
+ })
+ },
+
+ //切换顾问
+ consultanttap(){
+ this.trendAnalysisAccount()
+ },
+ // 获取顾问
+ trendAnalysisAllAccount(pamaet){
+ this.$api.http.trendAnalysisAllAccount(pamaet).then((res) => {
+ this.consultantlist=res.data || [];
+ if( this.consultantlist.length!=0){
+ this.consultantid=res.data[0].accountId;
+ this.trendAnalysisAccount()
+ }else{
+ echarts.init(document.getElementById("main")).dispose();
+ this.echartsisshow=false;
+ this.tableData=[];
+ }
+ })
+ },
+ trendAnalysisAccount(){
+ var that=this;
+ let pamaet={
+ showStatus:'',
+ houseId:this.houseId,
+ timeType:0,
+ firstStartDate:this.page.openTime,
+ firstEndDate:this.page.closeTime,
+ lastStartDate:this.selectTime,
+ lastEndDate:this.selectTime1,
+
+ }
+ if(this.aliasclass==3){
+ pamaet.accountId=this.consultantid
+ }
+ if(this.timeType==-1){
+ pamaet.timeType=null
+ }else{
+ pamaet.timeType=this.timeType
+ }
+ if(this.checked==true){
+ pamaet.showStatus=1;
+ pamaet.timeType=null
+ }else{
+ pamaet.showStatus=0
+ }
+ this.$api.http.trendAnalysisAccount(pamaet).then((res) => {
+ if(this.Confirmthecontrast==false){
+ let newlist=res.data.firstList || [];
+ var newline=[];//起始数据
+ var newlinename=[];
+ let tablist=[
+ {name:'时间',}
+ ]
+ let tablist2=[
+ {name:that.customtime[0].substring(5,10)+'/'+that.customtime[1].substring(5,10),}
+ ]
+ newlist.map(item=>{
+ newline.push(item.zxl)
+ newlinename.push({name:item.name,max:100})
+ tablist.push({name:item.name})
+ tablist2.push({name:item.zxl+'%',})
+ })
+ this.tablelist1=tablist;
+ this.tablelist2=tablist2;
+ this.tablelist3=[];
+ this.tablelist4=[];
+ this.piechart(newline,newlinename)
+ }else{
+
+ let newlist=res.data.firstList || [];
+ let newlist2=res.data.secondList|| [];
+ let newlist4=res.data.thirdList|| [];
+
+ var newline=[];//起始数据
+ let newline2=[];//对比数据
+ var newlinename=[];
+
+ let tablist1=[
+ {name:'时间',}
+ ]
+ let tablist2=[
+ {name:that.customtime[0].substring(5,10)+'/'+that.customtime[1].substring(5,10),}
+ ]
+ let tablist3=[
+ {name:that.selectTime.substring(5,10)+'/'+that.selectTime1.substring(5,10),}
+ ]
+ let tablist4=[
+ {name:'变化',}
+ ]
+
+ newlist.map(item=>{
+ newline.push(item.zxl)
+ newlinename.push({name:item.name,max:100})
+ tablist1.push({name:item.name})
+ tablist2.push({name:item.zxl+'%',})
+ })
+ newlist2.map(item=>{
+ newline2.push(item.zxl)
+ tablist3.push({name:item.zxl+'%',})
+ })
+ newlist4.map(item=>{
+ tablist4.push({name:item.zxl,})
+ })
+
+ this.tablelist1=tablist1;
+ this.tablelist2=tablist2;
+ this.tablelist3=tablist3;
+ this.tablelist4=tablist4;
+ this.piechart2(newline,newlinename,newline2)
+ }
+ })
},
//获取卡片
trendtrendAnalysis(){
@@ -231,6 +528,7 @@ export default {
lastStartDate:this.selectTime,
lastEndDate:this.selectTime1
}
+
if(this.timeType==-1){
pamaet.timeType=null
}else{
@@ -245,7 +543,27 @@ export default {
this.$api.http.trendtrendAnalysis(pamaet).then((res) => {
this.cardobj=res.data;
if(this.aliasclass==1){
+ this.echartsisshow=true;
this.trendtrendAnalysisProject(pamaet)
+ }else if(this.aliasclass==2){
+ if(this.departmentid!=''){
+ pamaet.deptId=this.departmentid
+ this.trendtrendAnalysisProject(pamaet)
+ }else{
+ echarts.init(document.getElementById("main")).dispose();
+ this.echartsisshow=false;
+ this.tableData=[];
+ }
+ }else if(this.aliasclass==3){
+ if(this.consultantid.length==0){
+ this.trendAnalysisAllAccount(pamaet)
+ }else{
+ this.trendAnalysisAccount()
+ }
+ }else if(this.aliasclass==4){
+ this.trendAnalysisAccount()
+ }else{
+ this.trendAnalysisAllLevel()
}
})
@@ -309,6 +627,24 @@ export default {
}
})
},
+ //获取部门下拉菜单
+ overviewfindList(){
+ this.$api.http.overviewfindList({
+ houseId:this.houseId,
+ }).then((res) => {
+ this.departmentlist=res.data || [];
+ if(this.departmentlist.length!=0){
+ this.departmentid=res.data[0].deptId
+ }else{
+ this.departmentid=''
+ }
+ })
+ },
+ //切换部门
+ departmenttap(){
+ this.trendtrendAnalysis()
+ },
+
//选项卡切换
tapChange(idx){
@@ -569,6 +905,93 @@ export default {
myChart.resize();
});
},
+ piechart2(newline,newlinename,newline2){
+ echarts.init(document.getElementById("main")).dispose();
+ var chartDom = document.getElementById("main");
+ var myChart = echarts.init(chartDom);
+ var option;
+ option = {
+ tooltip: {
+ trigger: 'axis'
+ },
+ legend: {
+ data: ['起始时间','对比时间'],
+ bottom: "10",
+ },
+ color:[
+ '#2671E2',
+ '#F3787B',
+ ],
+ radar: {
+ // shape: 'circle',
+ indicator: newlinename
+ },
+ series: [
+ {
+ type: 'radar',
+ tooltip: {
+ trigger: 'item'
+ },
+ data: [
+ {
+ value:newline,
+ name: '起始时间'
+ },
+ {
+ value:newline2,
+ name: '对比时间'
+ },
+ ]
+ }
+ ]
+ };
+ option && myChart.setOption(option);
+ window.addEventListener("resize", () => {
+ myChart.resize();
+ });
+ },
+ piechart(newline,newlinename){
+ echarts.init(document.getElementById("main")).dispose();
+ var chartDom = document.getElementById("main");
+ var myChart = echarts.init(chartDom);
+ var option;
+ option = {
+ tooltip: {
+ trigger: 'axis'
+ },
+ legend: {
+ data: ['起始时间'],
+ bottom: "10",
+ },
+ color:[
+ '#2671E2',
+ '#F3787B',
+ ],
+ radar: {
+ // shape: 'circle',
+ indicator: newlinename
+ },
+ series: [
+ {
+ type: 'radar',
+ tooltip: {
+ trigger: 'item'
+ },
+ data: [
+ {
+ value:newline,
+ name: '起始时间'
+ },
+ ]
+ }
+ ]
+ };
+ option && myChart.setOption(option);
+ window.addEventListener("resize", () => {
+ myChart.resize();
+ });
+ }
+
},
};
@@ -581,6 +1004,24 @@ export default {
padding-bottom: 100px;
}
+.table {
+ border-collapse: collapse;
+ width: 100%;
+}
+.tbody {
+ display: block;
+ // width: 100%;
+ // overflow-x: auto;
+ // overflow-y: auto;
+ height: 220px;
+}
+.tbody tr {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ // word-break: break-all;
+}
+
#main {
width: 100%;
height: 380px;
@@ -746,4 +1187,14 @@ export default {
cursor: pointer;
color: #606266;
}
+ .theadtd{
+ width: 140px;
+ height: 48px;
+ border: 1px solid #E0E0E0;
+ text-align: center;
+ line-height: 48px;
+ font-size: 16px;
+ color: #32363D;
+
+ }