diff --git a/pages/reportExcel/dayReport.vue b/pages/reportExcel/dayReport.vue index a216f2a..6010396 100644 --- a/pages/reportExcel/dayReport.vue +++ b/pages/reportExcel/dayReport.vue @@ -13,287 +13,296 @@ - - - - - - - 1 - - - - 接待量: + + + 此项目今日还没有接待量哦~ + + + + + + + + + 1 - - - 接待量{{ weekObj.receptionCount || 0 }} - - - 有效接待{{ weekObj.activeCustomer || 0 }} + + + 接待量: - - 有效接待率{{ weekObj.validReceptionRate || 0 }}% - 对比昨天{{ weekObj.validReceptionRatePK > 0 ? '+' : '' }}{{ weekObj.validReceptionRatePK || 0 }}% + + + 接待量{{ weekObj.receptionCount || 0 }} + + + 有效接待{{ weekObj.activeCustomer || 0 }} + + + 有效接待率{{ weekObj.validReceptionRate || 0 }}% + + 对比昨天{{ weekObj.validReceptionRatePK > 0 ? '+' : '' }}{{ weekObj.validReceptionRatePK || 0 }}% + - - - - 2 - - - - 平均执行率: + + + 2 - - - 平均执行率{{ weekObj.fraction || 0 }}% - 对比昨天{{ weekObj.fractionPK > 0 ? '+' : '' }}{{ weekObj.fractionPK || 0 }}% + + + 平均执行率: + + + + 平均执行率{{ weekObj.fraction || 0 }}% + 对比昨天{{ weekObj.fractionPK > 0 ? '+' : '' }}{{ weekObj.fractionPK || 0 }}% + - - - - 3 - - - - 平均接待时长: + + + 3 - - - 平均接待时长{{ weekObj.avgDuration || 0 }}min - 对比昨天{{ weekObj.avgDurationPK > 0 ? '+' : '' }}{{ weekObj.avgDurationPK || 0 }}min + + + 平均接待时长: + + + + 平均接待时长{{ weekObj.avgDuration || 0 }}min + 对比昨天{{ weekObj.avgDurationPK > 0 ? '+' : '' }}{{ weekObj.avgDurationPK || 0 }}min + - - - - 4 - - - - 销讲维度执行前三: + + + 4 - - - - - {{ rankIndex+1 }} - - - {{ rank.title || '--' }} + + + 销讲维度执行前三: + + + + + + {{ rankIndex+1 }} + + + {{ rank.title || '--' }} + + + ({{ rank.value || 0 }}%) + - - ({{ rank.value || 0 }}%) + + + - - - - - 5 - - - - 销讲维度执行弱项前三: + + + + 5 - - - - - {{ rankIndex+1 }} - - - {{ rank.title || '--' }} + + + 销讲维度执行弱项前三: + + + + + + {{ rankIndex+1 }} + + + {{ rank.title || '--' }} + + + ({{ rank.value || 0 }}%) + - - ({{ rank.value || 0 }}%) + + + - - - - 6 - - - - 置业顾问平均执行率排名: + + + 6 - - - - - {{ rankIndex+1 }} - - - {{ rank.title || '--' }} + + + 置业顾问平均执行率排名: + + + + + + {{ rankIndex+1 }} + + + {{ rank.title || '--' }} + + + ({{ rank.value || 0 }}%) + - - ({{ rank.value || 0 }}%) + + + - - - - 7 - - - - 置业顾问平均接访时长排名: + + + 7 - - - - - {{ rankIndex+1 }} - - - {{ rank.title || '--' }} - - - ({{ rank.value || 0 }}min) + + + 置业顾问平均接访时长排名: + + + + + + {{ rankIndex+1 }} + + + {{ rank.title || '--' }} + + + ({{ rank.value || 0 }}min) + - - + - + + - - - - 8 - - - - 平均执行率最低的顾问: + + + 8 - - - - - {{ rank.title || '--' }} + + + 平均执行率最低的顾问: + + + + + + {{ rank.title || '--' }} + + + {{ rank.value || 0 }}% + - - {{ rank.value || 0 }}% + + + + - - - - 9 - - - - 客户画像触达: - {{ weekObj.reachSum || 0 }}次 + + + 9 + + + + 客户画像触达: + {{ weekObj.reachSum || 0 }}次 + - - - - 10 - - - - 未标记接待数: - {{ weekObj.unlabelledReceptionNum || 0 }} - + + + 10 + + + + 未标记接待数: + {{ weekObj.unlabelledReceptionNum || 0 }} + + - - - - 11 - - - - 设备情况: + + + 11 - - - 在线{{ weekObj.equipmentInfo.onlineNum || 0 }} - - 离线{{ weekObj.equipmentInfo.offlineNum || 0 }} + + + 设备情况: + + + + 在线{{ weekObj.equipmentInfo.onlineNum || 0 }} + + + 离线{{ weekObj.equipmentInfo.offlineNum || 0 }} + + - + - - + + 回到管理端 - + 复制内容 - - + + @@ -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; + } + } } diff --git a/static/images/nodata.png b/static/images/nodata.png new file mode 100644 index 0000000..77eeb8c Binary files /dev/null and b/static/images/nodata.png differ