douzhuo 1 vuosi sitten
vanhempi
commit
e46eb03119
2 muutettua tiedostoa jossa 381 lisäystä ja 226 poistoa
  1. +381
    -226
      pages/reportExcel/dayReport.vue
  2. BIN
      static/images/nodata.png

+ 381
- 226
pages/reportExcel/dayReport.vue Näytä tiedosto

@@ -13,287 +13,296 @@
</view>
</view>

<!-- 循环渲染的数据 -->
<view class="dateList">
<!-- -->
<view class="arrs">
<view class="arrs-items index1">
<view class="left">
1
</view>
<view class="right">
<view class="r-title">
<text>接待量:</text>
<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">
<!-- 循环渲染的数据 -->
<view class="dateList">
<!-- -->
<view class="arrs">
<view class="arrs-items index1">
<view class="left">
1
</view>
<view class="r-box">
<view class="r-box-item">
<text>接待量</text><text class="value">{{ weekObj.receptionCount || 0 }}</text>
</view>
<view class="r-box-item">
<text>有效接待</text><text class="value">{{ weekObj.activeCustomer || 0 }}</text>
<view class="right">
<view class="r-title">
<text>接待量:</text>
</view>
<view class="r-box-item-lang">
<view>有效接待率<text class="value">{{ weekObj.validReceptionRate || 0 }}%</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.validReceptionRatePK < 0, up: weekObj.validReceptionRatePK > 0}">{{ weekObj.validReceptionRatePK > 0 ? '+' : '' }}{{ weekObj.validReceptionRatePK || 0 }}%</text>
<view class="r-box">
<view class="r-box-item">
<text>接待量</text><text class="value">{{ weekObj.receptionCount || 0 }}</text>
</view>
<view class="r-box-item">
<text>有效接待</text><text class="value">{{ weekObj.activeCustomer || 0 }}</text>
</view>
<view class="r-box-item-lang">
<view>有效接待率<text class="value">{{ weekObj.validReceptionRate || 0 }}%</text>
</view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.validReceptionRatePK < 0, up: weekObj.validReceptionRatePK > 0}">{{ weekObj.validReceptionRatePK > 0 ? '+' : '' }}{{ weekObj.validReceptionRatePK || 0 }}%</text>
</view>
</view>
</view>
</view>
</view>
</view>

<view class="arrs-items index2">
<view class="left">
2
</view>
<view class="right">
<view class="r-title">
<text>平均执行率:</text>
<view class="arrs-items index2">
<view class="left">
2
</view>
<view class="r-box">
<view class="r-box-item-lang">
<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 class="right">
<view class="r-title">
<text>平均执行率:</text>
</view>
<view class="r-box">
<view class="r-box-item-lang">
<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>
</view>
</view>
</view>
</view>
</view>

<view class="arrs-items index3">
<view class="left">
3
</view>
<view class="right">
<view class="r-title">
<text>平均接待时长:</text>
<view class="arrs-items index3">
<view class="left">
3
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>平均接待时长<text class="value">{{ weekObj.avgDuration || 0 }}min</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.avgDurationPK < 0, up: weekObj.avgDurationPK > 0}">{{ weekObj.avgDurationPK > 0 ? '+' : '' }}{{ weekObj.avgDurationPK || 0 }}min</text>
<view class="right">
<view class="r-title">
<text>平均接待时长:</text>
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>平均接待时长<text class="value">{{ weekObj.avgDuration || 0 }}min</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.avgDurationPK < 0, up: weekObj.avgDurationPK > 0}">{{ weekObj.avgDurationPK > 0 ? '+' : '' }}{{ weekObj.avgDurationPK || 0 }}min</text>
</view>
</view>
</view>
</view>
</view>
</view>

<view class="arrs-items index4">
<view class="left">
4
</view>
<view class="right">
<view class="r-title">
<text>销讲维度执行前三:</text>
<view class="arrs-items index4">
<view class="left">
4
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in carryOutTop" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
<view class="right">
<view class="r-title">
<text>销讲维度执行前三:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in carryOutTop" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</view>
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</block>
<template v-if="carryOutTop.length == 0">
<view class="empty">
暂无数据
</view>
</view>
</block>
<template v-if="carryOutTop.length == 0">
<view class="empty">
暂无数据
</view>
</template>
</template>
</view>
</view>
</view>
</view>
<view class="arrs-items index5">
<view class="left">
5
</view>
<view class="right">
<view class="r-title">
<text>销讲维度执行弱项前三:</text>

<view class="arrs-items index5">
<view class="left">
5
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in carryOutLast" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
<view class="right">
<view class="r-title">
<text>销讲维度执行弱项前三:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in carryOutLast" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</view>
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</block>
<template v-if="carryOutLast.length == 0">
<view class="empty">
暂无数据
</view>
</view>
</block>
<template v-if="carryOutLast.length == 0">
<view class="empty">
暂无数据
</view>
</template>
</template>
</view>
</view>
</view>
</view>

<view class="arrs-items index6">
<view class="left">
6
</view>
<view class="right">
<view class="r-title">
<text>置业顾问平均执行率排名:</text>
<view class="arrs-items index6">
<view class="left">
6
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in consultant" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
<view class="right">
<view class="r-title">
<text>置业顾问平均执行率排名:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in consultant" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</view>
</view>
<view class="rside">
({{ rank.value || 0 }}%)
</block>
<template v-if="consultant.length == 0">
<view class="empty">
暂无数据
</view>
</view>
</block>
<template v-if="consultant.length == 0">
<view class="empty">
暂无数据
</view>
</template>
</template>
</view>
</view>
</view>
</view>

<view class="arrs-items index7">
<view class="left">
7
</view>
<view class="right">
<view class="r-title">
<text>置业顾问平均接访时长排名:</text>
<view class="arrs-items index7">
<view class="left">
7
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in recording" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value || 0 }}min)
<view class="right">
<view class="r-title">
<text>置业顾问平均接访时长排名:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in recording" :key="rankIndex">
<view class="ranking-item">
<view class="serial">
{{ rankIndex+1 }}
</view>
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value || 0 }}min)
</view>
</view>
</view>
</block>
</block>

<template v-if="recording.length == 0">
<view class="empty">
暂无数据
</view>
</template>
<template v-if="recording.length == 0">
<view class="empty">
暂无数据
</view>
</template>
</view>
</view>
</view>
</view>

<view class="arrs-items index8">
<view class="left">
8
</view>
<view class="right">
<view class="r-title">
<text>平均执行率最低的顾问:</text>
<view class="arrs-items index8">
<view class="left">
8
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in lowest" :key="rankIndex">
<view class="ranking-item">
<view class="lside">
{{ rank.title || '--' }}
<view class="right">
<view class="r-title">
<text>平均执行率最低的顾问:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in lowest" :key="rankIndex">
<view class="ranking-item">
<view class="lside">
{{ rank.title || '--' }}
</view>
<view class="rside value">
{{ rank.value || 0 }}%
</view>
</view>
<view class="rside value">
{{ rank.value || 0 }}%
</block>

<template v-if="lowest.length == 0">
<view class="empty">
暂无数据
</view>
</view>
</block>
<template v-if="lowest.length == 0">
<view class="empty">
暂无数据
</view>
</template>
</template>
</view>
</view>
</view>
</view>

<view class="arrs-items index9">
<view class="left">
9
</view>
<view class="right">
<view class="r-title">
<text>客户画像触达:</text>
<text class="num value">{{ weekObj.reachSum || 0 }}次</text>
<view class="arrs-items index9">
<view class="left">
9
</view>
<view class="right">
<view class="r-title">
<text>客户画像触达:</text>
<text class="num value">{{ weekObj.reachSum || 0 }}次</text>
</view>
</view>
</view>
</view>

<view class="arrs-items index10">
<view class="left">
10
</view>
<view class="right">
<view class="r-title">
<text>未标记接待数:</text>
<text class="num value down"
style="font-weight: 500;font-size: 34rpx;">{{ weekObj.unlabelledReceptionNum || 0 }}</text>
<text class="down value">条</text>
<view class="arrs-items index10">
<view class="left">
10
</view>
<view class="right">
<view class="r-title">
<text>未标记接待数:</text>
<text class="num value down"
style="font-weight: 500;font-size: 34rpx;">{{ weekObj.unlabelledReceptionNum || 0 }}</text>
<text class="down value">条</text>
</view>
</view>
</view>
</view>

<view class="arrs-items index11">
<view class="left">
11
</view>
<view class="right">
<view class="r-title">
<text>设备情况:</text>
<view class="arrs-items index11">
<view class="left">
11
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>在线<text class="value">{{ weekObj.equipmentInfo.onlineNum || 0 }}</text></view>
<view style="margin-left: 24rpx;">
离线<text class="value">{{ weekObj.equipmentInfo.offlineNum || 0 }}</text></view>
<view class="right">
<view class="r-title">
<text>设备情况:</text>
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>在线<text class="value">{{ weekObj.equipmentInfo.onlineNum || 0 }}</text>
</view>
<view style="margin-left: 24rpx;">
离线<text class="value">{{ weekObj.equipmentInfo.offlineNum || 0 }}</text>
</view>
</view>
</view>
</view>
</view>
</view>

</view>
</view>
</view>
</view>

<!-- 底部按钮 -->
<view class="nav-footer">
<view class="nav-footer" v-if="!nodata">
<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;">
<view class="footer-item full" style="margin-left: 24rpx;" @tap="forShare">
<button open-type="share" class="fulls">
一键转发
</button>
@@ -316,6 +325,7 @@
id: '', // 消息id
projectName: '', // 项目名称
weekObj: {}, // 日报详情
nodata: false //有无数据
}
},

@@ -333,6 +343,117 @@
},

methods: {
tofixed2(time) {
if (time) {
return time.toFixed(2)
} else {
return 0
}
},
// 项目拷贝
copys() {
let str = `
${this.projectName}数智工牌日报
生成时间:${this.weekObj.createTime || '--'}
1、接待量:${this.weekObj.receptionCount || 0 }
有效接待:${this.weekObj.activeCustomer || 0}
有效接待率:${this.weekObj.validReceptionRate || 0}%
对比昨天:${ this.weekObj.validReceptionRatePK > 0 ? '+' : '' }${ this.weekObj.validReceptionRatePK || 0 }%
2、平均执行率:${ this.weekObj.fraction || 0 }%
销讲执行率:${ this.weekObj.fractionPK > 0 ? '+' : '' }${ this.weekObj.fractionPK || 0 }%
3、平均接待时长:${ this.weekObj.avgDuration || 0 }min
对比昨天:${this.weekObj.avgDurationPK > 0 ? '+' : '' }${ this.weekObj.avgDurationPK || 0 }min`
if (this.consultant.length > 0) {
str += `
4、项目平均执行率排名:`
this.consultant.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.recording.length > 0) {
str += `
5、项目平均接访时长排名:`
this.recording.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${this.tofixed2(item.value/60)||'0'}m`
})
}
if (this.lowest.length > 0) {
str += `
6、执行率最低的项目:`
for (let i in this.weekObj.minFraction) {
str += `
${i || '--'}${this.weekObj.minFraction[i]||'0'}%`
}
}
str += `
7、客户画像触达:${this.weekObj.reachSum || 0}次`
if (this.weekObj.level1List.length > 0) {
str += `
8、画像一级触达接待前三
`
this.weekObj.level1List.map((item, index) => {
str += `
top${index+1}.${item.name || '--'}${item.total||'0'}%`
})
}
if (this.weekObj.level1List.length > 0) {
str += `
9、画像关键词触达接待前三
`
this.weekObj.level1List.map((item, index) => {
str += `
top${index+1}.${item.name || '--'}${item.total||'0'}%`
})
}
str += `
10、未标记接待数:${ this.weekObj.unlabelledReceptionNum || 0 }条
11、设备情况:
在线:${this.weekObj.equipmentInfo.onlineNum || 0}
离线:${this.weekObj.equipmentInfo.offlineNum || 0}`
uni.setClipboardData({
data: str
})
},
forShare() {
this.$u.get("/zkMessage/shareMessage", {
id: this.id,
houseId: uni.getStorageSync('buildingID').id
})
},
// 跳转首页
toHome() {
uni.navigateTo({
@@ -346,10 +467,20 @@
}).then(res => {
console.log(res)
let data = JSON.parse(res.zkMessage.content)
this.weekObj = {
...res.zkMessage,
...data
if (res.zkMessage.content) {
data = JSON.parse(res.zkMessage.content)
this.weekObj = {
...res.zkMessage,
...data
}
this.nodata = false
} else {
this.nodata = true
this.weekObj = {
...res.zkMessage
}
}

this.projectName = res.projectName
this.init()
}).catch(e => {
@@ -385,7 +516,7 @@
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.carryOutLast.length > 0) {
str += `
@@ -395,7 +526,7 @@
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.consultant.length > 0) {
str += `
@@ -405,7 +536,7 @@
top${index+1}.${item.title || '--'}${item.value||'0'}%`
})
}
if (this.recording.length > 0) {
str += `
@@ -415,7 +546,7 @@
top${index+1}.${item.title || '--'}${item.value||'0'}min`
})
}
if (this.lowest.length > 0) {
str += `
@@ -443,13 +574,12 @@
// 分割数组排名前三,倒三
getTopThree() {
if (this.weekObj.XJTopList && this.weekObj.XJTopList.length > 0) {
let arr = this.weekObj.XJTopList.slice(0, 3)
arr.forEach(item => {
if (item.value != 100) {
this.carryOutLast.push(item)
console.log('我是最低的判断进来了', this.carryOutLast)
}
})
let arr = this.weekObj.XJTopList.slice(0, 3)
arr.forEach(item => {
if (item.value != 100) {
this.carryOutLast.push(item)
}
})
this.carryOutTop = this.weekObj.XJTopList.reverse().slice(0, 3)
console.log(this.weekObj.XJTopList)
}
@@ -738,11 +868,36 @@
width: 100%;
line-height: 48rpx;
}
.value {
margin-left: 5rpx;
font-size: 30rpx !important;
font-weight: bold !important;
}

.nodata-box {
width: 750rpx;
margin: 20rpx auto 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #fff;

.img {
width: 400rpx;
height: 400rpx;
}

.text {
text-align: center;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 40rpx;
// margin-top: -40rpx;
}
}
}
</style>

BIN
static/images/nodata.png Näytä tiedosto

Before After
Leveys: 400  |  Korkeus: 400  |  Koko: 27 KiB

Ladataan…
Peruuta
Tallenna