瀏覽代碼

修改日报文字

yun
douzhuo 2 年之前
父節點
當前提交
c0a1e71c1e
共有 14 個文件被更改,包括 1179 次插入826 次删除
  1. +212
    -161
      pages/center/Piabodata/Employeesstatistics.vue
  2. +248
    -218
      pages/center/Piabodata/Groupcontrast.vue
  3. +354
    -382
      pages/center/Piabodata/StaffAnalysis.vue
  4. +18
    -13
      pages/center/Piabodata/Theteamcompared.vue
  5. +28
    -4
      pages/center/Piabodata/TrendAnalysis.vue
  6. +11
    -1
      pages/center/Piabodata/Userinsightinto.vue
  7. +3
    -2
      pages/center/Piabodata/index.vue
  8. +5
    -1
      pages/center/prohibited/index.vue
  9. +5
    -5
      pages/center/records/index.vue
  10. +45
    -5
      pages/index/index.vue
  11. +2
    -1
      pages/mine/messageList.vue
  12. +90
    -11
      pages/reportExcel/dayReport.vue
  13. +155
    -20
      pages/reportExcel/weekReport.vue
  14. +3
    -2
      utils/domain.js

+ 212
- 161
pages/center/Piabodata/Employeesstatistics.vue 查看文件

@@ -14,180 +14,195 @@
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
</view>
</view>

<!-- 接待量排名(TOP10) -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
<view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo1.total}}</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo1.count}}</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均接待量</view>
<view class="text1-2">{{newlisttabinfo1.avg}}</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo1.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo1.result" :key="index">
<view class="jindu-boxche">

<view class="jindu" style="min-height: 360rpx;">
<view v-if="newlisttabinfo1.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo1.result" :key="index">
<view class="jindu-boxche" v-if="item.zxl != 0">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</view>
<view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>

<!-- 销讲执行率排行(TOP10) -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">销讲执行率排行(TOP10)</view>
<view class="title1" style="flex: 1;">销讲执行率排行(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo3.count}}</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均执行率</view>
<view class="text1-2">{{newlisttabinfo3.avg}}</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo3.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo3.result" :key="index">
<view class="jindu-boxche">
<view class="jindu" style="min-height: 360rpx;">
<view v-if="newlisttabinfo3.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo3.result" :key="index">
<view class="jindu-boxche" v-if="item.zxl != 0">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</view>
<view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<!-- 录音时长(TOP10) -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">录音时长(TOP10)</view>
<view class="title1" style="flex: 1;">录音时长(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo2.total}}</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo2.count}}</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均录音时长</view>
<view class="text1-2">{{newlisttabinfo2.avg}}</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo2.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo2.result" :key="index">
<view class="jindu-boxche">
<view class="jindu" style="min-height: 360rpx;">
<view v-if="newlisttabinfo2.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo2.result" :key="index">
<view class="jindu-boxche" v-if="item.zxl != 0">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</view>
<view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>

<!-- 违禁次数排名(TOP10 -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
<view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo4.total}}</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo4.count}}</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均违禁次数</view>
<view class="text1-2">{{newlisttabinfo4.avg}}</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo4.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo4.result" :key="index">
<view class="jindu-boxche">
<view class="jindu" style="min-height: 360rpx;">
<view v-if="newlisttabinfo4.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo4.result" :key="index">
<view class="jindu-boxche" v-if="item.zxl != 0">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</view>
<view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<view v-if="false" style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single" v-if="false">

<!-- 接待未标顾问(TOP10) -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">接待未标顾问(TOP10)</view>
<view class="title1" style="flex: 1;">接待未标顾问(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo4.total}}</view>
<view class="text1-2">{{newlisttabinfo5.total}}</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo4.count}}</view>
<view class="text1-2">{{newlisttabinfo5.count}}</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均违禁次数</view>
<view class="text1-2">{{newlisttabinfo4.avg}}</view>
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">均值</view>
<view class="text1-2">{{newlisttabinfo5.avg}}</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo4.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo4.result" :key="index">
<view class="jindu-boxche">
<view class="jindu" style="min-height: 360rpx;">
<view v-if="newlisttabinfo5.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo5.result" :key="index">
<view class="jindu-boxche" v-if="item.zxl != 0">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</view>
<view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo5.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
</view>
</template>
@@ -202,143 +217,165 @@
activeTotal: 4,
totalTimeShow: false,
// 项目id
houseId:'',
lastEndDate:'',
lastStartDate:'',
newlisttabinfo1:{
avg:'',
count:'',
total:'',
result:[],
houseId: '',
lastEndDate: '',
lastStartDate: '',
newlisttabinfo1: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo2:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo2: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo3:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo3: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo4:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo4: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo5: {
avg: '',
count: '',
total: '',
result: [],
},
};
},
onLoad() {
onLoad(option) {
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
this.init()
if (option.type == 1) {
this.totalTimeChange({startDate: option.staTime, endDate: option.endtime})
}
},
onPullDownRefresh() {
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
init(){
this.newlisttabinfo1={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo2={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo3={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo4={
avg:'',
count:'',
total:'',
result:[],
init() {
this.newlisttabinfo1 = {
avg: '',
count: '',
total: '',
result: [],
}
this.newlisttabinfo2 = {
avg: '',
count: '',
total: '',
result: [],
}
var activeTotal=0;
if(this.activeTotal==3){
activeTotal=null;
}else{
activeTotal=this.activeTotal;
this.lastEndDate='';
this.lastStartDate='';
this.newlisttabinfo3 = {
avg: '',
count: '',
total: '',
result: [],
}
var promse={
timeType:activeTotal,
lastStartDate:this.lastStartDate,
lastEndDate:this.lastEndDate,
houseId:this.houseId
this.newlisttabinfo4 = {
avg: '',
count: '',
total: '',
result: [],
}

var activeTotal = 0;
if (this.activeTotal == 3) {
activeTotal = null;
} else {
activeTotal = this.activeTotal;
this.lastEndDate = '';
this.lastStartDate = '';
}
var promse = {
timeType: activeTotal,
lastStartDate: this.lastStartDate,
lastEndDate: this.lastEndDate,
houseId: this.houseId
}
this.staffStatisticsReceptionTop10(promse)
this.staffStatisticsRecordingTimTop10(promse)
this.staffStatisticsExecutionRateTop10(promse)
this.staffStatisticsProhibitedTop10(promse)
this.staffStatisticsUnlabeledTop10(promse)
},
//接待量排名
staffStatisticsReceptionTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
staffStatisticsReceptionTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo1=res;
res.result = this.dealData(res.result)
this.newlisttabinfo1 = res;
})
},
//录音时长
staffStatisticsRecordingTimTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
staffStatisticsRecordingTimTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo2=res;
res.result = this.dealData(res.result)
this.newlisttabinfo2 = res;
})
},
//销讲
staffStatisticsExecutionRateTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data;
item.zxl1=item.data;
item.name=item.accountName
staffStatisticsExecutionRateTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data;
item.zxl1 = item.data;
item.name = item.accountName
})
this.newlisttabinfo3=res;
this.newlisttabinfo3 = res;
})
},
//j禁忌
staffStatisticsProhibitedTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
// j禁忌
staffStatisticsProhibitedTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo4=res;
res.result = this.dealData(res.result)
this.newlisttabinfo4 = res;
})
},

// 未标记客户数量排名
staffStatisticsUnlabeledTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsUnlabeledTop', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.tagCustomer
item.name = item.accountName
})
res.result = this.dealData(res.result)
this.newlisttabinfo5 = res;
})
},

//自定义时间
totalTimeChange(e) {
console.log(e.startDate, e.endDate)
this.activeTotal=3;
this.lastEndDate=e.endDate
this.lastStartDate=e.startDate
this.activeTotal = 3;
this.lastEndDate = e.endDate
this.lastStartDate = e.startDate
this.init()
},
//时间切换
@@ -347,15 +384,17 @@
this.totalTimeShow = true;
} else {
this.activeTotal = index;
this.lastEndDate='';
this.lastStartDate='';
this.lastEndDate = '';
this.lastStartDate = '';
this.init()
}
},
// 定义一个公共方法对数据进行处理
dealData(arr){
dealData(arr) {
// 获取最大值
let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3
let num = Math.max.apply(Math, arr.map(function(o) {
return o.zxl
})) //结果:3
// console.log(num)
// if(num>100){
// // 获取最大值的下标
@@ -372,11 +411,11 @@
// })
// return arr
// }
arr.map(item=>{
item.zxl1=Math.floor(item.zxl/num*100)
arr.map(item => {
item.zxl1 = Math.floor(item.zxl / num * 100)
})
return arr
},
}
};
@@ -388,16 +427,28 @@
background: #FAFAFA;
padding-bottom: 60rpx;
}
.hejisan{
.single {
min-height: 500rpx;
.jindu {
height: auto;
min-height: 360rpx;
}
}

.hejisan {
width: 92%;
margin: 0 auto;
display: flex;
padding-top: 20rpx;
padding-bottom:20rpx;
.text1-1{
padding-bottom: 20rpx;

.text1-1 {
color: #666666;
}
.text1-2{

.text1-2 {
color: #333333;
margin-top: 10rpx;
}


+ 248
- 218
pages/center/Piabodata/Groupcontrast.vue 查看文件

@@ -14,8 +14,8 @@
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
@@ -26,21 +26,20 @@
<view class="heji">均值:{{newAvg1||0}}</view>
</view>
<view class="jindu">
<scroll-view style="height: 300rpx;" scroll-y="true" >
<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;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>

<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;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</scroll-view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
@@ -51,20 +50,19 @@
<view class="heji">均值:{{newAvg2||0}}</view>
</view>
<view class="jindu">
<scroll-view style="height: 300rpx;" scroll-y="true" >
<view class="jindu-box" v-for="(item,index) in newlisttabinfo2" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#4FC78F" :percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
<view class="jindu-box" v-for="(item,index) in newlisttabinfo2" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#4FC78F"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
</view>
</scroll-view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
@@ -78,26 +76,25 @@
</view>
</view> -->
</view>
<view class="hejibox">
<view class="heji">项目:{{newTeam3||0}}</view>
<view class="heji">均值:{{newAvg3||0}}%</view>
</view>
<view class="jindu">
<scroll-view style="height: 300rpx;" scroll-y="true" >
<view class="jindu-box" v-for="(item,index) in newlisttabinfo3" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
<view class="jindu-box" v-for="(item,index) in newlisttabinfo3" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
</view>
</scroll-view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
@@ -111,62 +108,56 @@
</view>
</view> -->
</view>
<!-- <view class="hejibox">
<!-- <view class="hejibox">
<view class="heji">项目:{{newTeam4||0}}</view>
<view class="heji">均值:{{newAvg4||0}}</view>
</view> -->
<view class="jindu">
<scroll-view style="height: 300rpx;" scroll-y="true" >
<view class="jindu-box" v-for="(item,index) in newlisttabinfo4" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
<view class="jindu" style="padding: 30rpx 0;">
<view class="jindu-box" v-for="(item,index) in newlisttabinfo4" :key="index">
<view class="jindu-boxche">
<view class="jindu-name">{{item.name.substring(0, 4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
</view>
</scroll-view>
</view>

</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title" style="padding-right: 30rpx;">
<view class="title1" style="flex: 1;">销讲能力</view>
<!-- <view class="title2" style="flex: 1;justify-content: flex-end;" @click="Groupcontrast">
<!-- <view class="title2" style="flex: 1;justify-content: flex-end;" @click="Groupcontrast">
<view class="title2-che">项目
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view> -->
<view class="title2" style="flex: 1;justify-content: flex-end;" @click="staffShow=true">
<view class="title2-che" style="width: auto;"><text style="margin-right: 40rpx;">{{staff.label}}</text>
<view class="title2-che" style="width: auto;"><text
style="margin-right: 40rpx;">{{staff.label}}</text>
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view>
<!-- <view class="hejibox">
<!-- <view class="hejibox">
<view class="heji">项目:50</view>
<view class="heji">均值:25</view>
</view> -->
<view class="uchaserbox">
<qiun-data-charts
type="radar"
:opts="opts"
:chartData="chartData"
:canvas2d="true"
canvasId="wangxiaohuaerlingeryilingwuyib88"
background="none"
/>
<qiun-data-charts type="radar" :opts="opts" :chartData="chartData" :canvas2d="true"
canvasId="wangxiaohuaerlingeryilingwuyib88" background="none" />
</view>
</view>
<!-- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>




<!-- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1">禁忌执行率(TOP10)</view>
@@ -187,7 +178,7 @@
</view>
</view>
</view> -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<!-- <view class="single">
<view class="title" style="padding-right: 30rpx;">
@@ -212,10 +203,11 @@
/>
</view>
</view> -->
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<!-- 选择项目 -->
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'></u-select>
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'>
</u-select>
</view>
</template>

@@ -228,56 +220,86 @@
return {
activeTotal: 4,
activeTotal2: 0,
bocindex:0,
bocindex: 0,
totalTimeShow: false,
// 项目id
houseId:'',
staffShow:false,
staffList:[],
lastStartDate:'',
lastEndDate :'',
newTeam1:'',
newAvg1:'',
newTeam2:'',
newAvg2:'',
newTeam3:'',
newAvg3:'',
newTeam4:'',
newAvg4:'',
staff:{
value:'',
label:''
houseId: '',
staffShow: false,
staffList: [],
lastStartDate: '',
lastEndDate: '',
newTeam1: '',
newAvg1: '',
newTeam2: '',
newAvg2: '',
newTeam3: '',
newAvg3: '',
newTeam4: '',
newAvg4: '',
staff: {
value: '',
label: ''
},
newlisttabinfo1:[
{name:'接待量',zxl:'10'},
{name:'平均执行率',zxl:'50'},
{name:'接待客户',zxl:'80'},
newlisttabinfo1: [{
name: '接待量',
zxl: '10'
},
{
name: '平均执行率',
zxl: '50'
},
{
name: '接待客户',
zxl: '80'
},
],
newlisttabinfo2:[
{name:'接待量',zxl:'10'},
{name:'平均执行率',zxl:'50'},
{name:'接待客户',zxl:'80'},
newlisttabinfo2: [{
name: '接待量',
zxl: '10'
},
{
name: '平均执行率',
zxl: '50'
},
{
name: '接待客户',
zxl: '80'
},
],
newlisttabinfo3:[
{name:'接待量',zxl:'10'},
{name:'平均执行率',zxl:'50'},
{name:'接待客户',zxl:'80'},
newlisttabinfo3: [{
name: '接待量',
zxl: '10'
},
{
name: '平均执行率',
zxl: '50'
},
{
name: '接待客户',
zxl: '80'
},
],
newlisttabinfo4:[
{name:'接待量',zxl:'10'},
{name:'平均执行率',zxl:'50'},
{name:'接待客户',zxl:'80'},
newlisttabinfo4: [{
name: '接待量',
zxl: '10'
},
{
name: '平均执行率',
zxl: '50'
},
{
name: '接待客户',
zxl: '80'
},
],
chartData:{
"categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
"series": [
{
"name": "成交量",
"data": [90,110,165,195,187,172]
}
]
chartData: {
"categories": ["维度1", "维度2", "维度3", "维度4", "维度5", "维度6"],
"series": [{
"name": "成交量",
"data": [90, 110, 165, 195, 187, 172]
}]
},

opts: {
fontSize: 10,
extra: {
@@ -286,72 +308,72 @@
}
}
}
};
},
onLoad() {
let that=this
uni.$on('updateGroup',function(data){
let that = this
uni.$on('updateGroup', function(data) {
console.log(data)
that.houseId=data.arr.join(',')
that.houseId = data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
this.getSectionList()
},
onPullDownRefresh(){
let that=this
uni.$on('updateGroup',function(data){
onPullDownRefresh() {
let that = this
uni.$on('updateGroup', function(data) {
console.log(data)
that.houseId=data.arr.join(',')
that.houseId = data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
this.getSectionList()
setTimeout(function () {
uni.stopPullDownRefresh();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
// 获取部门列表
getSectionList(){
this.$u.post('/user/getHouseByToken',)
.then(res=>{
// console.log(res)
this.staffList=[]
res.map((item,index)=>{
let obj={}
obj.value=item.id
obj.label=item.propertyName
getSectionList() {
this.$u.post('/user/getHouseByToken', )
.then(res => {
// console.log(res)
this.staffList = []
res.map((item, index) => {
let obj = {}
obj.value = item.id
obj.label = item.propertyName
this.staffList.push(obj)
})
this.houseId = this.staffList[0].value
this.staff = this.staffList[0]
this.getdata()
// console.log(this.staffList,this.staffList,this.houseId)
})
this.houseId=this.staffList[0].value
this.staff=this.staffList[0]
this.getdata()
// console.log(this.staffList,this.staffList,this.houseId)
})

},
//指标执行率分析tab
tapspagek2(index) {
this.bocindex = index;
},
staffSelectCallback(e){
this.staff=e[0]
this.houseId=e[0].value
staffSelectCallback(e) {
this.staff = e[0]
this.houseId = e[0].value
this.getPowerList()
},
getdata(){
getdata() {
// 请求接口获取接待量
this.receptionCountList('1','/cusLvStatistics/groupComparisonReception')
this.receptionCountList('1', '/cusLvStatistics/groupComparisonReception')
// 接待时长
this.receptionCountList('2','/cusLvStatistics/groupComparisonReceptionTime')
this.receptionCountList('2', '/cusLvStatistics/groupComparisonReceptionTime')
// 小将排名
this.receptionCountList('3','/cusLvStatistics/groupComparisonTalkRank')
this.receptionCountList('3', '/cusLvStatistics/groupComparisonTalkRank')
// 顾问牌名
this.receptionCountList('4','/cusLvStatistics/groupComparisonTalkRankByConsultant')
this.receptionCountList('4', '/cusLvStatistics/groupComparisonTalkRankByConsultant')
// 销奖能力
this.getPowerList()
},
@@ -361,8 +383,8 @@
this.totalTimeShow = true;
} else {
this.activeTotal = index;
this.lastEndDate=''
this.lastStartDate=''
this.lastEndDate = ''
this.lastStartDate = ''
this.getdata()
// // 获取数据
// // 团队对比接待量
@@ -376,108 +398,110 @@
}
},
// 接待时长
receptionCountList(index,url){
this.$u.post(url,{
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
.then(res=>{
// console.log(res)
let result=res.result
this['newTeam'+index]=res.avg[0]
this['newAvg'+index]=res.avg[1]
// return
receptionCountList(index, url) {
this.$u.post(url, {
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
.then(res => {
// console.log(res)
let result = res.result
this['newTeam' + index] = res.avg[0]
this['newAvg' + index] = res.avg[1]
// return
// 处理数据
// 先处理牌名数据,需要进行判断全部还是单个
// 当为全部时
this['newlisttabinfo'+index]=[]
this['newlisttabinfo' + index] = []
// 当选择全部时
let arr=[]
// 当两个都选择的时候
result.map(item=>{
let obj={}
obj.name=item.houseName
obj.zxl=item.data
arr.push(obj)
})
arr=this.dealData(arr)
this['newlisttabinfo'+index]=arr
})
let arr = []
// 当两个都选择的时候
result.map(item => {
let obj = {}
obj.name = item.houseName
obj.zxl = item.data
arr.push(obj)
})
arr = this.dealData(arr)
this['newlisttabinfo' + index] = arr
})
},
// 获取销奖能力
getPowerList(){
this.$u.post('/cusLvStatistics/groupComparisonMarketingAbility',{
houseIds:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
.then(res=>{
// console.log(res,123)
// 处理数据
// return
this.chartData={
categories:[],
series:[]
}
let allobj={
categories:[],
series:[]
}
let max = 0;
res.result.map((item,index)=>{
let obj={
name:item[0].houseName,
data:[]
getPowerList() {
this.$u.post('/cusLvStatistics/groupComparisonMarketingAbility', {
houseIds: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
.then(res => {
// console.log(res,123)
// 处理数据
// return
this.chartData = {
categories: [],
series: []
}
item.map(item1=>{
if(index==0){
allobj.categories.push(item1.name)
let allobj = {
categories: [],
series: []
}
let max = 0;
res.result.map((item, index) => {
let obj = {
name: item[0].houseName,
data: []
}
obj.data.push(item1.avgExecutionRate)
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
item.map(item1 => {
if (index == 0) {
allobj.categories.push(item1.name)
}
obj.data.push(item1.avgExecutionRate)
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
})
allobj.series.push(obj)
})
allobj.series.push(obj)
// console.log(allobj)
this.opts.extra.radar.max = max + 25
this.chartData = allobj
this.$forceUpdate()
})
// console.log(allobj)
this.opts.extra.radar.max = max + 25
this.chartData=allobj
this.$forceUpdate()
})
},
//自定义时间
totalTimeChange(e) {
console.log(e.startDate, e.endDate)
this.activeTotal=3;
this.lastEndDate=e.endDate
this.lastStartDate=e.startDate
this.activeTotal = 3;
this.lastEndDate = e.endDate
this.lastStartDate = e.startDate
this.getdata()
},
//集团对比
Groupcontrast(){
Groupcontrast() {
uni.navigateTo({
url: `/pages/center/Piabodata/selectGroup?ids=${this.houseId}`
url: `/pages/center/Piabodata/selectGroup?ids=${this.houseId}`
});
},
// 定义一个公共方法对数据进行处理
dealData(arr){
dealData(arr) {
// 获取最大值
let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3
let num = Math.max.apply(Math, arr.map(function(o) {
return o.zxl
})) //结果:3
// console.log(num)
if(num>100){
if (num > 100) {
// 获取最大值的下标
// let idx=arr.findIndex(item=>item.zxl==num)
// console.log(idx,123)
arr.map(item=>{
item.zxl1=Math.floor(item.zxl/num*100)
arr.map(item => {
item.zxl1 = Math.floor(item.zxl / num * 100)
})
// console.log(arr)
return arr
}else{
arr.map(item=>{
item.zxl1=item.zxl
} else {
arr.map(item => {
item.zxl1 = item.zxl
})
return arr
}
@@ -492,4 +516,10 @@
background: #FAFAFA;
padding-bottom: 60rpx;
}

.jindu {
padding: 0 0 30rpx;
height: auto;
min-height: 300rpx;
}
</style>

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

@@ -14,7 +14,7 @@
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
</view>
</view>
<view class="timepick">
<view class="timepicktime" @click="chiocStaff(0)">
<view>{{staff1.label}}</view>
@@ -23,10 +23,11 @@
</view>
</view>
<view class="timepickpick">
<view @click="checkboxChange()" style="width: 40rpx;height:40rpx;border: 1rpx solid #E0E0E0;">
<image v-if="timepickpickisshow" style="width: 40rpx;height: 40rpx;" src="../../../static/images/xuanzhong.png" mode=""></image>
</view>
<view style="font-size:26rpx;text-indent: 12rpx;">对比</view>
<view @click="checkboxChange()" style="width: 40rpx;height:40rpx;border: 1rpx solid #E0E0E0;">
<image v-if="timepickpickisshow" style="width: 40rpx;height: 40rpx;"
src="../../../static/images/xuanzhong.png" mode=""></image>
</view>
<view style="font-size:26rpx;text-indent: 12rpx;">对比</view>
</view>
<view class="timepicktime" v-if="timepickpickisshow" @click="chiocStaff(1)">
<view>{{staff2.label}}</view>
@@ -35,7 +36,7 @@
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
@@ -47,23 +48,17 @@
</view>
<view class="danwei">来访(人)</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibbb"
:canvas2d="true"
/>
<qiun-data-charts type="line" :chartData="lineOptsect" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibbb" :canvas2d="true" />
</view>
</view>

<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">录音时长</view>
<view class="title3" style="flex: 1;">
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)">
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)">
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">有效录音</view>
</view>
<view class="title3-box" style="width: 40%;"@click="tabtimetap1(1)">
@@ -77,109 +72,90 @@
</view>
<view class="danwei">录音时长</view>
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect1"
background="none"
:ontouch="true"
canvasId="wangxiaouaerlingeryilingwuyibhh"
:canvas2d="true"
/>
<qiun-data-charts type="line" :chartData="lineOptsect1" background="none" :ontouch="true"
canvasId="wangxiaouaerlingeryilingwuyibhh" :canvas2d="true" />
</view>
</view>

<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">销讲执行率</view>
<view class="title3" style="flex: 1;">
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)">
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">销讲执行率</view>
<view class="title3" style="flex: 1;">
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)">
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">有效录音</view>
</view>
<view class="title3-box" style="width: 40%;"@click="tabtimetap1(1)">
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">录音时长</view>
</view> -->
</view>
</view>
<view class="hejibox">
<view class="heji">{{staff1.label}}:{{newTeam3||0}}</view>
<view class="heji" v-if="timepickpickisshow">{{staff2.label}}:{{newAvg3||0}}</view>
</view>
<!-- <view class="danwei">录音时长</view> -->
<view class="uchaserbox">
<qiun-data-charts
type="line"
:chartData="lineOptsect2"
background="none"
:ontouch="true"
canvasId="wangxiaohuaerlingryilingwuyibhh"
:canvas2d="true"
:opts="lineOpts"
/>
</view>
</view>
</view>
<view class="hejibox">
<view class="heji">{{staff1.label}}:{{newTeam3||0}}</view>
<view class="heji" v-if="timepickpickisshow">{{staff2.label}}:{{newAvg3||0}}</view>
</view>
<!-- <view class="danwei">录音时长</view> -->
<view class="uchaserbox">
<qiun-data-charts type="line" :chartData="lineOptsect2" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingryilingwuyibhh" :canvas2d="true" :opts="lineOpts" />
</view>
</view>

<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title" style="padding-right: 30rpx;">
<view class="title1" style="flex: 1;">销讲能力</view>
</view>
<view class="uchaserbox" style="height: 70vh;">
<qiun-data-charts
type="radar"
:chartData="chartData"
:canvas2d="true"
canvasId="wangxiaohuaerlingeryilinwuycsdx"
background="none"
:opts="opts"
/>
<qiun-data-charts type="radar" :chartData="chartData" :canvas2d="true"
canvasId="wangxiaohuaerlingeryilinwuycsdx" background="none" :opts="opts" />
</view>
</view>

<!-- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> -->
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>

<!-- 选择客户的选择框 -->
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'></u-select>
<u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'></u-select>
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'>
</u-select>
<u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'>
</u-select>
</view>
</template>
<script>
export default {
data() {
return {
timepickpickisshow:true,
timepickpickisshow: true,
totalTimeShow: false,
activeTotal:4,
activeTotal2:1,
activeTotal: 4,
activeTotal2: 1,
// 项目id
houseId:'',
staffList:[],
staffList1:[],
staffShow:false,
staffShow1:false,
newTeam1:'',
newAvg1:'',
newTeam2:'',
newAvg2:'',
newTeam3:'',
newAvg3:'',
staff1:{
value:'',
label:''
houseId: '',
staffList: [],
staffList1: [],
staffShow: false,
staffShow1: false,
newTeam1: '',
newAvg1: '',
newTeam2: '',
newAvg2: '',
newTeam3: '',
newAvg3: '',
staff1: {
value: '',
label: ''
},
staff2:{
value:'',
label:'平均'
staff2: {
value: '',
label: '平均'
},
lineOpts: {
yAxis: {
data: [
{
max: 100,
min: 0,
}
]
data: [{
max: 100,
min: 0,
}]
}
},
opts: {
@@ -190,81 +166,76 @@
}
}
},
lastStartDate:'',
lastEndDate :'',
selindex:[0],
choseStaffFlag:false,
lineOptsect:{
"categories": ["2016","2017","2018","2019","2020","2021"],
"series": [
{
lastStartDate: '',
lastEndDate: '',
selindex: [0],
choseStaffFlag: false,
lineOptsect: {
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
"series": [{
"name": "成交量1",
"data": [35,8,25,37,4,20]
"data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
"data": [40,18,45,44,10,60]
"data": [40, 18, 45, 44, 10, 60]
}
]
},
lineOptsect1:{
"categories": ["2016","2017","2018","2019","2020","2021"],
"series": [
{
lineOptsect1: {
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
"series": [{
"name": "成交量1",
"data": [35,8,25,37,4,20]
"data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
"data": [40,18,45,44,10,60]
"data": [40, 18, 45, 44, 10, 60]
}
]
},
lineOptsect2:{
"categories": ["2016","2017","2018","2019","2020","2021"],
"series": [
{
lineOptsect2: {
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
"series": [{
"name": "成交量1",
"data": [35,8,25,37,4,20]
"data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
"data": [40,18,45,44,10,60]
"data": [40, 18, 45, 44, 10, 60]
}
]
},
chartData:{
"categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
"series": [
{
"name": "成交量",
"data": [90,110,165,195,187,172]
}
]
}
chartData: {
"categories": ["维度1", "维度2", "维度3", "维度4", "维度5", "维度6"],
"series": [{
"name": "成交量",
"data": [90, 110, 165, 195, 187, 172]
}]
},
};

},
onLoad: function(options) {
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// this.buildingname = uni.getStorageSync('buildingID').name;
// 请求接口获取所有置业顾问员工的列表
this.getStaffList()
onLoad(option) {
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// 请求接口获取所有置业顾问员工的列表
this.getStaffList(option)
},
onPullDownRefresh() {
this.getStaffList()
setTimeout(function () {
uni.stopPullDownRefresh();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
//是否对比
checkboxChange(){
this.timepickpickisshow=!this.timepickpickisshow;
this.staff2.value=''
this.staff2.label='平均'
checkboxChange() {
this.timepickpickisshow = !this.timepickpickisshow;
this.staff2.value = ''
this.staff2.label = '平均'
// this.getreception()
// this.getRecordList()
// this.getAwardList()
@@ -272,44 +243,52 @@
this.getdata()
},
// 点击员工对比
chiocStaff(idx){
if(idx==0){
chiocStaff(idx) {
if (idx == 0) {
// 当选择了第一个的时候
this.choseStaffFlag=false
this.staffShow=true
}else{
this.choseStaffFlag=true
this.staffShow1=true
this.choseStaffFlag = false
this.staffShow = true
} else {
this.choseStaffFlag = true
this.staffShow1 = true
}
},
// 获取员工列表
getStaffList(){
this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId',{houseId:this.houseId})
.then(res=>{
// console.log(res,'123')
this.staffList=[]
this.staffList1=[]
res.map(item=>{
let obj={}
obj.value=item.accountId
obj.label=item.name
this.staffList.push(obj)
getStaffList(option) {
this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId', {
houseId: this.houseId
})
this.staffList1=[...this.staffList]
this.staffList1.unshift({
value:'',
label:'平均'
.then(res => {
// console.log(res,'123')
this.staffList = []
this.staffList1 = []
res.map(item => {
let obj = {}
obj.value = item.accountId
obj.label = item.name
this.staffList.push(obj)
})
this.staff1=this.staffList[0]
// this.getreception()
// this.getRecordList()
// this.getAwardList()
// this.getAward()
this.getdata()
})
this.staffList1 = [...this.staffList]
this.staffList1.unshift({
value: '',
label: '平均'
})
this.staff1 = this.staffList[0]
console.log('我进来了', option)
if (option.type == 1) {
this.activeTotal = 3;
this.lastEndDate = option.endDate
this.lastStartDate = option.startDate
let obj = this.staffList1.find(item => {return item.value == option.id })
console.log(obj, 'obj')
this.staff1.label = obj.label
this.staff1.value = option.id
}
this.getdata()
})
},
getdata(){
getdata() {
this.getreception()
this.getRecordList()
this.getAward()
@@ -317,230 +296,218 @@

},
// 获取接待量数据
getreception(){
this.$u.post('/cusLvStatistics/employeeAnalysisReception',{
userA:this.staff1.value,
userB:this.staff2.value,
houseId:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
.then(res=>{
this.newTeam1=res.avg[0]
this.newAvg1=res.avg[1]
// console.log(res)
let first=res.first
let second=res.second
this.lineOptsect.categories=[]
if(!this.timepickpickisshow){
this.lineOptsect.series=[
{
name:first[0].accountName,
data:[]
}
]
first.map(item=>{
this.lineOptsect.categories.push(item.statDate.slice(5,10))
this.lineOptsect.series[0].data.push(item.receptionCount||0)
})
}else{
this.lineOptsect.series=[
{
name:first[0].accountName,
data:[]
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item=>{
this.lineOptsect.categories.push(item.statDate.slice(5,10))
this.lineOptsect.series[0].data.push(item.receptionCount)
})
second.map(item=>{
this.lineOptsect.series[1].data.push(item.receptionCount)
})
}
// console.log(this.lineOptsect,'1')
})
getreception() {
this.$u.post('/cusLvStatistics/employeeAnalysisReception', {
userA: this.staff1.value,
userB: this.staff2.value,
houseId: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
.then(res => {
this.newTeam1 = res.avg[0]
this.newAvg1 = res.avg[1]
// console.log(res)
let first = res.first
let second = res.second
this.lineOptsect.categories = []
if (!this.timepickpickisshow) {
this.lineOptsect.series = [{
name: first[0].accountName,
data: []
}]
first.map(item => {
this.lineOptsect.categories.push(item.statDate.slice(5, 10))
this.lineOptsect.series[0].data.push(item.receptionCount || 0)
})
} else {
this.lineOptsect.series = [{
name: first[0].accountName,
data: []
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item => {
this.lineOptsect.categories.push(item.statDate.slice(5, 10))
this.lineOptsect.series[0].data.push(item.receptionCount)
})
second.map(item => {
this.lineOptsect.series[1].data.push(item.receptionCount)
})
}
// console.log(this.lineOptsect,'1')
})
},
// 销奖趋势
getAward(){
this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate',{
userA:this.staff1.value,
userB:this.staff2.value,
houseId:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
.then(res=>{
this.newTeam3=res.avg[0]
this.newAvg3=res.avg[1]
// console.log(res)
let first=res.first
let second=res.second
this.lineOptsect2.categories=[]
if(!this.timepickpickisshow){
this.lineOptsect2.series=[
{
name:first[0].accountName,
data:[]
}
]
first.map(item=>{
// console.log(item)
this.lineOptsect2.categories.push(item.statDate.slice(5,10))
this.lineOptsect2.series[0].data.push(item.sumFraction)
})
}else{
this.lineOptsect2.series=[
{
name:first[0].accountName,
data:[]
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item=>{
this.lineOptsect2.categories.push(item.statDate.slice(5,10))
this.lineOptsect2.series[0].data.push(item.sumFraction)
})
second.map(item=>{
this.lineOptsect2.series[1].data.push(item.sumFraction)
})
}
// console.log(this.lineOptsect2,'3')
})
getAward() {
this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate', {
userA: this.staff1.value,
userB: this.staff2.value,
houseId: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
.then(res => {
this.newTeam3 = res.avg[0]
this.newAvg3 = res.avg[1]
// console.log(res)
let first = res.first
let second = res.second
this.lineOptsect2.categories = []
if (!this.timepickpickisshow) {
this.lineOptsect2.series = [{
name: first[0].accountName,
data: []
}]
first.map(item => {
// console.log(item)
this.lineOptsect2.categories.push(item.statDate.slice(5, 10))
this.lineOptsect2.series[0].data.push(item.sumFraction)
})
} else {
this.lineOptsect2.series = [{
name: first[0].accountName,
data: []
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item => {
this.lineOptsect2.categories.push(item.statDate.slice(5, 10))
this.lineOptsect2.series[0].data.push(item.sumFraction)
})
second.map(item => {
this.lineOptsect2.series[1].data.push(item.sumFraction)
})
}
// console.log(this.lineOptsect2,'3')
})
},
// 获取有效录音
async getRecordList(){
async getRecordList() {
// 当选择有效录音时
let res=null
if(this.activeTotal2==0){
res= await this.$u.post('/cusLvStatistics/employeeAnalysisEffectiveRecording',{
userA:this.staff1.value,
userB:this.staff2.value,
houseId:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
}else{
res= await this.$u.post('/cusLvStatistics/employeeAnalysisRecordingTime',{
userA:this.staff1.value,
userB:this.staff2.value,
houseId:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
let res = null
if (this.activeTotal2 == 0) {
res = await this.$u.post('/cusLvStatistics/employeeAnalysisEffectiveRecording', {
userA: this.staff1.value,
userB: this.staff2.value,
houseId: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
} else {
res = await this.$u.post('/cusLvStatistics/employeeAnalysisRecordingTime', {
userA: this.staff1.value,
userB: this.staff2.value,
houseId: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
}
// console.log(res)
this.newTeam2=res.avg[0]
this.newAvg2=res.avg[1]
let first=res.first
let second=res.second
this.lineOptsect1.categories=[]
if(!this.timepickpickisshow){
this.lineOptsect1.series=[
{
name:first[0].accountName,
data:[]
}
]
first.map(item=>{
this.lineOptsect1.categories.push(item.statDate.slice(5,10))
this.newTeam2 = res.avg[0]
this.newAvg2 = res.avg[1]
let first = res.first
let second = res.second
this.lineOptsect1.categories = []
if (!this.timepickpickisshow) {
this.lineOptsect1.series = [{
name: first[0].accountName,
data: []
}]
first.map(item => {
this.lineOptsect1.categories.push(item.statDate.slice(5, 10))
this.lineOptsect1.series[0].data.push(item.sumDuration)
})
}else{
this.lineOptsect1.series=[
{
name:first[0].accountName,
data:[]
} else {
this.lineOptsect1.series = [{
name: first[0].accountName,
data: []
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item=>{
this.lineOptsect1.categories.push(item.statDate.slice(5,10))
first.map(item => {
this.lineOptsect1.categories.push(item.statDate.slice(5, 10))
this.lineOptsect1.series[0].data.push(item.sumDuration)
})
second.map(item=>{
second.map(item => {
this.lineOptsect1.series[1].data.push(item.sumDuration)
})
}
// console.log(this.lineOptsect1,'2')
},
// 获取销奖能力
getAwardList(){
this.$u.post('/cusLvStatistics/employeeAnalysisLevel1Fraction',{
userA:this.staff1.value,
userB:this.staff2.value,
houseId:this.houseId,
timeType:this.lastEndDate?null:this.activeTotal+'',
lastEndDate:this.lastEndDate,
lastStartDate:this.lastStartDate
})
.then(res=>{
// console.log(res)
let first=res.first
let second=res.second
let max = first[0].avgExecutionRate
this.chartData.categories=[]
if(!this.timepickpickisshow){
this.chartData.series=[
{
name:first[0].accountName,
data:[]
}
]
first.map(item=>{
if (max < item.avgExecutionRate) max = item.avgExecutionRate;
this.chartData.categories.push(item.name)
this.chartData.series[0].data.push(item.avgExecutionRate)
})
}else{
this.chartData.series=[
{
name:first[0].accountName,
data:[]
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item=>{
this.chartData.categories.push(item.name)
this.chartData.series[0].data.push(item.avgExecutionRate)
})
second.map(item=>{
this.chartData.series[1].data.push(item.avgExecutionRate)
})
let all = [...first, ...second]
all.map(item => {
if (max < item.avgExecutionRate) max = item.avgExecutionRate;
})
}
this.opts.extra.radar.max = max + 25
})
getAwardList() {
this.$u.post('/cusLvStatistics/employeeAnalysisLevel1Fraction', {
userA: this.staff1.value,
userB: this.staff2.value,
houseId: this.houseId,
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate
})
.then(res => {
// console.log(res)
let first = res.first
let second = res.second
let max = first[0].avgExecutionRate
this.chartData.categories = []
if (!this.timepickpickisshow) {
this.chartData.series = [{
name: first[0].accountName,
data: []
}]
first.map(item => {
if (max < item.avgExecutionRate) max = item.avgExecutionRate;
this.chartData.categories.push(item.name)
this.chartData.series[0].data.push(item.avgExecutionRate)
})
} else {
this.chartData.series = [{
name: first[0].accountName,
data: []
},
{
"name": second[0].accountName,
"data": []
}
]
first.map(item => {
this.chartData.categories.push(item.name)
this.chartData.series[0].data.push(item.avgExecutionRate)
})
second.map(item => {
this.chartData.series[1].data.push(item.avgExecutionRate)
})

let all = [...first, ...second]
all.map(item => {
if (max < item.avgExecutionRate) max = item.avgExecutionRate;
})
}
this.opts.extra.radar.max = max + 25

})
},
tabtimetap(index){
tabtimetap(index) {
if (index == 3) {
this.totalTimeShow = true;
} else {
this.activeTotal = index;
this.lastEndDate=''
this.lastStartDate=''
this.lastEndDate = ''
this.lastStartDate = ''
// 获取数据
// this.getreception()
// this.getRecordList()
@@ -548,7 +515,7 @@
this.getdata()
}
},
tabtimetap1(index){
tabtimetap1(index) {
this.activeTotal2 = index;
// 调用方法
this.getRecordList()
@@ -556,57 +523,58 @@
//自定义时间
totalTimeChange(e) {
console.log(e.startDate, e.endDate)
this.activeTotal=3;
this.lastEndDate=e.endDate
this.lastStartDate=e.startDate
this.activeTotal = 3;
this.lastEndDate = e.endDate
this.lastStartDate = e.startDate
// 获取数据
// this.getreception()
// this.getRecordList()
// this.getAwardList()
this.getdata()
},
staffSelectCallback(e){
if(this.choseStaffFlag){
staffSelectCallback(e) {
if (this.choseStaffFlag) {
// 第二个客户
// console.log(e,'第二个')
this.staff2=e[0]
}else{
this.staff2 = e[0]
} else {
// 第一个客户
// console.log(e,'第一个')
this.staff1=e[0]
this.staff1 = e[0]
}
if(this.staff1.label==this.staff2.label){
if (this.staff1.label == this.staff2.label) {
uni.showToast({
title:'请勿选择重复',
icon:'none'
title: '请勿选择重复',
icon: 'none'
})
this.staff2.label='请选择'
this.staff2.label = '请选择'
// this.staff2.label='平均'
// this.staff2.value=''
return
}else{
} else {
// 获取数据
// this.getreception()
// this.getRecordList()
// this.getAwardList()
this.getdata()
}
},
},
}
</script>
<style lang="scss" scoped>
// 对比时间切换
.timepick{
.timepick {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
background: #FAFAFA;
}
.timepicktime{

.timepicktime {
width: 260rpx;
height: 50rpx;
border: 1rpx solid #E0E0E0;
@@ -614,7 +582,8 @@
display: flex;
background: #FFFFFF;
}
.timepicktime>view:nth-of-type(1){

.timepicktime>view:nth-of-type(1) {
width: 210rpx;
height: 100%;
line-height: 50rpx;
@@ -622,21 +591,24 @@
font-weight: 400;
text-align: center;
}
.timepicktime>view:nth-of-type(2){

.timepicktime>view:nth-of-type(2) {
width: 49rpx;
height: 100%;
// border-left: 1px solid #E0E0E0;
}
.timepickpick{

.timepickpick {
width: 110rpx;
height: 50rpx;
margin-left: 30rpx;
display: flex;
align-items: center;
}
.Underimg{

.Underimg {
width: 50rpx;
height:50rpx;
height: 50rpx;
margin-top: -2rpx;
}
</style>

+ 18
- 13
pages/center/Piabodata/Theteamcompared.vue 查看文件

@@ -16,9 +16,10 @@
</view>

<view class="timepick">
<view class="timepicktime" @click="chiocStaff(0)">
<view>{{staff1.label}}</view>
<view>
<view style="display: flex;" class="timepicktime" @click="chiocStaff(0)">
<view style="flex-grow: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{staff1.label}}</view>
<view style="flex-shrink: 0;">
<image class="Underimg" src="../../../static/images/Underimg.png" mode=""></image>
</view>
</view>
@@ -425,21 +426,19 @@
}
}
},
lineOpts: {
yAxis: {
data: [
{
max: 100,
min: 0,
}
]
data: [{
max: 100,
min: 0,
}]
}
},

};
},
computed: {
showLineOptsect1() {
return this.lineOptsect1.series.length > 0
@@ -454,7 +453,7 @@
return this.chartData1.series.length > 0
},
},
onLoad() {
let that = this
uni.$on('update', function(data) {
@@ -1128,4 +1127,10 @@
height: 50rpx;
margin-top: -2rpx;
}
</style>

.heji {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

+ 28
- 4
pages/center/Piabodata/TrendAnalysis.vue 查看文件

@@ -325,9 +325,22 @@
components: {
newcalendar
},
onLoad: function(options) {
onLoad(option) {
this.pamect.houseId = uni.getStorageSync('buildingID').id;
this.init()
if (option.type == 1) {
this.timepickpickisshow = true
this.pamect.firstStartDate = option.staTime
this.pamect.firstEndDate = option.endtime
this.pamect.lastStartDate = option.staTime1
this.pamect.lastEndDate = option.endtime1
this.pamect.timeType = ''
this.sheartime1 = `${this.fomatDate(this.pamect.firstStartDate)}-${this.fomatDate(this.pamect.firstEndDate)}`
this.sheartime2 = `${this.fomatDate(this.pamect.lastStartDate)}-${this.fomatDate(this.pamect.lastEndDate)}`
this.tabxuanxiangtap(3)
this.$forceUpdate()
}
},
onPullDownRefresh() {
this.init()
@@ -360,6 +373,14 @@
},
},
methods: {
// 时间格式转换
fomatDate(date) {
if (!date) return '--'
let arr = date.split(' ')
let str = arr[0]
let result = str.split('-')
return `${result[1]}-${result[2]}`
},
//是否对比
checkboxChange() {
if (this.newactiveTotal == 3) {
@@ -486,7 +507,8 @@
},
//对比时间
totalTimeChange2(e) {
var d = new Date(e.result);
console.log(e)
var d = new Date(e.result.replace(/\-/g, '/'));
d.setDate(d.getDate() + this.intervaltime);
var year = d.getFullYear();
var month = d.getMonth() + 1;
@@ -676,6 +698,7 @@
if (max < data.firstList[i]) max = data.firstList[i];
}
this.opts = {
...this.opts,
fontSize: 10,
extra: {
radar: {
@@ -810,6 +833,7 @@
return item.avgExecutionRate
});
this.opts = {
...this.opts,
fontSize: 10,
extra: {
radar: {
@@ -1147,9 +1171,9 @@
DateDiff(sDate1, sDate2) {
var aDate, oDate1, oDate2, iDays;
aDate = sDate1.split("-");
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]); //转换为yyyy-MM-dd格式
oDate1 = new Date(aDate[1] + '/' + aDate[2] + '/' + aDate[0]); //转换为yyyy-MM-dd格式
aDate = sDate2.split("-");
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
oDate2 = new Date(aDate[1] + '/' + aDate[2] + '/' + aDate[0]);
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
return iDays + 1; //返回相差天数
},


+ 11
- 1
pages/center/Piabodata/Userinsightinto.vue 查看文件

@@ -102,8 +102,18 @@
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
onLoad() {
onLoad(e) {
this.buildingID=uni.getStorageSync('buildingID').id;
if (e.activeTotal) {
this.activeTotal = e.activeTotal
}
if (e.staTime) {
this.timeobj = {
statDateStart: e.staTime,
statDateEnd: e.endtime
}
}
this.gitinit()
},
onPullDownRefresh() {


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

@@ -96,8 +96,9 @@
<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="title2-che" style="width: 220rpx;display: flex;align-items: center;">
<text style="flex-grow: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{team.label}}</text>
<image style="flex-shrink: 0;" class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>

</view>


+ 5
- 1
pages/center/prohibited/index.vue 查看文件

@@ -180,8 +180,12 @@
if (options.staTime) {
this.staTime = options.staTime;
this.endtime = options.endtime;
this.timeText = `${options.staTime}-${options.endtime}`
}
if (options.violatedStatus) {
this.violatedStatus = options.violatedStatus
this.weijinTag = this.identList[options.violatedStatus].label
}
if (options.violatedStatus) this.violatedStatus = options.violatedStatus
},
onShow() {
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');


+ 5
- 5
pages/center/records/index.vue 查看文件

@@ -88,7 +88,7 @@
</view>
</view>

<u-popup v-model="screenShow" mode="top" height="880">
<u-popup v-model="screenShow" mode="top" height="777">
<view class="screen">
<!-- 顾问选择 -->
<view class="screen-counselor">
@@ -101,7 +101,7 @@
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view>
</view>
<view class="screen-counselor">
<!-- <view class="screen-counselor">
<view class="screen-text">
客户阶段
</view>
@@ -110,7 +110,7 @@
disabled />
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view>
</view>
</view> -->

<view class="screen-record">
<view class="screen-record-text">
@@ -585,7 +585,7 @@
dateType: dateType,
recDurationInterval: recDurationInterval,
orderBy: orderBy,
validInvalid: this.screen.validInvalid == 2 ? null : this.screen.validInvalid,
validInvalid: this.screen.validInvalid,
clientStage: this.screen.clientStage,
recording: this.screen.validInvalid == 2 ? 0 : null
}
@@ -625,7 +625,7 @@
},
actionSelectCallback(e) {
this.screen.agentId = e[0].value;
this.screenShow = false;
this.screen.counselorName = e[0].label;
this.recordList = [];
this.nextPage = 1;
this.isRefresh = false;


+ 45
- 5
pages/index/index.vue 查看文件

@@ -111,11 +111,11 @@
</view>
</view>
<view class="timebox">
<view class="real" @click="tapjumpreception('1')">
<view class="real" @click="tapjumpreception('auth')">
<view class="realnum">{{realtimeobj.avgDuration|| 0}}</view>
<view class="realtext">平均接待时长</view>
</view>
<view class="real" @click="tapjumpreception('1')">
<view class="real" @click="tapjumpreception('auth')">
<view class="realnum">{{realtimeobj.fraction || 0}}%</view>
<view class="realtext">平均执行率</view>
</view>
@@ -151,13 +151,13 @@
<view class="realnum">{{Thisweekobj.activeCustomer|| 0}}</view>
<view class="realtext">有效接待</view>
</view>
<view class="real" @click="tapjumpreception('3')">
<view class="real" @click="tapjumpreception('333')">
<view class="realnum">{{Thisweekobj.fraction || 0}}%</view>
<view class="realtext">平均执行率</view>
</view>
</view>
<view class="timebox">
<view class="real" @click="tapjumpreception('3')">
<view class="real" @click="tapjumpreception('333')">
<view class="realnum">{{Thisweekobj.avgDuration|| 0}}</view>
<view class="realtext">平均接待时长</view>
</view>
@@ -207,7 +207,6 @@
@cancel="cancel" @confirm="confirm"></u-select>
</view>
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
<view class="update" v-if="isShowUpdate">
<view class="updateBox">
<view class="top">
@@ -224,6 +223,9 @@
</view>
</view>
</view>
<u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
</view>
</template>

@@ -682,6 +684,10 @@
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'0'
});
} else if (i == 'auth') {
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'0'+'&validInvalid=0'
});
}else if(i==2){
uni.switchTab({
url: '/pages/index/customer'
@@ -701,6 +707,36 @@
});
}
}else if(i==333){
if(this.zhixingcenterindex==2){
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'2'+'&validInvalid=0'
});
}else if(this.zhixingcenterindex==6){
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'3'+'&validInvalid=0'
});
}else{
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'4'+'&staTime='+this.statDateStart+'&endtime='+this.statDateEnd+'&validInvalid=0'
});
}
}else if(i==3){
if(this.zhixingcenterindex==2){
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'2'
});
}else if(this.zhixingcenterindex==6){
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'3'
});
}else{
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'4'+'&staTime='+this.statDateStart+'&endtime='+this.statDateEnd
});
}
}else if(i==6){
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'0'+'&validInvalid=0'
@@ -719,6 +755,10 @@
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+'4'+'&staTime='+this.statDateStart+'&endtime='+this.statDateEnd+'&validInvalid=0'
});
}
}else if (i == 4) {
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal=0'+'&markAdvisor=0'+'&validInvalid=0'
});
}else{
uni.navigateTo({
url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal=0'+'&markAdvisor=0'


+ 2
- 1
pages/mine/messageList.vue 查看文件

@@ -194,7 +194,8 @@
if (this.pageNum != 1) {
this.updateAnnList = [...this.updateAnnList, ...res.data.data.list.results];
} else {
this.updateAnnList = res.data.data.list.results
this.updateAnnList = res.data.data.list.results || []
}
}



+ 90
- 11
pages/reportExcel/dayReport.vue 查看文件

@@ -25,7 +25,6 @@
<view class="r-title">
<text>接待量:</text>
</view>

<view class="r-box">
<view class="r-box-item">
<text>接待量</text><text class="value">{{ weekObj.receptionCount || 0 }}</text>
@@ -40,7 +39,6 @@
</view>
</view>
</view>

</view>
</view>

@@ -50,11 +48,11 @@
</view>
<view class="right">
<view class="r-title">
<text>销讲执行率:</text>
<text>平均执行率:</text>
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>销讲执行率<text class="value">{{ weekObj.fraction || 0 }}%</text></view>
<view>平均执行率<text class="value">{{ weekObj.fraction || 0 }}%</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.fractionPK < 0, up: weekObj.fractionPK > 0}">{{ weekObj.fractionPK > 0 ? '+' : '' }}{{ weekObj.fractionPK || 0 }}%</text>
</view>
@@ -112,7 +110,7 @@
</view>
</view>
</view>
<view class="arrs-items index5">
<view class="left">
5
@@ -213,7 +211,7 @@
</view>
<view class="right">
<view class="r-title">
<text>执行率最低的顾问:</text>
<text>平均执行率最低的顾问:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in lowest" :key="rankIndex">
@@ -280,9 +278,18 @@

<!-- 底部按钮 -->
<view class="nav-footer">
<view class="footer-item full">
<view class="footer-item" @click="toHome">
回到管理端
</view>
<view class="footer-item" @click="copy" style="margin-left: 24rpx;">
复制内容
</view>
<view class="footer-item full" style="margin-left: 24rpx;">
<button open-type="share" class="fulls">
分享给好友
一键转发
</button>
</view>
</view>
@@ -320,6 +327,12 @@
},

methods: {
// 跳转首页
toHome() {
uni.navigateTo({
url: '/pages/index/guide'
})
},
// 获取日报详情
getMessage() {
this.$u.get('/zkMessage/findByProjectId', {
@@ -339,7 +352,69 @@
},

copy() {
let str = ``
let str = `
${this.projectName}数智工牌日报
生成时间:${this.weekObj.createTime || '--'}
1、接待量:${this.weekObj.receptionCount || 0 }
2、有效接待:${this.weekObj.activeCustomer || 0}
3、有效接待率:${this.weekObj.validReceptionRate || 0}%
对比昨天:${ this.weekObj.validReceptionRatePK > 0 ? '+' : '' }${ this.weekObj.validReceptionRatePK || 0 }%
4、平均执行率:${ this.weekObj.fraction || 0 }%
对比昨天:${ this.weekObj.fractionPK > 0 ? '+' : '' }${ this.weekObj.fractionPK || 0 }%
5、平均接待时长:${ this.weekObj.avgDuration || 0 }min
对比昨天:${this.weekObj.avgDurationPK > 0 ? '+' : '' }${ this.weekObj.avgDurationPK || 0 }min`
if (this.carryOutTop.length > 0) {
str += `
6、销讲维度执行前三:`
this.carryOutTop.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.carryOutLast.length > 0) {
str += `
7、销讲维度执行弱项前三:`
this.carryOutLast.map((item, index) => { str += `
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.consultant.length > 0) {
str += `
8、置业顾问平均执行率排名:`
this.consultant.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.recording.length > 0) {
str += `
9、平均执行率最低的顾问:`
this.recording.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${item.value||'0'}min`
})
}
str += `
10、客户画像触达:${this.weekObj.reachSum || 0}次
11、未标记接待数:${ this.weekObj.unlabelledReceptionNum || 0 }条
12、设备情况:
在线${this.weekObj.equipmentInfo.onlineNum || 0}
离线:${this.weekObj.equipmentInfo.offlineNum || 0}`

uni.setClipboardData({
data: str
@@ -586,14 +661,14 @@
.nav-footer {
position: sticky;
bottom: 0;
padding: 32rpx 0;
padding: 32rpx;
width: 100%;
display: flex;
justify-content: center;
background: #fff;

.footer-item {
width: 686rpx;
flex: 1;
height: 88rpx;
display: flex;
justify-content: center;
@@ -609,10 +684,14 @@
color: #fff;

.fulls {
box-sizing: border-box;
width: 100%;
height: 100%;
background: transparent;
color: #fff;
font-size: 32rpx;
font-weight: normal;
line-height: 88rpx;
}
}
}


+ 155
- 20
pages/reportExcel/weekReport.vue 查看文件

@@ -23,7 +23,7 @@
<!-- 简报表格部分 -->
<view class="briefing-box">
<block v-for="(data, index) in numlist" :key="index">
<view class="briefing-box-item">
<view class="briefing-box-item" @click="toAuthPage(data)">
<view class="tops" :class="[data.class || '']">
{{ data.name }}
</view>
@@ -69,7 +69,7 @@
</view>

<!-- 排名百分比列表 -->
<view class="ranking-box">
<view class="ranking-box" @click="toTrendAnalysis('销讲数据')">
<block v-for="(percent, index) in weekObj.XJTop1List" :key="index">
<view class="ranking-item">
<view class="left">{{ percent.title }}</view>
@@ -125,7 +125,7 @@
</block>
</view>

<view class="tbody">
<view class="tbody" @click="toEmployeesstatistics('顾问排名')">
<block v-for="(data, index) in weekObj.customerInfo1" :key="index">
<view class="tbody-item">
<view class="tbody-items name">{{ data.name }}</view>
@@ -148,7 +148,7 @@
</template>
</view>

<!-- 顾问排名 -->
<!-- 顾问销讲执行率排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问销讲执行率排名(TOP10)
@@ -157,11 +157,11 @@
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
<view class="ranking-item">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} %</view>
@@ -177,7 +177,7 @@
</template>
</view>

<!-- 顾问排名 -->
<!-- 顾问接待量排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问接待量排名(TOP10)
@@ -187,11 +187,11 @@
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
<view class="ranking-item">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} </view>
@@ -220,9 +220,14 @@

<!-- 底部按钮 -->
<view class="nav-footer">
<view class="footer-item full">

<view class="footer-item" @click="toHome">
回到管理端
</view>

<view class="footer-item full" style="margin-left: 24rpx;">
<button open-type="share" class="fulls">
分享给好友
一键转发
</button>
</view>
</view>
@@ -282,6 +287,9 @@
percentName: 'receptionCountPK',
preNum: '', // 上周数量
preNumName: 'receptionCount2', //
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh', // 参数
auth: '接待记录', //

}, {
name: '有效接待 (次)',
@@ -291,6 +299,9 @@
percentName: 'activeCustomerPK',
preNum: '', // 上周数量
preNumName: 'activeCustomer2', //
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
auth: '接待记录', //
},
{
name: '平均执行率(%)',
@@ -300,6 +311,9 @@
percentName: 'fractionPK',
preNum: '', // 上周数量
preNumName: 'fraction2', //
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
auth: '接待记录', //
},
{
name: '平均接待时长(分)',
@@ -309,6 +323,9 @@
percentName: 'avgDurationPK',
preNum: '', // 上周数量
preNumName: 'avgDuration2', //
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
auth: '接待记录', //
},
{
name: '违禁接待 (次)',
@@ -319,6 +336,9 @@
preNum: '', // 上周数量
preNumName: 'prohibitedNum2', //
class: 'down',
path: '/pages/center/prohibited/index',
pathParms: '?activeTotal=4&violatedStatus=1&refresh=refresh', // 参数
auth: '违禁记录',
},
{
name: '客户画像触达 (次)',
@@ -328,6 +348,9 @@
percentName: 'reachSumPK',
preNum: '', // 上周数量
preNumName: 'reachSum2', //
path: '/pages/center/Piabodata/Userinsightinto',
pathParms: '?activeTotal=3', // 参数
auth: '销讲数据',
},
{
name: '已标记',
@@ -337,6 +360,9 @@
percentName: 'labelledReceptionNumPK',
preNum: '', // 上周数量
preNumName: 'labelledReceptionNum2', //
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=1', // 参数
auth: '接待记录', //
},
{
name: '未标记',
@@ -347,6 +373,9 @@
preNum: '', // 上周数量
preNumName: 'unlabelledReceptionNum2', //
class: 'down',
path: '/pages/center/records/index',
pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=0', // 参数
auth: '接待记录', //
},
],

@@ -358,6 +387,10 @@


computed: {
// 获取本地存储的权限列表
menuList() {
return uni.getStorageSync('weapp_session_Menu_data')
},

// 排名最高与最低
rankTop() {
@@ -407,7 +440,7 @@
}
}
},
// 接待统计
isShowStatistics() {
// return this.rankTop('ranktype') && this.rankTop('class') && this.rankTop('people') && this.rankTop('topName') && this.rankTop('topPk') && this.rankTop('lastName') && this.rankTop('lastPk') && this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
@@ -426,8 +459,6 @@
isShowJDLTopList() {
return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0
},


},

onLoad(option) {
@@ -444,7 +475,96 @@
},

methods: {
// 趋势分析
toTrendAnalysis(name) {
return
let date = this.weekObj.weekDate.split('~')
let [t1, t2] = [date[0], date[1]]
let time1 = new Date(t1.replace(/-/g, '/'))
let time2 = new Date(t2.replace(/-/g, '/'))
time1.setDate(time1.getDate() - 7)
time2.setDate(time2.getDate() - 7)
let res1 = `${time1.getFullYear()}-${time1.getMonth() + 1}-${time1.getDate()}`
let res2 = `${time2.getFullYear()}-${time2.getMonth() + 1}-${time2.getDate()}`
if (this.isPassWatch(name)) {
uni.navigateTo({
url: `/pages/center/Piabodata/TrendAnalysis?type=1&staTime=${date[0]}&endtime=${date[1]}&staTime1=${res1}&endtime1=${res2}`
})
} else {
uni.showToast({
title: '暂无权限',
icon: "none"
})
}
},

// 顾问排名
toEmployeesstatistics(name) {
let date = this.weekObj.weekDate.split('~')
let [t1, t2] = [date[0], date[1]]
if (this.isPassWatch(name)) {
uni.navigateTo({
url: `/pages/center/Piabodata/Employeesstatistics?type=1&staTime=${date[0]}&endtime=${date[1]}`
})
} else {
uni.showToast({
title: '暂无权限',
icon: "none"
})
}
},

// 员工分析
toStaffAnalysis(name, data) {
let obj = this.weekObj.customerInfo1.find(item => {return item.name == data.title})
console.log(obj)
let time = this.weekObj.weekDate.split('~')
if (this.isPassWatch(name)) {
uni.navigateTo({
url: `/pages/center/Piabodata/StaffAnalysis?type=1&id=${obj.id}&startDate=${time[0]}&endDate=${time[1]}`
});
} else {
uni.showToast({
title: '暂无权限',
icon: "none"
})
}
},

// 跳转对应页面
toAuthPage(data) {
if (!uni.getStorageSync('weapp_session_login_data').token) {
this.toHome()
return
}
if (this.isPassWatch(data.auth)) {
let time = this.weekObj.weekDate.split('~')
data.pathParms = `${data.pathParms}&staTime=${time[0]}&endtime=${time[1]}`
uni.navigateTo({
url: `${data.path}${data.pathParms}`
})
} else {
uni.showToast({
title: '暂无权限',
icon: "none"
})
}
},


// 是否有权限观看
isPassWatch(name) {
return this.menuList.findIndex(item => {
return item.name == name
}) == -1 ? false : true
},

// 跳转首页
toHome() {
uni.navigateTo({
url: '/pages/index/guide'
})
},
// 获取周报详情
getMessage() {
this.$u.get('/zkMessage/findByProjectId', {
@@ -480,7 +600,6 @@
}).catch(e => {
console.log(e)
})

},


@@ -506,6 +625,7 @@
this.needList.forEach(item => {
if (this.weekObj[item + 'List']) {
this.bubbleSort(this.weekObj[item + 'List'])
this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List'])
}
})

@@ -536,7 +656,18 @@
}
}
},
// 定义一个公共方法对数据进行处理
dealData(arr) {
// 获取最大值
let num = Math.max.apply(Math, arr.map((o) => {
return o.value
}))
arr.map(item => {
item.values = Math.floor(item.value / num * 100)
})
return arr

},

// 转换时间
getTimeLine(date, type = 1) {
@@ -558,7 +689,7 @@
}
return resu
},
// 转换时间
getTimeLines(date) {
if (!date) return ''
@@ -568,8 +699,8 @@

return `${str0[1]}月${str0[2]}日~${str1[1]}月${str1[2]}日`
},
},

filters: {
@@ -983,14 +1114,14 @@
.nav-footer {
position: sticky;
bottom: 0;
padding: 32rpx 0;
padding: 32rpx;
width: 100%;
display: flex;
justify-content: center;
background: #fff;

.footer-item {
width: 686rpx;
flex: 1;
height: 88rpx;
display: flex;
justify-content: center;
@@ -1006,10 +1137,14 @@
color: #fff;

.fulls {
box-sizing: border-box;
width: 100%;
height: 100%;
background: transparent;
color: #fff;
font-size: 32rpx;
font-weight: normal;
line-height: 88rpx;
}
}
}


+ 3
- 2
utils/domain.js 查看文件

@@ -1,7 +1,8 @@
// http.js使用域名
// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://192.168.31.211:8080/api';// 泽明
// const baseUrl = 'http://localhost:8080/autoSR/api'; // 本地
const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式




Loading…
取消
儲存