From b5b712d61a7a8db3592e5a16eeb6de58c56ee314 Mon Sep 17 00:00:00 2001 From: wangshuai <464942911@qq.com> Date: Wed, 20 Apr 2022 17:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=80=E8=AE=B2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/Piabodata/Theteamcompared.vue | 17 +++- pages/center/Piabodata/index.vue | 110 +++++++++------------ pages/index/customer.vue | 2 +- pages/index/index.vue | 2 +- pages/index/learning.vue | 2 +- pages/index/personal.vue | 2 +- 6 files changed, 66 insertions(+), 69 deletions(-) diff --git a/pages/center/Piabodata/Theteamcompared.vue b/pages/center/Piabodata/Theteamcompared.vue index 14fd809..df7bc64 100644 --- a/pages/center/Piabodata/Theteamcompared.vue +++ b/pages/center/Piabodata/Theteamcompared.vue @@ -135,7 +135,7 @@ @@ -424,7 +424,18 @@ max: '' } } - } + }, + + lineOpts: { + yAxis: { + data: [ + { + max: 100, + min: 0, + } + ] + } + }, }; }, @@ -1117,4 +1128,4 @@ height: 50rpx; margin-top: -2rpx; } - + \ No newline at end of file diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue index 0e22755..509c602 100644 --- a/pages/center/Piabodata/index.vue +++ b/pages/center/Piabodata/index.vue @@ -250,23 +250,29 @@ danwei: '单位(次)', totalTimeShow: false, activeTab: 0, - numlist: [{ - name: '有效接待', - num: '' - }, + + numlist: [ { name: '接待量', - num: '' + num: '', + setName: 'sumCustomer' + },{ + name: '有效接待', + num: '', + setName: 'receptionCount' }, { name: '平均执行率', - num: '' + num: '', + setName: 'fraction' }, { - name: '录音时长', - num: '' + name: '平均接待时长', + num: '', + setName: 'sumDuration' }, ], + lineOptsect: { "categories": ["2016", "2017", "2018", "2019", "2020", "2021"], "series": [{ @@ -286,21 +292,31 @@ }] }, newlistoj: [], - newlistoj1: [{ - name: "接待客户", - id: 1 + + newlistoj1: [ + { + name: "接待量", + id: 3, + title: '单位(个)', + setName: 'sumCustomer' }, { - name: "平均执行率", - id: 2 + name: "有效接待", + id: 1, + title: '单位(次)', + setName: 'receptionCount' }, { - name: "接待量", - id: 3 + name: "平均执行率", + id: 2, + title: '单位(%)', + setName: 'fraction' }, { - name: "录音时长", - id: 5 + name: "平均接待时长", + id: 5, + title: '单位(min)', + setName: 'sumDuration' }, ], bocindex: 0, @@ -464,16 +480,11 @@ lastStartDate: this.lastStartDate }) .then(res => { - // 接待量 - this.numlist[0].num = res.receptionCount || 0 - // 接待客户 - this.numlist[1].num = res.sumCustomer || 0 - // 执行率 - this.numlist[2].num = (res.fraction || 0) + '%' - // 录音时长 - this.numlist[3].num = Math.floor(res.sumDuration / 60) || 0 - // util.formatSecond()||0 - + res.sumDuration = Math.floor(res.sumDuration / 60) || 0 + res.fraction = (res.fraction || 0) + '%' + this.numlist.map(item => { + item.num = res[item.setName] + }) }) }, // 获取团队列表 @@ -605,7 +616,7 @@ }, //指标执行率分析tab tapspagek2(index) { - // console.log(index) + console.log(index) // 对数据进行分析和处理 // 先处理日期 let allobj = { @@ -615,39 +626,14 @@ data: [] }] } - if (index == 0) { - // 接待量 - this.danwei = '单位(次)' - allobj.series[0].name = '接待客户' - this.allechar.map(item => { - allobj.categories.push(item.statDate.slice(5, 10)) - allobj.series[0].data.push(item.receptionCount) - }) - } else if (index == 1) { - // 平均执行率 - this.danwei = '单位(%)' - allobj.series[0].name = '平均执行率' - this.allechar.map(item => { - allobj.categories.push(item.statDate.slice(5, 10)) - allobj.series[0].data.push(item.fraction) - }) - } else if (index == 2) { - // 接待客户 - this.danwei = '单位(个)' - allobj.series[0].name = '接待量' - this.allechar.map(item => { - allobj.categories.push(item.statDate.slice(5, 10)) - allobj.series[0].data.push(item.sumCustomer) - }) - } else { - // 录音时长 - this.danwei = '单位(min)' - allobj.series[0].name = '录音时长' - this.allechar.map(item => { - allobj.categories.push(item.statDate.slice(5, 10)) - allobj.series[0].data.push(item.sumDuration) - }) - } + + this.danwei = this.newlistoj1[index].title + allobj.series[0].name = this.newlistoj1[index].name + this.allechar.map(item => { + allobj.categories.push(item.statDate.slice(5, 10)) + allobj.series[0].data.push(item[this.newlistoj1[index].setName]) + }) + this.bocindex = index; this.lineOptsect = allobj this.$forceUpdate() @@ -763,4 +749,4 @@ .grid:nth-child(3) { border-right: none; } - + \ No newline at end of file diff --git a/pages/index/customer.vue b/pages/index/customer.vue index 40d6886..0656483 100644 --- a/pages/index/customer.vue +++ b/pages/index/customer.vue @@ -99,7 +99,7 @@ console.log(this.menulist) this.init() this.queryHaveDept() - this.updateInit() + // this.updateInit() }, methods: { updateInit() { diff --git a/pages/index/index.vue b/pages/index/index.vue index 02f50af..e3e8f7a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -335,7 +335,7 @@ } this.initworkThisWeek() this.initrealTimeStatistics() - this.updateInit() + // this.updateInit() }, onPullDownRefresh() { this.getMenu() diff --git a/pages/index/learning.vue b/pages/index/learning.vue index 6fd55d4..6fbed04 100644 --- a/pages/index/learning.vue +++ b/pages/index/learning.vue @@ -80,7 +80,7 @@ this.buildingID=uni.getStorageSync('buildingID').id; this.clocktab(i) - this.updateInit() + // this.updateInit() }, onPullDownRefresh() { var i=uni.getStorageSync('fendianindex') diff --git a/pages/index/personal.vue b/pages/index/personal.vue index e061c2c..fdfc76e 100644 --- a/pages/index/personal.vue +++ b/pages/index/personal.vue @@ -114,7 +114,7 @@ this.name = userInfos.name, this.photo = userInfos.picUrl, this.mobile = userInfos.loginName - this.updateInit() + // this.updateInit() }, methods: { updateInit() {