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