Добавить иконку
This commit is contained in:
1 parent
f20f82c988
commit
6d78e10b07
2 files changed
+17
-15
No files matched your search
@@ -27,7 +27,7 @@ export default {
|
||||
|
||||
setup(props, context) {
|
||||
const total = ref(0)
|
||||
const crit = ref({max: 0, id: 0, total: 0})
|
||||
const crit = ref({max: 0, fio: 0, total: 0})
|
||||
|
||||
|
||||
const average = () => {
|
||||
@@ -38,21 +38,22 @@ export default {
|
||||
const avgfeed =
|
||||
props.feedback
|
||||
.reduce((acc, item) => {
|
||||
if (!acc[item.crit]) {
|
||||
acc[item.crit] = []
|
||||
console.log(item, 'item');
|
||||
if (!acc[item.namecrit]) {
|
||||
acc[item.namecrit] = []
|
||||
}
|
||||
acc[item.crit].push(item.rating)
|
||||
acc[item.namecrit].push(item.rating)
|
||||
tot.add(item.usercom)
|
||||
|
||||
if (!us[splitname(item.author)]) {
|
||||
us[splitname(item.author)] =new Set()
|
||||
us[splitname(item.author)] = {max: new Set(), login: 0}
|
||||
}
|
||||
if (item.comment.length > 0) {
|
||||
us[splitname(item.author)].add(item.usercom)
|
||||
us[splitname(item.author)]['max'].add(item.usercom)
|
||||
us[splitname(item.author)]['login'] = item.author.login
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return acc
|
||||
}, {}
|
||||
)
|
||||
@@ -68,16 +69,17 @@ export default {
|
||||
|
||||
for (let [key,val] of Object.entries(us))
|
||||
{
|
||||
console.log(key, val ,val.size, '2222222222222222');
|
||||
t += val.size
|
||||
|
||||
t += val.max.size
|
||||
|
||||
if (crit.value.max < val.size) {
|
||||
crit.value = {id:key,max:val.size}
|
||||
if (crit.value.max < val.max.size) {
|
||||
crit.value = {fio:key,max:val.max.size, login: val.login}
|
||||
}
|
||||
|
||||
}
|
||||
crit.value.total = t
|
||||
total.value = tot.size
|
||||
console.log(avgfeed, 'avgfeed');
|
||||
return avgfeed
|
||||
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ setup(){
|
||||
let countall = {now: 0, week: 0, year: 0}
|
||||
const groupedData =
|
||||
visiting.value.reduce((acc, item) => {
|
||||
console.log(item, 'countvising.value');
|
||||
|
||||
|
||||
if (!acc[item.pages]) {
|
||||
acc[item.pages] = {now: 0, week: 0, year: 0}
|
||||
@@ -251,7 +251,7 @@ setup(){
|
||||
let arrcount = []
|
||||
for (let [key,val] of Object.entries(us)) {
|
||||
|
||||
arrcount.push({id:key,max:val.page.size, login: val.login})
|
||||
arrcount.push({fio:key,max:val.page.size, login: val.login})
|
||||
}
|
||||
arrcount.sort((a, b) => {
|
||||
|
||||
|
||||
Reference in new issue
Block a user