This commit is contained in:
zhaofang
2022-10-31 18:12:48 +08:00
parent b4da01f722
commit 84d697e9c3

View File

@@ -37,7 +37,7 @@
经验值排行榜 经验值排行榜
<el-tooltip placement="top" effect="light"> <el-tooltip placement="top" effect="light">
<div slot="content" style="line-height:13px;"> <div slot="content" style="line-height:13px;">
所有用户经验值TOP排行榜单通过学习贡献等行为可以获得经验值 </br></br> 所有用户经验值TOP排行榜单通过学习贡献等行为可以获得经验值 </br>
系统已经根据您在4月23日新系统上线之后产生的学习数据对经验值进行</br> 系统已经根据您在4月23日新系统上线之后产生的学习数据对经验值进行</br>
<span style="line-height:15px;">了初始化更早的数据以及老系统中产生的数据将在2022年底一次性</span></br> <span style="line-height:15px;">了初始化更早的数据以及老系统中产生的数据将在2022年底一次性</span></br>
补充到您的经验值中请您耐心等待 补充到您的经验值中请您耐心等待
@@ -428,6 +428,7 @@
itemHeight: 8, itemHeight: 8,
borderRadius: '50%', borderRadius: '50%',
itemGap: 26, itemGap: 26,
selectedMode: false,
formatter: function(name) { formatter: function(name) {
let data = option.series[0].data; let data = option.series[0].data;
let total = 0; let total = 0;
@@ -495,10 +496,14 @@
} }
let chatData = []; let chatData = [];
let total = null; let total = null;
let top3 = null;
let totalList = []; let totalList = [];
for (let key in res.result.chatData) { for (let key in res.result.chatData) {
if(res.result.chatData[key] > 0) { if(res.result.chatData[key] > 0) {
this.isShowChart = true; this.isShowChart = true;
if(key !== 'other') {
top3 += res.result.chatData[key];
}
} }
total += res.result.chatData[key]; total += res.result.chatData[key];
totalList.push(res.result.chatData[key]); totalList.push(res.result.chatData[key]);
@@ -507,14 +512,7 @@
name: this.getUType(key) name: this.getUType(key)
}) })
} }
// 计算前三百分比 this.percentageNum = ((top3/total)*100).toFixed(2);
totalList.sort();
totalList = totalList.splice(1,3);
let top3 = null;
totalList.forEach(item => {
top3+=item;
})
this.percentageNum = (top3/total)*100;
this.chatData = chatData; this.chatData = chatData;
this.initChat(chatData); this.initChat(chatData);
} }