diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index b54e606d..371a868d 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -23,7 +23,7 @@
- {{note.sysUpdateTime}} +
{{note.sysUpdateTime}} {{note.openType == 9?'公开':'私密'}} @@ -38,8 +38,8 @@ - -
+
+
{{formatSeconds(note.playTime)}}
@@ -57,7 +57,7 @@

{{mynoteData.sysCreateTime}} - {{mynoteData.openType == 9?'公开':'私密'}} + {{mynoteData.openType == 9?'公1开':'私密'}}

@@ -433,6 +433,7 @@ export default { .newcote-time { display: inline-block; min-width: 80px; + // width: 100px; height: 30px; border-radius: 4px; border: 1px solid #3379FB; @@ -516,10 +517,6 @@ export default { .mycote-time { color: #666; font-size: 14px; - padding-bottom: 20px; - - - .more { margin-top: 12px; float: right; diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index 6478d622..c2c5567a 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -34,7 +34,11 @@
- 经验值排行榜 + 经验值排行榜 + +
占位内容
占位内容
+ +
@@ -212,6 +216,7 @@ }, data() { return { + percentageNum:0, cutOrgNamePath:cutOrgNamePath, chatData:[], isShowChart:false, @@ -450,8 +455,34 @@ } }, label: { - show: false, + show: true, position: 'center', + formatter:`{total|${this.percentageNum}%}\n{active|来源top3}`, + // formatter: function(name) { + // console.log(name,'name'); + // let data = option.series[0].data; + // let total = 0; + // let tarValue = 0; //每一项值 + // for (let i = 0; i < data.length; i++) { + // total += data[i].value; + // if (data[i].name == name) { + // tarValue = data[i].value; + // } + // } + // let p = total != 0 ? Math.round((tarValue / total) * 100) + '%' : 0 + '%'; + // return ` ${p} ${name}` + // }, + rich:{ + total:{ + fontSize:20, + color:'#000', + }, + active: { + fontSize:16, + color:'#333', + lineHeight:30, + } + } }, labelLine: { show: false @@ -472,15 +503,28 @@ }) } let chatData = []; + let total = null; + let totalList = []; for (let key in res.result.chatData) { if(res.result.chatData[key] > 0) { this.isShowChart = true; } + total += res.result.chatData[key]; + totalList.push(res.result.chatData[key]); chatData.push({ value: res.result.chatData[key], name: this.getUType(key) }) } + totalList.sort(); + totalList = totalList.splice(1,3); + let top3 = null; + totalList.forEach(item => { + top3+=item; + }) + this.percentageNum = (top3/total)*100; + console.log(top3,total,this.percentageNum,'3333'); + console.log(totalList,'totalList'); this.chatData = chatData; this.initChat(chatData); }