lancer 2 years ago
parent
commit
9a53a17534
4 changed files with 237 additions and 84 deletions
  1. +2
    -2
      config.js
  2. +210
    -80
      pages/center/Piabodata/index.vue
  3. +23
    -0
      pages/learning/Thefulltext/index2.vue
  4. +2
    -2
      utils/http.js

+ 2
- 2
config.js View File

@@ -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'; // 数智正式


+ 210
- 80
pages/center/Piabodata/index.vue View File

@@ -67,14 +67,14 @@
<view class="title1">接待趋势</view>
</view>
<view class="swiper-box">
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex" @change="tapspagek2($event,2)"
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex" @change="tapspagek2()"
inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj" :is-scroll="true">
</u-tabs-swiper>
</view>
<view class="hejibox">
<!-- <view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view>
</view> -->
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
@@ -89,65 +89,69 @@
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title" @click="staffShow1=true">
<view class="title1">团队接待趋势</view>
<view class="title2">
<view class="title2-che" style="width: 220rpx;">{{team.label}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
<view class="" v-if="teamFlag">
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title" @click="staffShow1=true">
<view class="title1">团队接待趋势</view>
<view class="title2">
<view class="title2-che" style="width: 220rpx;">{{team.label}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
<!-- <view class="title2-che">执行率
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view> -->
</view>
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect1"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlineryiliwuyibao"
:canvas2d="true"
/>
</view>
</view>
<!-- <view class="title2-che">执行率
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view> -->
</view>
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect1"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlineryiliwuyibao"
:canvas2d="true"
/>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1">员工接待趋势</view>
<view class="title2" @click="staffShow=true">
<view class="title2-che" style="width: 220rpx;">{{staff.label}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
<view class="" v-if="staffFlag">
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1">员工接待趋势</view>
<view class="title2" @click="staffShow=true">
<view class="title2-che" style="width: 220rpx;">{{staff.label}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
<!-- <view class="title2-che">执行率
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view> -->
</view>
<!-- <view class="title2-che">执行率
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view> -->
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect2"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibao"
:canvas2d="true"
/>
</view>
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect2"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibao"
:canvas2d="true"
/>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
@@ -185,12 +189,12 @@
<view class="title1">销讲指标执行率</view>
</view>
<view class="swiper-box">
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex" @change="tapspagek2"
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex1" @change="tapspagek3"
inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj" :is-scroll="true">
</u-tabs-swiper>
</view>
<view class="jindu">
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index">
<view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
@@ -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(){


+ 23
- 0
pages/learning/Thefulltext/index2.vue View File

@@ -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(() => {
// 播放监听


+ 2
- 2
utils/http.js View File

@@ -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'; // 数智正式


Loading…
Cancel
Save