|
|
@@ -14,10 +14,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="nodata-box" v-if="nodata"> |
|
|
|
<image class="img" src="/static/images/nodata.png" mode="" /> |
|
|
|
<view class="text">此项目本周还没有接待量哦~</view> |
|
|
|
</view> |
|
|
|
<view v-if="!nodata" > |
|
|
|
<image class="img" src="/static/images/nodata.png" mode="" /> |
|
|
|
<view class="text">此项目本周还没有接待量哦~</view> |
|
|
|
</view> |
|
|
|
<view v-if="!nodata"> |
|
|
|
<!-- 简报 --> |
|
|
|
<view class="briefing"> |
|
|
|
<view class="briefing-title"> |
|
|
@@ -121,8 +121,13 @@ |
|
|
|
<view class="table"> |
|
|
|
<view class="thead"> |
|
|
|
<block v-for="(head, headIndex) in tableHead" :key="headIndex"> |
|
|
|
<view class="thead-item" :style="[head.style]"> |
|
|
|
{{ head.title }} |
|
|
|
<view class="thead-item" :style="[(weekObj.orgCode && head.title2) ? head.style1 : head.style]"> |
|
|
|
<template v-if="weekObj.orgCode && head.title2"> |
|
|
|
{{ head.title2 }} |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
{{ head.title }} |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
@@ -130,13 +135,31 @@ |
|
|
|
<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> |
|
|
|
<template v-if="!weekObj.orgCode"> |
|
|
|
<view class="tbody-items name">{{ data.name }}</view> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<view class="tbody-items time">{{ data.houseName }}</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<view class="tbody-items nums">{{ data.activeCustomer }}</view> |
|
|
|
<view class="tbody-items time">{{ data.avgDuration }}m</view> |
|
|
|
<view class="tbody-items percent">{{ data.fraction }}%</view> |
|
|
|
<view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}"> |
|
|
|
{{ data.pk > 0 ? `+${data.pk}` : data.pk }}% |
|
|
|
</view> |
|
|
|
<template v-if="!weekObj.orgCode"> |
|
|
|
<view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}"> |
|
|
|
<template v-if="data.pk"> |
|
|
|
{{ data.pk > 0 ? `+${data.pk}` : data.pk }}% |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<view class="tbody-items week" |
|
|
|
:class="{up: data.fractionContrast > 0, down: data.fractionContrast < 0}"> |
|
|
|
<template v-if="data.fractionContrast"> |
|
|
|
{{ data.fractionContrast > 0 ? `+${data.fractionContrast}` : data.fractionContrast }}% |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
@@ -209,6 +232,65 @@ |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 顾问接待量排名 --> |
|
|
|
<view class="guwen-ranking" v-if="weekObj.level1List"> |
|
|
|
<view class="guwen-ranking-title"> |
|
|
|
画像一级触达排名(TOP10) |
|
|
|
</view> |
|
|
|
|
|
|
|
<template v-if="weekObj.level1List"> |
|
|
|
<!-- 排名百分比列表 --> |
|
|
|
<view class="ranking-box"> |
|
|
|
<block v-for="(percent, index) in weekObj.level1List" :key="index"> |
|
|
|
<view class="ranking-item"> |
|
|
|
<view class="left">{{ percent.name }}</view> |
|
|
|
<view class="middle"> |
|
|
|
<u-line-progress :active-color="$options.filters.setColor(index)" |
|
|
|
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.percent"> |
|
|
|
</u-line-progress> |
|
|
|
</view> |
|
|
|
<view class="right"> {{ percent.total || '0' }} </view> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
<view class="empity"> |
|
|
|
暂无数据 |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="guwen-ranking" v-if="weekObj.level2List"> |
|
|
|
<view class="guwen-ranking-title"> |
|
|
|
画像关键词触达排名(TOP10) |
|
|
|
</view> |
|
|
|
|
|
|
|
<template v-if="weekObj.level2List"> |
|
|
|
<!-- 排名百分比列表 --> |
|
|
|
<view class="ranking-box"> |
|
|
|
<block v-for="(percent, index) in weekObj.level2List" :key="index"> |
|
|
|
<view class="ranking-item"> |
|
|
|
<view class="left">{{ percent.name }}</view> |
|
|
|
<view class="middle"> |
|
|
|
<u-line-progress :active-color="$options.filters.setColor(index)" |
|
|
|
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.percent"> |
|
|
|
</u-line-progress> |
|
|
|
</view> |
|
|
|
<view class="right"> {{ percent.total || '0' }} </view> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
<view class="empity"> |
|
|
|
暂无数据 |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 使用建议 --> |
|
|
|
<view class="proposal" v-if="weekObj.suggest"> |
|
|
|
<view class="proposal-title"> |
|
|
@@ -249,9 +331,13 @@ |
|
|
|
nodata: false, |
|
|
|
tableHead: [{ |
|
|
|
title: '顾问', |
|
|
|
title2: '项目名称', |
|
|
|
style: { |
|
|
|
flex: 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
style1: { |
|
|
|
flex: 2 |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '接待量', |
|
|
@@ -520,7 +606,9 @@ |
|
|
|
|
|
|
|
// 员工分析 |
|
|
|
toStaffAnalysis(name, data) { |
|
|
|
let obj = this.weekObj.customerInfo1.find(item => {return item.name == data.title}) |
|
|
|
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)) { |
|
|
@@ -576,22 +664,32 @@ |
|
|
|
}).then(res => { |
|
|
|
// console.log(res) |
|
|
|
let data = {} |
|
|
|
if(res.zkMessage.content){ |
|
|
|
if (res.zkMessage.content) { |
|
|
|
data = JSON.parse(res.zkMessage.content) |
|
|
|
this.bubbleSort(data.customerInfo1, 'pk') |
|
|
|
this.bubbleSort(data.customerInfo2, 'pk') |
|
|
|
data.customerInfo1.reverse() |
|
|
|
data.customerInfo2.reverse() |
|
|
|
this.bubbleSort(data.customerInfo1 || [], 'pk') |
|
|
|
this.bubbleSort(data.customerInfo2 || [], 'pk') |
|
|
|
data.customerInfo1 && data.customerInfo1.reverse() |
|
|
|
data.customerInfo2 && data.customerInfo2.reverse() |
|
|
|
this.weekObj = { |
|
|
|
...res.zkMessage, |
|
|
|
...data |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.nodata = true |
|
|
|
this.weekObj = { |
|
|
|
...res.zkMessage, |
|
|
|
...res.zkMessage, |
|
|
|
} |
|
|
|
} |
|
|
|
let [max1, max2] = [this.weekObj.level1List[0].total||1, this.weekObj.level2List[0].total||1] |
|
|
|
|
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total/max1)*100) |
|
|
|
}) |
|
|
|
|
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total/max2)*100) |
|
|
|
}) |
|
|
|
|
|
|
|
this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1) |
|
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
|
this.projectName = res.projectName |
|
|
@@ -617,6 +715,7 @@ |
|
|
|
init() { |
|
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
|
this.needList.forEach(item => { |
|
|
|
console.log(item) |
|
|
|
if (this.weekObj[item] && Object.keys(this.weekObj[item]).length > 0) { |
|
|
|
this.weekObj[item + 'List'] = [] // 销讲执行 |
|
|
|
for (let i in this.weekObj[item]) { |
|
|
@@ -625,6 +724,8 @@ |
|
|
|
value: this.weekObj[item][i] |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.weekObj[item + 'List'] = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
this.sortInitArr() |
|
|
@@ -634,6 +735,7 @@ |
|
|
|
sortInitArr() { |
|
|
|
this.needList.forEach(item => { |
|
|
|
if (this.weekObj[item + 'List']) { |
|
|
|
console.log(item) |
|
|
|
this.bubbleSort(this.weekObj[item + 'List']) |
|
|
|
this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List']) |
|
|
|
} |
|
|
@@ -654,6 +756,7 @@ |
|
|
|
|
|
|
|
// 冒泡排序 |
|
|
|
bubbleSort(arr, keys = 'value') { |
|
|
|
console.log(arr, 'keys', keys) |
|
|
|
for (let i = 0; i < arr.length - 1; i += 1) { |
|
|
|
//通过 arr.length 次把第一位放到最后,完成排序 |
|
|
|
//-i是因为最后的位置是会动态改变的,当完成一次后,最后一位会变成倒数第二位 |
|
|
@@ -821,7 +924,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.nodata-box{ |
|
|
|
.nodata-box { |
|
|
|
width: 750rpx; |
|
|
|
flex: 1; |
|
|
|
margin: 0 auto; |
|
|
@@ -830,11 +933,13 @@ |
|
|
|
align-items: center; |
|
|
|
flex-direction: column; |
|
|
|
background-color: #fff; |
|
|
|
.img{ |
|
|
|
|
|
|
|
.img { |
|
|
|
width: 400rpx; |
|
|
|
height: 400rpx; |
|
|
|
} |
|
|
|
.text{ |
|
|
|
|
|
|
|
.text { |
|
|
|
text-align: center; |
|
|
|
font-size: 28rpx; |
|
|
|
font-family: PingFangSC-Regular, PingFang SC; |
|
|
|