|
@@ -2,7 +2,7 @@ |
|
|
<view class="pages"> |
|
|
<view class="pages"> |
|
|
<!-- 导航栏 --> |
|
|
<!-- 导航栏 --> |
|
|
<view class="nav-header"> |
|
|
<view class="nav-header"> |
|
|
<u-navbar title="数智工牌周报" :titles="$options.filters.getTimeLine(weekObj.createTime, 1)"></u-navbar> |
|
|
|
|
|
|
|
|
<u-navbar title="数智工牌周报" :titles="weekObj.createTimeName"></u-navbar> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 日报内容部分 --> |
|
|
<!-- 日报内容部分 --> |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
@@ -10,8 +10,8 @@ |
|
|
<view class="c-head-card"> |
|
|
<view class="c-head-card"> |
|
|
<view class="c-title-text"> |
|
|
<view class="c-title-text"> |
|
|
{{ projectName || '' }}数智工牌周报 |
|
|
{{ projectName || '' }}数智工牌周报 |
|
|
<text class="date">{{ weekObj.createTime | getTimeLine }}</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<text class="date">{{ getTimeLine(weekObj.createTime) }}</text> |
|
|
<view class="creative-time"> |
|
|
<view class="creative-time"> |
|
|
生成时间:{{ weekObj.createTime || '--' }} |
|
|
生成时间:{{ weekObj.createTime || '--' }} |
|
|
</view> |
|
|
</view> |
|
@@ -53,7 +53,7 @@ |
|
|
<view class="execution-ranking-title"> |
|
|
<view class="execution-ranking-title"> |
|
|
销讲场景执行排名 |
|
|
销讲场景执行排名 |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="weekObj.fractionPK && weekObj.fractionPK != 0"> |
|
|
|
|
|
|
|
|
<template v-if="isShowXJTop1List"> |
|
|
<view class="execution-ranking-desc"> |
|
|
<view class="execution-ranking-desc"> |
|
|
<text>销讲场景平均执行对比上周</text> |
|
|
<text>销讲场景平均执行对比上周</text> |
|
|
<text>{{ rankTop('fractionPKName') }}</text> |
|
|
<text>{{ rankTop('fractionPKName') }}</text> |
|
@@ -91,7 +91,7 @@ |
|
|
<view class="statistics-title"> |
|
|
<view class="statistics-title"> |
|
|
接待统计 |
|
|
接待统计 |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="weekObj.customerInfo1 && weekObj.customerInfo2"> |
|
|
|
|
|
|
|
|
<template v-if="rankTop('ranktype')&&rankTop('people')&&weekObj.customerInfo1"> |
|
|
<view class="statistics-desc"> |
|
|
<view class="statistics-desc"> |
|
|
<text> |
|
|
<text> |
|
|
顾问平均执行率对比上周 |
|
|
顾问平均执行率对比上周 |
|
@@ -149,8 +149,8 @@ |
|
|
<view class="guwen-ranking-title"> |
|
|
<view class="guwen-ranking-title"> |
|
|
顾问销讲执行率排名(TOP10) |
|
|
顾问销讲执行率排名(TOP10) |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="weekObj.ZXLTopList && weekObj.ZXLTopList.length > 0"> |
|
|
|
|
|
<!-- 排名百分比列表 --> |
|
|
|
|
|
|
|
|
<template v-if="isShowZXLTopList"> |
|
|
|
|
|
<!-- 排名百分比列表 --> |
|
|
<view class="ranking-box"> |
|
|
<view class="ranking-box"> |
|
|
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index"> |
|
|
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index"> |
|
|
<view class="ranking-item"> |
|
|
<view class="ranking-item"> |
|
@@ -179,7 +179,7 @@ |
|
|
顾问接待量排名(TOP10) |
|
|
顾问接待量排名(TOP10) |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<template v-if="weekObj.JDLTopList && weekObj.JDLTopList.length > 0"> |
|
|
|
|
|
|
|
|
<template v-if="isShowJDLTopList"> |
|
|
<!-- 排名百分比列表 --> |
|
|
<!-- 排名百分比列表 --> |
|
|
<view class="ranking-box"> |
|
|
<view class="ranking-box"> |
|
|
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index"> |
|
|
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index"> |
|
@@ -204,7 +204,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 使用建议 --> |
|
|
<!-- 使用建议 --> |
|
|
<view class="proposal"> |
|
|
|
|
|
|
|
|
<view class="proposal" v-if="false"> |
|
|
<view class="proposal-title"> |
|
|
<view class="proposal-title"> |
|
|
使用建议 |
|
|
使用建议 |
|
|
</view> |
|
|
</view> |
|
@@ -237,9 +237,11 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 底部按钮 --> |
|
|
<!-- 底部按钮 --> |
|
|
<view class="footer"> |
|
|
|
|
|
<view class="footer-item"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="nav-footer"> |
|
|
|
|
|
<view class="footer-item full" style="margin-left: 22rpx;"> |
|
|
|
|
|
<button open-type="share" class="fulls"> |
|
|
|
|
|
分享给好友 |
|
|
|
|
|
</button> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@@ -301,7 +303,7 @@ |
|
|
percent: '', |
|
|
percent: '', |
|
|
percentName: 'activeCustomerPK', |
|
|
percentName: 'activeCustomerPK', |
|
|
preNum: '', // 上周数量 |
|
|
preNum: '', // 上周数量 |
|
|
preNumName: 'receptionCount2', // |
|
|
|
|
|
|
|
|
preNumName: 'activeCustomer2', // |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '平均执行率(%)', |
|
|
name: '平均执行率(%)', |
|
@@ -310,7 +312,7 @@ |
|
|
percent: '', |
|
|
percent: '', |
|
|
percentName: 'fractionPK', |
|
|
percentName: 'fractionPK', |
|
|
preNum: '', // 上周数量 |
|
|
preNum: '', // 上周数量 |
|
|
preNumName: 'receptionCount2', // |
|
|
|
|
|
|
|
|
preNumName: 'fraction2', // |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '平均接待时长(分)', |
|
|
name: '平均接待时长(分)', |
|
@@ -319,7 +321,7 @@ |
|
|
percent: '', |
|
|
percent: '', |
|
|
percentName: 'avgDurationPK', |
|
|
percentName: 'avgDurationPK', |
|
|
preNum: '', // 上周数量 |
|
|
preNum: '', // 上周数量 |
|
|
preNumName: 'receptionCount2', // |
|
|
|
|
|
|
|
|
preNumName: 'avgDuration2', // |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '违禁接待 (次)', |
|
|
name: '违禁接待 (次)', |
|
@@ -371,31 +373,66 @@ |
|
|
// 排名最高与最低 |
|
|
// 排名最高与最低 |
|
|
rankTop() { |
|
|
rankTop() { |
|
|
return name => { |
|
|
return name => { |
|
|
let obj = { |
|
|
|
|
|
ranktype: (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? '上升' : '下降', |
|
|
|
|
|
people: Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length), |
|
|
|
|
|
topName: this.weekObj.customerInfo1[0].name, |
|
|
|
|
|
topPk: Math.abs(this.weekObj.customerInfo1[0].pk), |
|
|
|
|
|
lastName: this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].name, |
|
|
|
|
|
lastPk: Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].pk), // |
|
|
|
|
|
class: (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? 'up' : 'down', |
|
|
|
|
|
fractionPKName: this.weekObj.fractionPK > 0 ? '上涨' : '下跌', |
|
|
|
|
|
fractionPK: Math.abs(this.weekObj.fractionPK), |
|
|
|
|
|
fractionBastName: this.weekObj.XJTop1List[0].title, |
|
|
|
|
|
fractionBastValue: this.weekObj.XJTop1List[0].value, |
|
|
|
|
|
fractionLastName: this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].title, |
|
|
|
|
|
fractionLastValue: this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].value, |
|
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) { |
|
|
|
|
|
obj.ranktype = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? '上升' : '下降' |
|
|
|
|
|
obj.people = Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0) { |
|
|
|
|
|
obj.topName = this.weekObj.customerInfo1[0].name |
|
|
|
|
|
obj.topPk = Math.abs(this.weekObj.customerInfo1[0].pk) |
|
|
|
|
|
obj.lastName = this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].name, |
|
|
|
|
|
obj.lastPk = Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].pk) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) { |
|
|
|
|
|
obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? 'up' : 'down' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.fractionPK) { |
|
|
|
|
|
obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌' |
|
|
|
|
|
obj.fractionPK = Math.abs(this.weekObj.fractionPK) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) { |
|
|
|
|
|
obj.fractionBastName = this.weekObj.XJTop1List[0].title |
|
|
|
|
|
obj.fractionBastValue = this.weekObj.XJTop1List[0].value |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) { |
|
|
|
|
|
obj.fractionLastName = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].title |
|
|
|
|
|
obj.fractionLastValue = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].value |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return obj[name] || '' |
|
|
|
|
|
} catch(e) { |
|
|
|
|
|
console.log(e) |
|
|
|
|
|
return '' |
|
|
} |
|
|
} |
|
|
return obj[name] |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isShowXJTop1List () { |
|
|
|
|
|
return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isShowZXLTopList() { |
|
|
|
|
|
return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0 |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isShowJDLTopList() { |
|
|
|
|
|
return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0 |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
if (option.id) this.id = option.id |
|
|
if (option.id) this.id = option.id |
|
|
this.getMessage() |
|
|
this.getMessage() |
|
|
console.log(this.weekObj, '12312312312') |
|
|
|
|
|
console.log(JSON.stringify(this.weekObj), '12312312312') |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -420,10 +457,12 @@ |
|
|
this.bubbleSort(data.customerInfo2, 'pk') |
|
|
this.bubbleSort(data.customerInfo2, 'pk') |
|
|
data.customerInfo1.reverse() |
|
|
data.customerInfo1.reverse() |
|
|
data.customerInfo2.reverse() |
|
|
data.customerInfo2.reverse() |
|
|
|
|
|
|
|
|
this.weekObj = { |
|
|
this.weekObj = { |
|
|
...res.zkMessage, |
|
|
...res.zkMessage, |
|
|
...data |
|
|
...data |
|
|
} |
|
|
} |
|
|
|
|
|
this.weekObj.createTimeName = this.getTimeLine(this.weekObj.createTime, 1) |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
this.projectName = res.projectName |
|
|
this.projectName = res.projectName |
|
|
this.numlist.forEach(item => { |
|
|
this.numlist.forEach(item => { |
|
@@ -480,6 +519,7 @@ |
|
|
this.weekObj[item + 'List'].reverse() |
|
|
this.weekObj[item + 'List'].reverse() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(this.weekObj, '12312312312') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 冒泡排序 |
|
|
// 冒泡排序 |
|
@@ -496,6 +536,28 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 转换时间 |
|
|
|
|
|
getTimeLine(date, type = 1) { |
|
|
|
|
|
let resu = '--' |
|
|
|
|
|
if (!date) return resu |
|
|
|
|
|
let time = new Date(date) |
|
|
|
|
|
time.setDate(time.getDate() - 7) |
|
|
|
|
|
let arr = date.split(' ') |
|
|
|
|
|
let str = arr[0] |
|
|
|
|
|
let result = str.split('-') |
|
|
|
|
|
|
|
|
|
|
|
let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1) |
|
|
|
|
|
let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate() |
|
|
|
|
|
|
|
|
|
|
|
if (type == 1) { |
|
|
|
|
|
resu = `${m}.${d}-${result[1]}.${result[2]}` |
|
|
|
|
|
} else { |
|
|
|
|
|
resu = `${m}月${d}日~${result[1]}月${result[2]}日` |
|
|
|
|
|
} |
|
|
|
|
|
return resu |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
filters: { |
|
|
filters: { |
|
@@ -579,18 +641,19 @@ |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
.c-title-text { |
|
|
.c-title-text { |
|
|
position: relative; |
|
|
|
|
|
|
|
|
// position: relative; |
|
|
flex-grow: 1; |
|
|
flex-grow: 1; |
|
|
font-size: 48rpx; |
|
|
font-size: 48rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
color: #303030; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.date { |
|
|
|
|
|
// position: absolute; |
|
|
|
|
|
// right: 0; |
|
|
|
|
|
// bottom: 6rpx; |
|
|
|
|
|
font-size: 30rpx; |
|
|
color: #303030; |
|
|
color: #303030; |
|
|
|
|
|
|
|
|
.date { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
right: 0; |
|
|
|
|
|
bottom: 6rpx; |
|
|
|
|
|
font-size: 30rpx; |
|
|
|
|
|
color: #303030; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.creative-time { |
|
|
.creative-time { |
|
@@ -612,7 +675,7 @@ |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
border: 1rpx solid #E0E0E0; |
|
|
border: 1rpx solid #E0E0E0; |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
font-weight: 600; |
|
|
|
|
|
|
|
|
font-weight: bold; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.briefing-box { |
|
|
.briefing-box { |
|
@@ -674,7 +737,7 @@ |
|
|
|
|
|
|
|
|
.execution-ranking-title { |
|
|
.execution-ranking-title { |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
font-weight: 500; |
|
|
|
|
|
|
|
|
font-weight: bold; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.execution-ranking-desc { |
|
|
.execution-ranking-desc { |
|
@@ -723,6 +786,8 @@ |
|
|
.statistics-title { |
|
|
.statistics-title { |
|
|
padding: 30rpx 30rpx 0; |
|
|
padding: 30rpx 30rpx 0; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.statistics-desc { |
|
|
.statistics-desc { |
|
@@ -895,6 +960,41 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nav-footer { |
|
|
|
|
|
margin: 32rpx 0; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
|
|
|
.footer-item { |
|
|
|
|
|
width: 686rpx; |
|
|
|
|
|
height: 88rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
color: #2671E2; |
|
|
|
|
|
border: 2rpx solid #2671E2; |
|
|
|
|
|
border-radius: 8rpx; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
|
|
|
|
|
|
&.full { |
|
|
|
|
|
background: #2671E2; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
|
|
|
|
|
|
.fulls { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
background: transparent; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.up { |
|
|
.up { |
|
|
color: #E6273A; |
|
|
color: #E6273A; |
|
@@ -910,8 +1010,8 @@ |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
font-size: 32rpx; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: #666666; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |