diff --git a/App.vue b/App.vue index 0c977f9..e9e2cba 100644 --- a/App.vue +++ b/App.vue @@ -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("没有") diff --git a/pages/index/personal.vue b/pages/index/personal.vue index bc7daed..7bbde64 100644 --- a/pages/index/personal.vue +++ b/pages/index/personal.vue @@ -167,7 +167,7 @@ content: '确定要退出?', cancelColor: "#999999", showCancel: true, - success(res) { + success:(res) => { if (res.confirm) { app.Closewebsocke() uni.clearStorageSync(); //清除缓存 diff --git a/pages/reportExcel/dayReport.vue b/pages/reportExcel/dayReport.vue index 66f7fff..d9dda43 100644 --- a/pages/reportExcel/dayReport.vue +++ b/pages/reportExcel/dayReport.vue @@ -188,7 +188,7 @@ {{ rank.title || '--' }} - ({{ rank.value/60 || 0 }}m) + ({{ tofixed2(rank.value/60) || 0 }}m) @@ -279,24 +279,46 @@ 平均执行率最低的顾问: 执行率最低的项目: - - - - - {{ rank.title || '--' }} + + @@ -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'}%` + } }