diff --git a/config.js b/config.js index be10eb6..72d9e33 100644 --- a/config.js +++ b/config.js @@ -2,9 +2,9 @@ * 小程序配置文件 */ // 此处主机域名修改成腾讯云解决方案分配的域名 -var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 +// var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 // var host = 'http://192.168.31.163:8080/autoSR/api'; // 长龙 -// var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 +var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 // var host = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 // var host = 'https://zkgj.quhouse.com/api'; // 质控正式 // var host = 'https://hfju.com/api'; // 数智正式 diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue index 445e927..69680cf 100644 --- a/pages/center/Piabodata/index.vue +++ b/pages/center/Piabodata/index.vue @@ -67,14 +67,14 @@ 接待趋势 - - + 来访(人) - - - - 团队接待趋势 - - {{team.label}} - + + + + + 团队接待趋势 + + {{team.label}} + + + + + + + 合计:50 + 均值:25 + + 来访(人) + + + - - - - - 合计:50 - 均值:25 - - 来访(人) - - - - - - - 员工接待趋势 - - {{staff.label}} - + + + + + 员工接待趋势 + + {{staff.label}} + + + - + + + 合计:50 + 均值:25 + + 来访(人) + + - - 合计:50 - 均值:25 - - 来访(人) - - - - + @@ -185,12 +189,12 @@ 销讲指标执行率 - - + {{item.name.substring(0, 4)}} @@ -237,6 +241,7 @@ label:'' }, teamFlag:true, + bocindex1:0, staffFlag:true, staffShow1:false, lastStartDate:'', @@ -245,8 +250,9 @@ activeTab: 0, numlist:[ {name:'接待量',num:'10'}, - {name:'平均执行率',num:'10'}, {name:'接待客户',num:'10'}, + {name:'平均执行率',num:'10'}, + {name:'录音时长',num:'10'}, ], lineOptsect:{ "categories": ["2016","2017","2018","2019","2020","2021"], @@ -279,19 +285,24 @@ {name:"接待量",id:1}, {name:"平均执行率",id:2}, {name:"接待客户",id:3}, - {name:"平均得分",id:4}, {name:"录音时长",id:5}, - {name:"违禁预警",id:6}, ], + bocindex:0, newlisttabinfo:[ {name:'接待量',zxl:'10'}, {name:'平均执行率',zxl:'50'}, {name:'接待客户',zxl:'80'}, ], + newlisttabinfo1:[ + {name:'接待量',zxl:'10'}, + {name:'平均执行率',zxl:'50'}, + {name:'接待客户',zxl:'80'}, + ], Theteamcomparedisshow:false, - Groupcontrastisshow:false - + Groupcontrastisshow:false, + allechar:[], + allList:[] }; }, onShow() { @@ -306,6 +317,12 @@ // 获取团队是否显示权限 this.queryHaveDept() + // 获取简报 + this.getReport() + // 获取接待趋势 + this.getRtrent() + // 获取维度 + this.getindexZxl() }, methods: { queryHaveDept() { @@ -346,6 +363,70 @@ this.getAward() }) }, + // 获取接待趋势 + getRtrent(){ + this.$u.post('/cusLvStatistics/receptionTrend',{ + houseId:this.houseId, + timeType:this.lastEndDate?null:this.activeTotal, + lastEndDate:this.lastEndDate, + lastStartDate:this.lastStartDate + }) + .then(res=>{ + // console.log(res) + this.allechar=res + this.tapspagek2(this.bocindex) + + }) + }, + // 销奖维度 + getindexZxl(){ + this.$u.post('/cusLvStatistics/indexZxl',{ + houseId:this.houseId, + timeType:this.lastEndDate?null:this.activeTotal, + lastEndDate:this.lastEndDate, + lastStartDate:this.lastStartDate + }) + .then(res=>{ + // console.log(res) + // 处理销奖维度执行率 + // this.newlisttabinfo + let arr=[] + this.newlistoj=[] + res.list.map((item,index)=>{ + arr.push({ + name:item.name, + zxl:item.zxl + }) + this.newlistoj.push({ + name:item.name, + id:index + }) + }) + this.newlisttabinfo=arr + this.allList=res.list + this.tapspagek3(this.bocindex1) + }) + }, + // 获取简报 + getReport(){ + this.$u.post('/cusLvStatistics/xiaojiangAnalysis',{ + houseId:this.houseId, + timeType:this.lastEndDate?null:this.activeTotal, + lastEndDate:this.lastEndDate, + lastStartDate:this.lastStartDate + }) + .then(res=>{ + // console.log(res) + // 接待量 + this.numlist[0].num=res.receptionCount||0 + // 接待客户 + this.numlist[1].num=res.sumCustomer||0 + // 执行率 + this.numlist[2].num=(res.fraction||0)+'%' + // 录音时长 + this.numlist[3].num=res.sumDuration||0 + }) + }, // 获取团队列表 getSectionList(){ this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) @@ -364,6 +445,10 @@ }, // 员工销奖趋势 getAward(){ + if(!this.staff.value){ + this.staffFlag=false + return + } this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate',{ userA:this.staff.value, userB:'', @@ -393,10 +478,10 @@ }, // 团队接待趋势 receptionCountList(){ - // if(!this.team.value){ - // this.teamFlag=false - // return - // } + if(!this.team.value){ + this.teamFlag=false + return + } this.$u.post('/cusLvStatistics/teamAnalysisExecutionRate',{ deptIds:this.team.value, showRank:1, @@ -427,17 +512,6 @@ obj.data.push(item.data) }) allobj.series.push(obj) - // 判断是否显示平均 - // 如果显示对比 - // if(this.timepickpickisshow){ - // let obj={} - // obj.data=[] - // obj.name='平均' - // result[1].map(item=>{ - // obj.data.push(item.data) - // }) - // allobj.series.push(obj) - // } this.lineOptsect1=allobj }) @@ -456,6 +530,9 @@ // 获取数据 getdata(){ this.receptionCountList() + this.getReport() + this.getRtrent() + this.getindexZxl() }, staffSelectCallback(e,idx){ if(idx==0){ @@ -473,11 +550,64 @@ this.activeTotal=3; this.lastEndDate=e.endDate this.lastStartDate=e.startDate + this.getdata() }, //指标执行率分析tab - tapspagek2(index,idx) { - console.log(index,idx) + tapspagek2(index) { + // console.log(index) + // 对数据进行分析和处理 + // 先处理日期 + let allobj={ + "categories": [], + "series": [ + { + name:'接待量', + data:[] + } + ] + } + if(index==0){ + // 接待量 + this.allechar.map(item=>{ + allobj.categories.push(item.statDate.slice(5,10)) + allobj.series[0].data.push(item.receptionCount) + }) + }else if(index==1){ + // 平均执行率 + this.allechar.map(item=>{ + allobj.categories.push(item.statDate.slice(5,10)) + allobj.series[0].data.push(item.fraction) + }) + }else if(index==2){ + // 接待客户 + this.allechar.map(item=>{ + allobj.categories.push(item.statDate.slice(5,10)) + allobj.series[0].data.push(item.sumCustomer) + }) + }else{ + // 录音时长 + this.allechar.map(item=>{ + allobj.categories.push(item.statDate.slice(5,10)) + allobj.series[0].data.push(item.sumDuration) + }) + } this.bocindex = index; + // console.log(allobj) + // return + this.lineOptsect=allobj + }, + tapspagek3(index){ + let arr=[] + // return + // console.log(index,this.allList[index]) + this.allList[index].children.map(item=>{ + arr.push({ + name:item.name, + zxl:item.zxl + }) + }) + this.newlisttabinfo1=arr + this.bocindex1 = index; }, //集团对比 Groupcontrast(){ diff --git a/pages/learning/Thefulltext/index2.vue b/pages/learning/Thefulltext/index2.vue index 9a1651a..2b898c2 100644 --- a/pages/learning/Thefulltext/index2.vue +++ b/pages/learning/Thefulltext/index2.vue @@ -233,6 +233,12 @@ this.getdianzan() this.getCommentList(); + // 当进入页面时调一次接口添加浏览量 + this.getView() + let that=this + setTimeout(function(){ + that.addHot() + },30000) }, onShow: function() { this.initRecord(); @@ -275,6 +281,23 @@ url: '/pages/learning/Thefulltext/search?customerId='+this.customerId +"&status="+this.status+"&skpl="+"2" }) }, + getView(){ + this.$u.get('/addtodigest/addPageviews',{ + id:this.customerId + }) + .then(res=>{ + // console.log(res) + }) + }, + addHot(){ + // console.log('30') + this.$u.get('/addtodigest/addHeat',{ + id:this.customerId + }) + .then(res=>{ + // console.log(res) + }) + }, onPlay(){ this.innerAudioContext.onPlay(() => { // 播放监听 diff --git a/utils/http.js b/utils/http.js index bc6322a..2efe5b0 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,6 +1,6 @@ -const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 +// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 // const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 -// const baseUrl = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 +const baseUrl = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 // const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 // const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 // const baseUrl = 'https://hfju.com/api'; // 数智正式