|
@@ -14,10 +14,10 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="nodata-box" v-if="nodata"> |
|
|
<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"> |
|
|
<view class="briefing-title"> |
|
|
<view class="briefing-title"> |
|
@@ -121,8 +121,13 @@ |
|
|
<view class="table"> |
|
|
<view class="table"> |
|
|
<view class="thead"> |
|
|
<view class="thead"> |
|
|
<block v-for="(head, headIndex) in tableHead" :key="headIndex"> |
|
|
<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> |
|
|
</view> |
|
|
</block> |
|
|
</block> |
|
|
</view> |
|
|
</view> |
|
@@ -130,13 +135,31 @@ |
|
|
<view class="tbody" @click="toEmployeesstatistics('顾问排名')"> |
|
|
<view class="tbody" @click="toEmployeesstatistics('顾问排名')"> |
|
|
<block v-for="(data, index) in weekObj.customerInfo1" :key="index"> |
|
|
<block v-for="(data, index) in weekObj.customerInfo1" :key="index"> |
|
|
<view class="tbody-item"> |
|
|
<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 nums">{{ data.activeCustomer }}</view> |
|
|
<view class="tbody-items time">{{ data.avgDuration }}m</view> |
|
|
<view class="tbody-items time">{{ data.avgDuration }}m</view> |
|
|
<view class="tbody-items percent">{{ data.fraction }}%</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> |
|
|
</view> |
|
|
</block> |
|
|
</block> |
|
|
</view> |
|
|
</view> |
|
@@ -209,6 +232,65 @@ |
|
|
</template> |
|
|
</template> |
|
|
</view> |
|
|
</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" v-if="weekObj.suggest"> |
|
|
<view class="proposal-title"> |
|
|
<view class="proposal-title"> |
|
@@ -249,9 +331,13 @@ |
|
|
nodata: false, |
|
|
nodata: false, |
|
|
tableHead: [{ |
|
|
tableHead: [{ |
|
|
title: '顾问', |
|
|
title: '顾问', |
|
|
|
|
|
title2: '项目名称', |
|
|
style: { |
|
|
style: { |
|
|
flex: 1 |
|
|
flex: 1 |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
style1: { |
|
|
|
|
|
flex: 2 |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '接待量', |
|
|
title: '接待量', |
|
@@ -520,7 +606,9 @@ |
|
|
|
|
|
|
|
|
// 员工分析 |
|
|
// 员工分析 |
|
|
toStaffAnalysis(name, data) { |
|
|
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) |
|
|
console.log(obj) |
|
|
let time = this.weekObj.weekDate.split('~') |
|
|
let time = this.weekObj.weekDate.split('~') |
|
|
if (this.isPassWatch(name)) { |
|
|
if (this.isPassWatch(name)) { |
|
@@ -576,22 +664,32 @@ |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
// console.log(res) |
|
|
// console.log(res) |
|
|
let data = {} |
|
|
let data = {} |
|
|
if(res.zkMessage.content){ |
|
|
|
|
|
|
|
|
if (res.zkMessage.content) { |
|
|
data = JSON.parse(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 = { |
|
|
this.weekObj = { |
|
|
...res.zkMessage, |
|
|
...res.zkMessage, |
|
|
...data |
|
|
...data |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.nodata = true |
|
|
this.nodata = true |
|
|
this.weekObj = { |
|
|
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) |
|
|
this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1) |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
this.projectName = res.projectName |
|
|
this.projectName = res.projectName |
|
@@ -617,6 +715,7 @@ |
|
|
init() { |
|
|
init() { |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
this.needList.forEach(item => { |
|
|
this.needList.forEach(item => { |
|
|
|
|
|
console.log(item) |
|
|
if (this.weekObj[item] && Object.keys(this.weekObj[item]).length > 0) { |
|
|
if (this.weekObj[item] && Object.keys(this.weekObj[item]).length > 0) { |
|
|
this.weekObj[item + 'List'] = [] // 销讲执行 |
|
|
this.weekObj[item + 'List'] = [] // 销讲执行 |
|
|
for (let i in this.weekObj[item]) { |
|
|
for (let i in this.weekObj[item]) { |
|
@@ -625,6 +724,8 @@ |
|
|
value: this.weekObj[item][i] |
|
|
value: this.weekObj[item][i] |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.weekObj[item + 'List'] = [] |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.sortInitArr() |
|
|
this.sortInitArr() |
|
@@ -634,6 +735,7 @@ |
|
|
sortInitArr() { |
|
|
sortInitArr() { |
|
|
this.needList.forEach(item => { |
|
|
this.needList.forEach(item => { |
|
|
if (this.weekObj[item + 'List']) { |
|
|
if (this.weekObj[item + 'List']) { |
|
|
|
|
|
console.log(item) |
|
|
this.bubbleSort(this.weekObj[item + 'List']) |
|
|
this.bubbleSort(this.weekObj[item + 'List']) |
|
|
this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List']) |
|
|
this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List']) |
|
|
} |
|
|
} |
|
@@ -654,6 +756,7 @@ |
|
|
|
|
|
|
|
|
// 冒泡排序 |
|
|
// 冒泡排序 |
|
|
bubbleSort(arr, keys = 'value') { |
|
|
bubbleSort(arr, keys = 'value') { |
|
|
|
|
|
console.log(arr, 'keys', keys) |
|
|
for (let i = 0; i < arr.length - 1; i += 1) { |
|
|
for (let i = 0; i < arr.length - 1; i += 1) { |
|
|
//通过 arr.length 次把第一位放到最后,完成排序 |
|
|
//通过 arr.length 次把第一位放到最后,完成排序 |
|
|
//-i是因为最后的位置是会动态改变的,当完成一次后,最后一位会变成倒数第二位 |
|
|
//-i是因为最后的位置是会动态改变的,当完成一次后,最后一位会变成倒数第二位 |
|
@@ -821,7 +924,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.nodata-box{ |
|
|
|
|
|
|
|
|
.nodata-box { |
|
|
width: 750rpx; |
|
|
width: 750rpx; |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
margin: 0 auto; |
|
|
margin: 0 auto; |
|
@@ -830,11 +933,13 @@ |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
.img{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.img { |
|
|
width: 400rpx; |
|
|
width: 400rpx; |
|
|
height: 400rpx; |
|
|
height: 400rpx; |
|
|
} |
|
|
} |
|
|
.text{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
font-family: PingFangSC-Regular, PingFang SC; |
|
|
font-family: PingFangSC-Regular, PingFang SC; |
|
|