lancer 3 年前
父节点
当前提交
51f6c72b72
共有 5 个文件被更改,包括 141 次插入80 次删除
  1. +2
    -2
      config.js
  2. +3
    -3
      pages/center/Piabodata/StaffAnalysis.vue
  3. +119
    -62
      pages/center/Piabodata/TrendAnalysis.vue
  4. +15
    -11
      pages/center/Piabodata/index.vue
  5. +2
    -2
      utils/http.js

+ 2
- 2
config.js 查看文件

@@ -2,8 +2,8 @@
* 小程序配置文件
*/
// 此处主机域名修改成腾讯云解决方案分配的域名
var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站
// var host = 'http://192.168.31.163:8080/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://10.2.1.104:8081/autoSR/api'; // 刘敏
// var host = 'https://zkgj.quhouse.com/api'; // 质控正式


+ 3
- 3
pages/center/Piabodata/StaffAnalysis.vue 查看文件

@@ -316,7 +316,7 @@
]
first.map(item=>{
this.lineOptsect.categories.push(item.statDate.slice(5,10))
this.lineOptsect.series[0].data.push(item.sumCustomer||0)
this.lineOptsect.series[0].data.push(item.receptionCount||0)
})
}else{
this.lineOptsect.series=[
@@ -331,10 +331,10 @@
]
first.map(item=>{
this.lineOptsect.categories.push(item.statDate.slice(5,10))
this.lineOptsect.series[0].data.push(item.sumCustomer)
this.lineOptsect.series[0].data.push(item.receptionCount)
})
second.map(item=>{
this.lineOptsect.series[1].data.push(item.sumCustomer)
this.lineOptsect.series[1].data.push(item.receptionCount)
})
}
// console.log(this.lineOptsect,'1')


+ 119
- 62
pages/center/Piabodata/TrendAnalysis.vue 查看文件

@@ -86,8 +86,8 @@
</view>
</view> -->
<view style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;" v-if="guwenshow">
<view class="title2-che">选择顾问
<view style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;" v-if="guwenshow&&lopanobj.name" @click="oninputtap()">
<view class="title2-che" style="width: 220rpx;">{{lopanobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
<!-- <view>选择顾问:</view>
@@ -126,9 +126,9 @@
</view>
</view>
<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;"
v-if="Selecttuandui">
<view>团队选择:</view>
<view style="display: flex;align-items: center;height: 80rpx;"
v-if="Selecttuandui&&Selecttuanduiobj.name" @click="oninputtap4()">
<!-- <view>团队选择:</view>
<view style="width:75%;">
<input @click="oninputtap4()" v-model="Selecttuanduiobj.name" type="text" disabled="true"
:border="border" placeholder="请选择" />
@@ -136,6 +136,9 @@
<view>
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/qf/more.png"
style="width:12rpx;height:23rpx;margin-left: 16rpx;">
</view> -->
<view class="title2-che" style="width: 220rpx;">{{Selecttuanduiobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
@@ -163,22 +166,30 @@
<view class="title">
<view class="title1">对比报表</view>
</view>
<view class="table">
<view class="tr">
<view class="th" style="width: 30%;border-right:1px solid #E0E0E0;">时间</view>
<view class="th" style="width: 20%;border-right:1px solid #E0E0E0;">时段1</view>
<view class="th" style="width: 20%;border-right:1px solid #E0E0E0;">时段2</view>
<view class="th" style="width: 30%;">变化</view>
<view class="table" v-if="!guwenFlag">
<view v-for="(item,index) in tableDate" :key="index">
<view class="tr">
<view v-for="(item1,index1) in item" :key="index" style="width: 100%;">
<view v-if="index1<item.length-1||index==0" class="td" style="border-right:1px solid #E0E0E0;">{{item1}}</view>
<view v-if="index>0&&index1==item.length-1" class="td" style="border-right:1px solid #E0E0E0;" :style="{color:item1*1>0?'red':'green'}">{{item1==0?'--':item1+'%'}}</view>
</view>
</view>
</view>
</view>
<view v-for="(item,index) in tableDate" :key="index">
<view class="tr">
<view class="td" style="width: 30%;border-right:1px solid #E0E0E0;">{{item.time}}</view>
<view class="td" style="width: 20%;border-right:1px solid #E0E0E0;">{{item.time1}}</view>
<view class="td" style="width: 20%;border-right:1px solid #E0E0E0;">{{item.time2}}</view>
<view class="td" style="width: 30%;">{{item.compare}}</view>
<view class="table" v-if="guwenFlag">
<scroll-view style="" scroll-x="true" >
<view v-for="(item,index) in tableDate" :key="index">
<view class="tr">
<view v-for="(item1,index1) in item" :key="index1" style="width: 100%;">
<view v-if="index==1&&index1>0" class="td" :style="{color:item1*1>0?'red':'green'}" style="border-right:1px solid #E0E0E0;">{{item1==0?'--':item1+'%'}}</view>
<view v-else-if="index>1&&index1>0" class="td" style="border-right:1px solid #E0E0E0;">{{item1+'%'}}</view>
<view v-else class="td" style="border-right:1px solid #E0E0E0;">{{item1}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<view style="width: 100%;height: 60rpx;"></view>
<view v-if="Showhiddenunits">
@@ -279,32 +290,8 @@
sheartime1: "",
sheartime2: "",
intervaltime: 0,
tableDate:[
{
time:'06-20 VS 06-10',
time1:'500',
time2:'60',
compare:'+500(+19.83%)'
},
{
time:'06-20 VS 06-10',
time1:'500',
time2:'60',
compare:'+500(+19.83%)'
},
{
time:'06-20 VS 06-10',
time1:'500',
time2:'60',
compare:'+500(+19.83%)'
},
{
time:'06-20 VS 06-10',
time1:'500',
time2:'60',
compare:'+500(+19.83%)'
},
]
tableDate:[],
guwenFlag:false
};

},
@@ -610,6 +597,28 @@
})
that.lineOptsect.series[1].data = data.firstValue.map(item => item.fraction);
that.lineOptsect.series[0].data = data.lastValue.map(item => item.fraction)
that.guwenFlag=false
// // 处理表格数据
let arr=[
['时间','时段一','时段二','变化']
// {
// time:'时间',
// time1:'时段一',
// time2:'时段二',
// compare:'变化'
// },
]
that.lineOptsect.categories.map((item,index)=>{
let newarr=[item,data.firstValue[index].fraction,data.lastValue[index].fraction,data.contrast[index].data]
// obj.time=item
// obj.time1=data.firstValue[index].fraction
// obj.time2=data.lastValue[index].fraction
// obj.compare=data.contrast[index].data
// arr.push(obj)
arr.push(newarr)
})
// console.log(arr)
that.tableDate=arr
}
});
},
@@ -620,46 +629,59 @@
categories: [],
series: []
};
this.linetype = "line";
this.$u.post("/cusLvStatistics/teamOrOneValueShow", this.pamect).then(data => {
this.linetype = "radar";
this.$u.post("/cusLvStatistics/accFirstLevelContrast", this.pamect).then(data => {
// return
if (this.pamect.showStatus == 0) {
that.lineOptsect = {
categories: [],
series: [{
name: '起始时间',
name: '时段一',
data: [],
color: '#7ED3F4'
}]
}
data.lastValue.forEach((item, sdf) => {
that.lineOptsect.categories.push(item.statDate.substring(5, 10))
data.firstList.forEach((item, sdf) => {
that.lineOptsect.categories.push(item.name)
that.lineOptsect.series[0].data.push(data.headerList[sdf].total)
})
that.lineOptsect.series[0].data = data.lastValue.map(item => item.fraction);
// that.lineOptsect.series[0].data = data.lastValue.map(item => item.fraction);
} else {
// 当有对比的时候
that.lineOptsect = {
categories: [],
series: [{
name: '起始时间',
name: '时段一',
data: [],
color: '#7ED3F4'
},
{
name: '对比时间',
name: '时段二',
data: [],
color: '#FF7070'
},
]
}
data.firstValue.forEach((item, sdf) => {
data.lastValue.forEach((child, zxc) => {
if (sdf == zxc) {
that.lineOptsect.categories.push(item.statDate.substring(5,
10) + 'vs' + child.statDate.substring(5, 10))
}
})
data.headerList.forEach((item, sdf) => {
that.lineOptsect.categories.push(item.name)
that.lineOptsect.series[0].data.push(data.firstList[sdf].total)
that.lineOptsect.series[1].data.push(data.secondList[sdf].total)
})
that.lineOptsect.series[1].data = data.firstValue.map(item => item.fraction);
that.lineOptsect.series[0].data = data.lastValue.map(item => item.fraction)
// return
// // 处理表格数据
that.guwenFlag=true
let arr=[]
arr[0]=['时间',...that.lineOptsect.categories]
arr[1]=['变化']
arr[2]=['时段一']
arr[3]=['时段二']
// console.log(arr)
data.firstList.map((item,index)=>{
arr[1].push(item.total)
arr[2].push(data.secondList[index].total)
arr[3].push(data.thirdList[index].total)
})
that.tableDate=arr
}
});
},
@@ -778,6 +800,18 @@
})
this.lineOptsect.series[1].data = data.firstList.map(item => item.avgExecutionRate);
this.lineOptsect.series[0].data = data.lastList.map(item => item.avgExecutionRate)
let that=this
this.guwenFlag=false
// // 处理表格数据
let arr=[
['时间','时段一','时段二','变化']
]
that.lineOptsect.categories.map((item,index)=>{
let newarr=[item,data.firstList[index].avgExecutionRate,data.lastList[index].avgExecutionRate,data.contrast[index].data]
arr.push(newarr)
})
// console.log(arr)
that.tableDate=arr
}
})
},
@@ -994,6 +1028,29 @@
.fraction);
that.lineOptsect.series[0].data = data.lastValue.receptionStatList.map(item => item
.fraction)
that.guwenFlag=false
// 团队处理数据
// // 处理表格数据
let arr=[
['时间',data.firstValue.deptName,data.lastValue.deptName,'变化']
// {
// time:'时间',
// time1:'时段一',
// time2:'时段二',
// compare:'变化'
// },
]
that.lineOptsect.categories.map((item,index)=>{
let newarr=[item,data.firstValue.receptionStatList[index].fraction,data.lastValue.receptionStatList[index].fraction,data.contrast.receptionStatList[index].data]
// obj.time=item
// obj.time1=data.firstValue[index].fraction
// obj.time2=data.lastValue[index].fraction
// obj.compare=data.contrast[index].data
// arr.push(obj)
arr.push(newarr)
})
// console.log(arr)
that.tableDate=arr
}
}
});


+ 15
- 11
pages/center/Piabodata/index.vue 查看文件

@@ -68,7 +68,7 @@
</view>
<view class="swiper-box">
<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">
inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj1" :is-scroll="true">
</u-tabs-swiper>
</view>
<!-- <view class="hejibox">
@@ -104,8 +104,8 @@
</view>
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
<view class="heji">合计:{{allnum||0}}</view>
<view class="heji">均值:{{allavg||0}}</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
@@ -136,8 +136,8 @@
</view>
</view>
<view class="hejibox">
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
<view class="heji">合计:{{allnum1||0}}</view>
<view class="heji">均值:{{allavg1||0}}</view>
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
@@ -246,6 +246,10 @@
staffShow1:false,
lastStartDate:'',
lastEndDate :'',
allnum:'',
allavg:'',
allnum1:'',
allavg1:'',
totalTimeShow: false,
activeTab: 0,
numlist:[
@@ -281,13 +285,13 @@
}
]
},
newlistoj:[
newlistoj:[],
newlistoj1:[
{name:"接待量",id:1},
{name:"平均执行率",id:2},
{name:"接待客户",id:3},
{name:"录音时长",id:5},
],
bocindex:0,
newlisttabinfo:[
{name:'接待量',zxl:'10'},
@@ -458,8 +462,8 @@
lastStartDate:this.lastStartDate
})
.then(res=>{
this.newTeam3=res.avg[0]
this.newAvg3=res.avg[1]
this.allnum1=res.avg[0]
this.allavg1=res.avg[1]
// console.log(res)
let first=res.first
let second=res.second
@@ -493,8 +497,8 @@
.then(res=>{
// console.log(res)
let result=res.result
this.newTeam=res.avg[0]
this.newAvg=res.avg[1]
this.allnum=res.avg[0]
this.allavg=res.avg[1]
// 当选择趋势时
this.lineOptsect1={}
let allobj={


+ 2
- 2
utils/http.js 查看文件

@@ -1,5 +1,5 @@
const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站
// const baseUrl = 'http://192.168.31.161:8080/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://10.2.1.104:8081/autoSR/api'; // 刘敏
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式


正在加载...
取消
保存