Browse Source

新增分享、日周报接口项目id字段

branch0222
douzhuo 1 year ago
parent
commit
2f2088afe0
3 changed files with 58 additions and 25 deletions
  1. +5
    -3
      App.vue
  2. +1
    -1
      pages/index/personal.vue
  3. +52
    -21
      pages/reportExcel/dayReport.vue

+ 5
- 3
App.vue View File

@@ -156,9 +156,11 @@
});
},
onShow(options) {
this.$u.post('/user/addLoginCount', {
houseId: uni.getStorageSync('buildingID').id
})
if (uni.getStorageSync('buildingID').id) {
this.$u.post('/user/addLoginCount', {
houseId: uni.getStorageSync('buildingID').id
}).then(res=>{}).catc(e=>{})
}
const token = uni.getStorageSync("weapp_session_login_data")
if (typeof token.token != "string") {
console.log("没有")


+ 1
- 1
pages/index/personal.vue View File

@@ -167,7 +167,7 @@
content: '确定要退出?',
cancelColor: "#999999",
showCancel: true,
success(res) {
success:(res) => {
if (res.confirm) {
app.Closewebsocke()
uni.clearStorageSync(); //清除缓存


+ 52
- 21
pages/reportExcel/dayReport.vue View File

@@ -188,7 +188,7 @@
{{ rank.title || '--' }}
</view>
<view class="rside">
({{ rank.value/60 || 0 }}m)
({{ tofixed2(rank.value/60) || 0 }}m)
</view>
</view>
</block>
@@ -279,24 +279,46 @@
<text v-if="!weekObj.orgCode">平均执行率最低的顾问:</text>
<text v-else>执行率最低的项目:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in lowest" :key="rankIndex">
<view class="ranking-item">
<view class="lside">
{{ rank.title || '--' }}
<template v-if="!weekObj.orgCode">
<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>
</view>
</template>
<template v-else>
<view class="ranking">
<block v-for="(rank, rankIndex) in weekObj.minFraction" :key="rankIndex">
<view class="ranking-item">
<view class="lside">
{{ rankIndex || '--' }}
</view>
<view class="rside value">
{{ rank || 0 }}%
</view>
</view>
</block>

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

@@ -472,6 +494,15 @@
},

methods: {

tofixed2(time) {
if (time) {
return time.toFixed(2)
} else {
return 0
}
},

// 项目拷贝
copys() {

@@ -492,7 +523,7 @@
3、平均接待时长:${ this.weekObj.avgDuration || 0 }min
对比昨天:${this.weekObj.avgDurationPK > 0 ? '+' : '' }${ this.weekObj.avgDurationPK || 0 }min`
if (this.consultant.length > 0) {
str += `
@@ -509,7 +540,7 @@
5、项目平均接访时长排名:`
this.recording.map((item, index) => {
str += `
top${index+1}.${item.title || '--'}${item.value/60||'0'}m`
top${index+1}.${item.title || '--'}${this.tofixed2(item.value/60)||'0'}m`
})
}

@@ -517,10 +548,10 @@
str += `
6、执行率最低的项目:`
this.lowest.map((item, index) => {
for (let i in this.weekObj.minFraction) {
str += `
${item.title || '--'}${item.value||'0'}%`
})
${i || '--'}${this.weekObj.minFraction[i]||'0'}%`
}
}




Loading…
Cancel
Save