From 8b858e4f72cb38a9f406658c531cb4a5e84d76dc Mon Sep 17 00:00:00 2001 From: lancer <1905818361@qq.com> Date: Thu, 26 Aug 2021 16:11:37 +0800 Subject: [PATCH] init --- config.js | 4 +- pages/center/Piabodata/Groupcontrast.vue | 2 +- pages/center/Piabodata/StaffAnalysis.vue | 20 +++---- pages/center/Piabodata/Theteamcompared.vue | 28 +++++----- pages/center/Piabodata/TrendAnalysis.vue | 18 ++++-- pages/center/Piabodata/index.vue | 65 ++++++++++++++-------- pages/learning/Thefulltext/index.vue | 4 +- pages/learning/Thefulltext/index2.vue | 4 +- utils/http.js | 4 +- 9 files changed, 88 insertions(+), 61 deletions(-) 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/Groupcontrast.vue b/pages/center/Piabodata/Groupcontrast.vue index 039902c..b247760 100644 --- a/pages/center/Piabodata/Groupcontrast.vue +++ b/pages/center/Piabodata/Groupcontrast.vue @@ -135,7 +135,7 @@ - 销奖能力(TOP10) + 销讲能力(TOP10) 楼盘 diff --git a/pages/center/Piabodata/StaffAnalysis.vue b/pages/center/Piabodata/StaffAnalysis.vue index 8805828..27653e9 100644 --- a/pages/center/Piabodata/StaffAnalysis.vue +++ b/pages/center/Piabodata/StaffAnalysis.vue @@ -42,8 +42,8 @@ 接待量 - {{staff2.label}}:{{ newAvg1||0}} {{staff1.label}}:{{newTeam1||0}} + {{staff2.label}}:{{newAvg1||0}} 来访(人) @@ -61,7 +61,7 @@ - 接待客户 + 录音时长 { this.chartData.categories.push(item.name) - this.chartData.series[0].data.push(item.sumCustomer) + this.chartData.series[0].data.push(item.avgExecutionRate) }) }else{ this.chartData.series=[ @@ -491,10 +491,10 @@ ] first.map(item=>{ this.chartData.categories.push(item.name) - this.chartData.series[0].data.push(item.sumCustomer) + this.chartData.series[0].data.push(item.avgExecutionRate) }) second.map(item=>{ - this.chartData.series[1].data.push(item.sumCustomer) + this.chartData.series[1].data.push(item.avgExecutionRate) }) } diff --git a/pages/center/Piabodata/Theteamcompared.vue b/pages/center/Piabodata/Theteamcompared.vue index a97caaf..985989f 100644 --- a/pages/center/Piabodata/Theteamcompared.vue +++ b/pages/center/Piabodata/Theteamcompared.vue @@ -53,8 +53,8 @@ - {{!staff1.value?'团队':staff1.label}}:{{newTeam1||0}} - {{!staff2.value?'均值':staff2.label}}:{{newAvg1||0}} + {{!staff1.value?'团队总数':staff1.label}}:{{newTeam1||0}} + {{!staff2.value?'团队平均':staff2.label}}:{{newAvg1||0}} 接待量 @@ -99,8 +99,8 @@ - {{!staff1.value?'团队':staff1.label}}:{{newTeam2||0}} - {{!staff2.value?'均值':staff2.label}}:{{newAvg2||0}} + {{!staff1.value?'团队总数':staff1.label}}:{{newTeam2||0}} + {{!staff2.value?'团队平均':staff2.label}}:{{newAvg2||0}} 录音时长 @@ -131,7 +131,7 @@ - 销奖执行率 + 销讲执行率 排名 @@ -145,8 +145,8 @@ - {{!staff1.value?'团队':staff1.label}}:{{newTeam3||0}} - {{!staff2.value?'均值':staff2.label}}:{{newAvg3||0}} + {{!staff1.value?'团队总数':staff1.label}}:{{newTeam3||0}} + {{!staff2.value?'团队平均':staff2.label}}:{{newAvg3||0}} 执行率 @@ -208,9 +208,9 @@ - 销奖能力 + 销讲能力 - 楼盘 + 团队 @@ -801,7 +801,7 @@ result[0].map(item=>{ let obj={} obj.name=item.deptName - obj.zxl=item.receptionCount + obj.zxl=item.data this['newlisttabinfo'+index].push(obj) }) } @@ -811,7 +811,7 @@ result[0].map(item=>{ let obj={} obj.name=item.deptName - obj.zxl=item.receptionCount + obj.zxl=item.data this['newlisttabinfo'+index].push(obj) }) // 判断是否显示平均 @@ -820,7 +820,7 @@ result[1].map(item=>{ let obj={} obj.name='平均' - obj.zxl=item.receptionCount + obj.zxl=item.data this['newlisttabinfo'+index].push(obj) }) } @@ -830,13 +830,13 @@ result[0].map(item=>{ let obj={} obj.name=item.deptName - obj.zxl=item.receptionCount + obj.zxl=item.data this['newlisttabinfo'+index].push(obj) }) result[1].map(item=>{ let obj={} obj.name=item.deptName - obj.zxl=item.receptionCount + obj.zxl=item.data this['newlisttabinfo'+index].push(obj) }) } diff --git a/pages/center/Piabodata/TrendAnalysis.vue b/pages/center/Piabodata/TrendAnalysis.vue index 79ab2b6..56c31c4 100644 --- a/pages/center/Piabodata/TrendAnalysis.vue +++ b/pages/center/Piabodata/TrendAnalysis.vue @@ -171,11 +171,11 @@ - - + + - + {{item1==0?'--':item1+'%'}} @@ -1117,12 +1117,13 @@ .tr { display: flex; - width: 100%; + // width: 100%; justify-content: center; height: 64rpx; align-items: center; border-bottom: 1px solid #E0E0E0; - + flex-wrap: nowrap; + .td { text-align: center; font-size: 24rpx; @@ -1130,8 +1131,13 @@ color: #333333; height: 64rpx; line-height: 64rpx; + // flex-shrink: 0; + } + .trd{ + flex-shrink: 0; + width: 200rpx; + } - .th { height: 64rpx; text-align: center; diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue index 22bfff6..b3a7f6c 100644 --- a/pages/center/Piabodata/index.vue +++ b/pages/center/Piabodata/index.vue @@ -75,7 +75,7 @@ 合计:50 均值:25 --> - 来访(人) + 合计:50 均值:25 --> + - - - {{item.name.substring(0, 4)}} - - + + + + {{item.name.substring(0, 4)}} + + + + {{item.zxl==null?0:item.zxl}}% - {{item.zxl==null?0:item.zxl}}% - + @@ -194,15 +197,18 @@ - - - {{item.name.substring(0, 4)}} - - + + + + {{item.name.substring(0, 4)}} + + + + {{item.zxl==null?0:item.zxl}}% - {{item.zxl==null?0:item.zxl}}% - + + @@ -268,13 +274,8 @@ ] }, lineOptsect1:{ - "categories": ["2016","2017","2018","2019","2020","2021"], - "series": [ - { - "name": "成交量", - "data": [35,8,25,37,4,20] - } - ] + "categories": [], + "series": [] }, lineOptsect2:{ "categories": ["2016","2017","2018","2019","2020","2021"], @@ -449,8 +450,9 @@ }, // 员工销奖趋势 getAward(){ - if(!this.staff.value){ + if(this.staffList.length==0){ this.staffFlag=false + this.$forceUpdate() return } this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate',{ @@ -482,8 +484,9 @@ }, // 团队接待趋势 receptionCountList(){ - if(!this.team.value){ + if(this.teamList.length==0){ this.teamFlag=false + this.$forceUpdate() return } this.$u.post('/cusLvStatistics/teamAnalysisExecutionRate',{ @@ -621,6 +624,13 @@ }, //团队对比 Theteamcompared(){ + if(this.teamList.length==0){ + uni.showToast({ + title:'没有团队呢', + icon:'none' + }) + return + } uni.navigateTo({ url: '/pages/center/Piabodata/Theteamcompared' }); @@ -639,6 +649,13 @@ }, //员工分析 toStaffAnalysis(){ + if(this.staffList.length==0){ + uni.showToast({ + title:'没有团队呢', + icon:'none' + }) + return + } uni.navigateTo({ url: '/pages/center/Piabodata/StaffAnalysis' }); diff --git a/pages/learning/Thefulltext/index.vue b/pages/learning/Thefulltext/index.vue index 9027731..c7788c3 100644 --- a/pages/learning/Thefulltext/index.vue +++ b/pages/learning/Thefulltext/index.vue @@ -197,6 +197,7 @@ num: 0, //上拉 转写文件下标 Bnum: 0, //下拉 转写文件下标 status:0, + timer:null }; }, onLoad: function(options) { @@ -206,7 +207,7 @@ // 当进入页面时调一次接口添加浏览量 this.getView() let that=this - setTimeout(function(){ + this.timer=setTimeout(function(){ that.addHot() },30000) }, @@ -232,6 +233,7 @@ }, // 在组件实例被从页面节点树移除时执行 destroyed: function() { + clearTimeout(this.timer) if (this.innerAudioContext) { this.innerAudioContext.destroy(); } diff --git a/pages/learning/Thefulltext/index2.vue b/pages/learning/Thefulltext/index2.vue index 2b898c2..d309406 100644 --- a/pages/learning/Thefulltext/index2.vue +++ b/pages/learning/Thefulltext/index2.vue @@ -223,6 +223,7 @@ itemobj:{}, textindex:0,//下拉 转写文件下标 toptextindex:0,//上拉 转写文件下标 + timer:null }; }, onLoad: function(options) { @@ -236,7 +237,7 @@ // 当进入页面时调一次接口添加浏览量 this.getView() let that=this - setTimeout(function(){ + this.timer=setTimeout(function(){ that.addHot() },30000) }, @@ -267,6 +268,7 @@ }, // 在组件实例被从页面节点树移除时执行 destroyed: function() { + clearTimeout(this.timer) if (this.innerAudioContext) { this.innerAudioContext.destroy(); } diff --git a/utils/http.js b/utils/http.js index e87e90a..120a504 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,7 +1,7 @@ -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'; // 数智正式