diff --git a/src/front/src/components/UI/aboutportal/line-chart.vue b/src/front/src/components/UI/aboutportal/line-chart.vue
index b1933bb13..f51359b7e 100644
--- a/src/front/src/components/UI/aboutportal/line-chart.vue
+++ b/src/front/src/components/UI/aboutportal/line-chart.vue
@@ -1,9 +1,6 @@
-
-
+
+
@@ -18,9 +15,9 @@ export default {
},
props: {
- visiting: {
- type: Array,
- default: () => []
+ dataLineChart: {
+ type: Object,
+ default: () => {}
}
},
@@ -34,7 +31,7 @@ export default {
labels: [],
datasets: [
{
- label: 'Посещений всего',
+ label: 'Открыто страниц',
backgroundColor: 'crimson',
borderColor: 'crimson',
borderWidth: 3,
@@ -45,7 +42,7 @@ export default {
},
{
- label: 'Уникальные посещения',
+ label: 'Активные пользователи',
backgroundColor: 'teal',
borderColor: 'teal',
borderWidth: 3,
@@ -112,26 +109,26 @@ export default {
}
const arrforline=() => {
- let datas =
- props.visiting.reduce((acc, item) => {
- if (!acc[item.visitdate]) {
- acc[item.visitdate] = {unic: [], count: 0}
- }
- acc[item.visitdate]['count'] += item.count
- if (!acc[item.visitdate]['unic'].includes(splitname(item.author)))
- {
- acc[item.visitdate]['unic'].push(splitname(item.author))
+ // let datas =
+ // props.visiting.reduce((acc, item) => {
+ // if (!acc[item.visitdate]) {
+ // acc[item.visitdate] = {unic: [], count: 0}
+ // }
+ // acc[item.visitdate]['count'] += item.count
+ // if (!acc[item.visitdate]['unic'].includes(splitname(item.author)))
+ // {
+ // acc[item.visitdate]['unic'].push(splitname(item.author))
- }
- return acc
- }, {})
+ // }
+ // return acc
+ // }, {})
- Object.entries(datas).forEach(e => {
+ Object.entries(props.dataLineChart).forEach(e => {
const [key, value] = e
- arrlines.value.datasets[0].data.push(datas[key].count)
- arrlines.value.datasets[1].data.push(datas[key]['unic'].length)
+ arrlines.value.datasets[0].data.push(value.count)
+ arrlines.value.datasets[1].data.push(value.unic.length)
arrlines.value.labels.push(format1(key))
- arrlines.value.datasets[1].customlabel.push(datas[key].unic)
+ arrlines.value.datasets[1].customlabel.push(props.dataLineChart[key].unic)
})
}
@@ -145,4 +142,7 @@ export default {
\ No newline at end of file
diff --git a/src/front/src/components/UI/date-select.vue b/src/front/src/components/UI/date-select.vue
index 98541c4e2..e21e42ff4 100644
--- a/src/front/src/components/UI/date-select.vue
+++ b/src/front/src/components/UI/date-select.vue
@@ -46,12 +46,12 @@