Browse Source

修改bug优化销讲数据
master
wangshuai 3 years ago
parent
commit
b01e2759df
6 changed files with 672 additions and 641 deletions
  1. +1
    -1
      pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
  2. +569
    -558
      pages/center/Piabodata/Theteamcompared.vue
  3. +79
    -77
      pages/center/Piabodata/index.vue
  4. +1
    -1
      pages/center/consumer/consumerDetail.vue
  5. +7
    -1
      pages/index/customer.vue
  6. +15
    -3
      pages/index/index.vue

+ 1
- 1
pages/center/Piabodata/Customerportrait/Receivedetailabout.vue View File

@@ -1475,7 +1475,7 @@
clickaudeopal(item){
if(item.selected==0){
uni.navigateTo({
url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId + '&type=0'
})
}
},


+ 569
- 558
pages/center/Piabodata/Theteamcompared.vue
File diff suppressed because it is too large
View File


+ 79
- 77
pages/center/Piabodata/index.vue View File

@@ -77,9 +77,15 @@
<view class="heji">均值:25</view>
</view> -->
<view class="danwei">{{danwei}} </view>
<view class="uchaserbox" >
<qiun-data-charts type="line" :chartData="lineOptsect" :opts="optionsobj" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
<view class="uchaserbox">
<template v-if="danwei == '单位(%)'">
<qiun-data-charts type="line" :chartData="lineOptsect" :opts="lineOpts" background="none"
:ontouch="true" canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
</template>
<template v-else>
<qiun-data-charts type="line" :chartData="lineOptsect" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
</template>
</view>
</view>

@@ -93,13 +99,13 @@
<view class="title2-che" style="width: 220rpx;">{{team.label}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view>
<view class="danwei">单位(%)</view>
<view class="uchaserbox">
<qiun-data-charts type="line" :chartData="lineOptsect1" background="none" :ontouch="true"
canvasId="wangxiaohuaerlineryiliwuyibao" :canvas2d="true" />
canvasId="wangxiaohuaerlineryiliwuyibao" :canvas2d="true" :opts="lineOpts" />
</view>
</view>
</view>
@@ -124,8 +130,8 @@
</view> -->
<view class="danwei">单位(%)</view>
<view class="uchaserbox">
<qiun-data-charts type="line" :chartData="lineOptsect2" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibao" :canvas2d="true" />
<qiun-data-charts type="line" :chartData="lineOptsect2" background="none" :ontouch="true"
canvasId="wangxiaohuaerlingeryilingwuyibao" :canvas2d="true" :opts="lineOpts" />
</view>
</view>
</view>
@@ -147,7 +153,8 @@
<view class="heji">合计:50</view>
<view class="heji">均值:25</view>
</view> -->
<view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;" v-if="newlisttabinfo.length==0">暂无数据</view>
<view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;"
v-if="newlisttabinfo.length==0">暂无数据</view>
<view v-else class="jindu" style="margin-top: 20rpx;">
<scroll-view style="height: 300rpx;" scroll-y="true">
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index">
@@ -175,7 +182,8 @@
:is-scroll="true">
</u-tabs-swiper>
</view>
<view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;" v-if="newlisttabinfo1.length==0">暂无数据</view>
<view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;"
v-if="newlisttabinfo1.length==0">暂无数据</view>
<view class="jindu" v-else>
<scroll-view style="height: 300rpx;" scroll-y="true">
<view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index">
@@ -242,23 +250,29 @@
danwei: '单位(次)',
totalTimeShow: false,
activeTab: 0,
numlist: [{
name: '接待客户',
num: ''
},

numlist: [
{
name: '接待量',
num: ''
num: '',
setName: 'sumCustomer'
},{
name: '有效接待',
num: '',
setName: 'receptionCount'
},
{
name: '平均执行率',
num: ''
num: '',
setName: 'fraction'
},
{
name: '录音时长',
num: ''
name: '平均接待时长',
num: '',
setName: 'sumDuration'
},
],

lineOptsect: {
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
"series": [{
@@ -278,21 +292,31 @@
}]
},
newlistoj: [],
newlistoj1: [{

newlistoj1: [
{
name: "接待量",
id: 1
id: 3,
title: '单位(个)',
setName: 'sumCustomer'
},
{
name: "平均执行率",
id: 2
name: "有效接待",
id: 1,
title: '单位(次)',
setName: 'receptionCount'
},
{
name: "接待客户",
id: 3
name: "平均执行率",
id: 2,
title: '单位(%)',
setName: 'fraction'
},
{
name: "录音时长",
id: 5
name: "平均接待时长",
id: 5,
title: '单位(min)',
setName: 'sumDuration'
},
],
bocindex: 0,
@@ -314,11 +338,19 @@
Groupcontrastisshow: false,
allechar: [],
allList: [],
optionsobj:{}

lineOpts: {
yAxis: {
data: [{
max: 100,
min: 0,
}]
}
},
};
},
onShow() {
// 获取客户id
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// 获取数据看板

@@ -336,22 +368,21 @@
// 获取维度
this.getindexZxl()
},
onPullDownRefresh(){
onPullDownRefresh() {
// 获取员工
this.getStaffList()
// 获取团队
this.getSectionList()
// 获取团队是否显示权限
this.queryHaveDept()

// 获取简报
this.getReport()
// 获取接待趋势
this.getRtrent()
// 获取维度
this.getindexZxl()
setTimeout(function () {
uni.stopPullDownRefresh();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
@@ -449,16 +480,11 @@
lastStartDate: this.lastStartDate
})
.then(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 = Math.floor(res.sumDuration / 60) || 0
// util.formatSecond()||0

res.sumDuration = Math.floor(res.sumDuration / 60) || 0
res.fraction = (res.fraction || 0) + '%'
this.numlist.map(item => {
item.num = res[item.setName]
})
})
},
// 获取团队列表
@@ -590,7 +616,7 @@
},
//指标执行率分析tab
tapspagek2(index) {
// console.log(index)
console.log(index)
// 对数据进行分析和处理
// 先处理日期
let allobj = {
@@ -600,41 +626,17 @@
data: []
}]
}
if (index == 0) {
// 接待量
this.danwei = '单位(次)'
allobj.series[0].name = '接待量'
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item.receptionCount)
})
} else if (index == 1) {
// 平均执行率
this.danwei = '单位(%)'
allobj.series[0].name = '平均执行率'
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item.fraction)
})
} else if (index == 2) {
// 接待客户
this.danwei = '单位(个)'
allobj.series[0].name = '接待客户'
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item.sumCustomer)
})
} else {
// 录音时长
this.danwei = '单位(min)'
allobj.series[0].name = '录音时长'
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item.sumDuration)
})
}

this.danwei = this.newlistoj1[index].title
allobj.series[0].name = this.newlistoj1[index].name
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item[this.newlistoj1[index].setName])
})

this.bocindex = index;
this.lineOptsect = allobj
this.$forceUpdate()
},
tapspagek3(index) {
let arr = []
@@ -747,4 +749,4 @@
.grid:nth-child(3) {
border-right: none;
}
</style>
</style>

+ 1
- 1
pages/center/consumer/consumerDetail.vue View File

@@ -393,7 +393,7 @@
clickaudeopal(item){
if(item.selected==0){
uni.navigateTo({
url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId + '&type=0'
})
}
},


+ 7
- 1
pages/index/customer.vue View File

@@ -39,7 +39,9 @@
<view class="footer-button" v-if="item.status!=0">
<view class="footer1" @click.stop="addTime(item)">接待延时</view>
<view class="footer1" @click.stop="assign(item)">重新指派</view>
<view class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
<template v-if="endReception">
<view class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
</template>
</view>
<view class="centerbox" v-if="item.status==0">
@@ -64,6 +66,7 @@
isAdd:'',
dataCode:'',
addAccount:'',
endReception: true,
};
},
components: {},
@@ -74,6 +77,9 @@
addAccount,
dataCode
} = uni.getStorageSync("weapp_session_userInfo_data");
let menulist = uni.getStorageSync('weapp_session_Menu_data')
this.endReception = menulist.findIndex(item => { return item.name == '结束接待' }) != -1
this.addAccount=addAccount;
this.dataCode=dataCode;
this.init()


+ 15
- 3
pages/index/index.vue View File

@@ -187,7 +187,7 @@
<view class="title">常用功能</view>
<view class="commonly-box">
<view class="commonly" @click="Piabodata(item.name)" v-for="(item,index) in Menulist" :key='index'>
<view class="commonly" @click="Piabodata(item.name)" v-for="(item,index) in Menulist" :key='index' v-if="showMenu(item.name)">
<view class="commonly-img">
<image v-if="item.name=='客户管理'" class="commonly-img1" src="../../static/images/function1.png"
mode=""></image>
@@ -204,8 +204,7 @@
<image v-if="item.name=='违禁记录'" class="commonly-img1" src="../../static/images/prohibited.png"
mode=""></image>
</view>
<view v-if="item.name=='标记有效无效接待'" class="commonly-text"></view>
<view v-else class="commonly-text">{{item.name}}</view>
<view class="commonly-text">{{item.name}}</view>
</view>
</view>

@@ -269,6 +268,19 @@
statDateEnd:'',
};
},
computed: {
showMenu() {
return name => {
if (name == '标记有效无效接待' || name == '结束接待' || name == '客户编辑') {
return false
} else {
return true
}
}
}
},
components: {},
onShow() {
this.getMenu()


Loading…
Cancel
Save