Quellcode durchsuchen

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

branch0222
douzhuo vor 1 Jahr
Ursprung
Commit
2f2088afe0
3 geänderte Dateien mit 58 neuen und 25 gelöschten Zeilen
  1. +5
    -3
      App.vue
  2. +1
    -1
      pages/index/personal.vue
  3. +52
    -21
      pages/reportExcel/dayReport.vue

+ 5
- 3
App.vue Datei anzeigen

@@ -156,9 +156,11 @@
}); });
}, },
onShow(options) { 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") const token = uni.getStorageSync("weapp_session_login_data")
if (typeof token.token != "string") { if (typeof token.token != "string") {
console.log("没有") console.log("没有")


+ 1
- 1
pages/index/personal.vue Datei anzeigen

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


+ 52
- 21
pages/reportExcel/dayReport.vue Datei anzeigen

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

<template v-if="lowest.length == 0">
<view class="empty">
暂无数据
</view> </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>
</view> </view>


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


methods: { methods: {

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

// 项目拷贝 // 项目拷贝
copys() { copys() {


@@ -492,7 +523,7 @@
3、平均接待时长:${ this.weekObj.avgDuration || 0 }min 3、平均接待时长:${ this.weekObj.avgDuration || 0 }min
对比昨天:${this.weekObj.avgDurationPK > 0 ? '+' : '' }${ this.weekObj.avgDurationPK || 0 }min` 对比昨天:${this.weekObj.avgDurationPK > 0 ? '+' : '' }${ this.weekObj.avgDurationPK || 0 }min`
if (this.consultant.length > 0) { if (this.consultant.length > 0) {
str += ` str += `
@@ -509,7 +540,7 @@
5、项目平均接访时长排名:` 5、项目平均接访时长排名:`
this.recording.map((item, index) => { this.recording.map((item, index) => {
str += ` 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 += ` str += `
6、执行率最低的项目:` 6、执行率最低的项目:`
this.lowest.map((item, index) => {
for (let i in this.weekObj.minFraction) {
str += ` str += `
${item.title || '--'}${item.value||'0'}%`
})
${i || '--'}${this.weekObj.minFraction[i]||'0'}%`
}
} }






Laden…
Abbrechen
Speichern