Рейтинг посещаемости портала

This commit is contained in:
iriska-gri committed 2024-02-15 12:14:59 +03:00
1 parent b5e56f38c5
commit 50ad487a17
5 files changed
+163 -129

No files matched your search

@@ -1,30 +1,32 @@
<template> <template>
<v-card class="text-center text-blue-grey-darken-4 d-flex h-100 flex-column"> <v-card class="text-center text-blue-grey-darken-4 d-flex h-100 flex-column cursor-default justify-center">
<v-tooltip width="250">
<v-row no-gutters class="flex-grow-0 ">
<v-col class="text-h5 font-weight-bold pl-5">
{{indicator.title}}
<v-tooltip width="250">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
<v-icon <v-icon
icon="mdi-information" icon="mdi-information"
color="cyan-darken-3" color="cyan-darken-3"
size="12" size="12"
v-bind="props" v-bind="props"
class="align-self-end pr-2 pt-2" class="align-self-end pr-2 pb-5 cursor-help"
/> />
</template> </template>
<span class="text-caption" > <span class="text-caption" >
{{indicator.tooltip}} {{indicator.tooltip}}
</span> </span>
</v-tooltip> </v-tooltip>
<v-row no-gutters class="flex-grow-0 ">
<v-col class="text-h5 font-weight-bold">
{{indicator.title}}
</v-col> </v-col>
</v-row> </v-row>
<v-row no-gutters class="flex-grow-0"> <v-row no-gutters class="flex-grow-0">
<v-col class="text-h6 font-weight-medium"> <v-col class="text-h6 font-weight-medium">
{{indicator.abb}} {{indicator.abb}}
</v-col> </v-col>
</v-row> </v-row>
<v-row no-gutters> <v-row no-gutters class="flex-grow-0 pt-3">
<v-col class="text-h3 text-grey-darken-3 text-center font-weight-regular align-self-center"> <v-col class="text-h3 text-grey-darken-3 text-center font-weight-regular align-self-center">
<vue3-autocounter <vue3-autocounter
@@ -1,6 +1,6 @@
<template> <template>
<v-card class="text-center h-100"> <v-card class="text-center h-100 d-flex flex-column">
<v-row no-gutters > <v-row no-gutters class="flex-grow-0">
<v-col class="d-flex flex-column pa-1"> <v-col class="d-flex flex-column pa-1">
<v-chip <v-chip
color="light-blue-darken-4" color="light-blue-darken-4"
@@ -9,13 +9,20 @@
> >
<v-icon start color="cyan-darken-4" :icon="ico"/> <v-icon start color="cyan-darken-4" :icon="ico"/>
{{title}} {{title}}
</v-chip> </v-chip>
</v-col> </v-col>
</v-row>
<v-card-text class="px-3 py-0"> </v-row>
<v-row no-gutters >
<v-col class="flex-column d-flex">
<v-card-text class="px-3 py-1 flex-column d-flex h-0">
<slot name="filling"></slot> <slot name="filling"></slot>
</v-card-text> </v-card-text>
</v-col>
</v-row>
</v-card> </v-card>
</template> </template>
@@ -4,7 +4,7 @@
:ico="'mdi-walk'" :ico="'mdi-walk'"
> >
<template v-slot:filling> <template v-slot:filling>
<v-table class="text-caption table_traffic pt-3"> <v-table class="text-caption table_traffic ">
<thead> <thead>
<tr> <tr>
<th class="pr-0"></th> <th class="pr-0"></th>
@@ -18,7 +18,7 @@
v-for="(val, key) in traffic" v-for="(val, key) in traffic"
:key = key :key = key
> >
<td style="white-space: nowrap" class="text-left text-caption pr-0 pl-4 font-weight-medium">{{val.title}}</td> <td style="white-space: nowrap" class="text-left text-caption pr-0 pl-4 font-weight-medium cursor-default">{{val.title}}</td>
<td class="text-center px-0 font-weight-bold text-h6 cursor-help text-grey-darken-3"> <td class="text-center px-0 font-weight-bold text-h6 cursor-help text-grey-darken-3">
<v-tooltip location="top"> <v-tooltip location="top">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
@@ -36,8 +36,8 @@
</v-row> </v-row>
</v-tooltip> </v-tooltip>
</td> </td>
<td class="text-center px-0 font-weight-bold text-h6 text-grey-darken-3">{{ val.proc }}</td> <td class="text-center px-0 font-weight-bold text-h6 text-grey-darken-3 cursor-default">{{ val.proc }}</td>
<td class="text-center font-weight-bold text-h6 text-grey-darken-3" v-if="val.previos"> <td class="text-center font-weight-bold text-h6 text-grey-darken-3 cursor-default" v-if="val.previos">
<v-icon <v-icon
size="x-small" size="x-small"
:class="val.previos>0?'pb-1':'pt-0'" :class="val.previos>0?'pb-1':'pt-0'"
@@ -46,7 +46,7 @@
/> />
{{ val.previos }}% {{ val.previos }}%
</td> </td>
<td></td> <td v-if="!val.previos"></td>
</tr> </tr>
</tbody> </tbody>
</v-table> </v-table>
@@ -1,107 +1,141 @@
<template> <template>
<v-card class="text-center h-100 d-flex flex-column" > <pattern-card
<v-card-title> :title="'Рейтинг посещаемости страниц портала'"
<v-row no-gutters> :ico="'mdi-chart-bar'"
<v-col lg=2> >
<v-switch <template v-slot:filling>
v-model="modelrating" <v-table
hide-details fixed-header
density="comfortable" density="compact"
:label="modelrating?'уникальные':'всего'" hover
/> class="cursor-default h-0"
</v-col> >
<v-col class="ml-n7 pt-2"> <thead>
Рейтинг посещаемости страниц портала <tr>
<!-- <v-icon size="small" icon="mdi-menu-down" class="pa-0"/> --> <th class="pl-1">
</v-col> <v-switch
</v-row> v-model="modelrating"
</v-card-title> hide-details
<v-divider/>
<v-row class="overflow-auto h-0"> :label="modelrating?'Уникальные':'Всего'"
<v-col class="d-flex flex-column"> color="teal-darken-4"
<v-table
fixed-header />
height="0" </th>
hover <th class="text-center"> сегодня </th>
class="cursor-default" <th class="text-center"> за период </th>
>
<thead>
<tr>
<th></th>
<th class="text-center"> сегодня </th>
<th class="text-center"> за период </th>
<!-- <th class="text-center"> на {{pages_count.title.today}} </th> <!-- <th class="text-center"> на {{pages_count.title.today}} </th>
<th class="text-center">с {{pages_count.title.year.start}} по {{pages_count.title.year.end}}</th> --> <th class="text-center">с {{pages_count.title.year.start}} по {{pages_count.title.year.end}}</th> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr <tr
v-for="(val, key) in pages_count.data" v-for="(val, key) in pages_count.data"
:key="key" :key="key"
> >
<td>{{key}}</td> <td class="text-left">{{key}}</td>
<td> <td>
<tooltip-text <tooltip-text
v-if="val.now.unique.length>0" v-if="val.now.unique.length>0"
:text="modelrating?val.now.unique.length:val.now.countall" :text="modelrating?val.now.unique.length:val.now.countall"
> >
<template v-slot:tooltip> <template v-slot:tooltip>
<v-row <v-row
no-gutters v-for="n in val.now.unique" no-gutters v-for="n in val.now.unique"
:key="n" :key="n"
> >
<v-col> <v-col>
{{n}} {{n}}
</v-col> </v-col>
</v-row> </v-row>
</template> </template>
</tooltip-text> </tooltip-text>
<span v-else> <span v-else>
0 0
</span> </span>
</td> </td>
<td > <td>
<tooltip-text <tooltip-text
v-if="val.year.unique.length>0" v-if="val.year.unique.length>0"
:text="modelrating?val.year.unique.length:val.year.countall" :text="modelrating?val.year.unique.length:val.year.countall"
> >
<template v-slot:tooltip> <template v-slot:tooltip>
<v-row <v-row
no-gutters no-gutters
v-for="n in val.year.unique" v-for="n in val.year.unique"
:key="n" :key="n"
> >
<v-col> <v-col>
{{n}} {{n}}
</v-col> </v-col>
</v-row> </v-row>
</template> </template>
</tooltip-text> </tooltip-text>
<span v-else> <span v-else>
0 0
</span> </span>
<!-- <tooltip-number </td>
:number = modelrating?val.year.unique.length:val.year.countall </tr>
:tooltip = val.year.unique <tr
/> --> v-for="(val, key) in pages_count.data"
</td> :key="key"
</tr> >
<td class="text-left">{{key}}</td>
</tbody> <td>
</v-table> <tooltip-text
v-if="val.now.unique.length>0"
</v-col> :text="modelrating?val.now.unique.length:val.now.countall"
</v-row> >
</v-card> <template v-slot:tooltip>
<v-row
no-gutters v-for="n in val.now.unique"
:key="n"
>
<v-col>
{{n}}
</v-col>
</v-row>
</template>
</tooltip-text>
<span v-else>
0
</span>
</td>
<td>
<tooltip-text
v-if="val.year.unique.length>0"
:text="modelrating?val.year.unique.length:val.year.countall"
>
<template v-slot:tooltip>
<v-row
no-gutters
v-for="n in val.year.unique"
:key="n"
>
<v-col>
{{n}}
</v-col>
</v-row>
</template>
</tooltip-text>
<span v-else>
0
</span>
</td>
</tr>
</tbody>
</v-table>
</template>
</pattern-card>
</template> </template>
<script> <script>
import { ref } from 'vue' import { ref } from 'vue'
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
import TooltipText from '@/components/UI/tooltip-text.vue' import TooltipText from '@/components/UI/tooltip-text.vue'
export default { export default {
components: { TooltipText }, components: { TooltipText, PatternCard },
props: { props: {
pages_count: { pages_count: {
@@ -1,18 +1,9 @@
<template> <template>
<v-card class="h-100 d-flex flex-column pa-1"> <pattern-card
:title="'Самые активные пользователи'"
<!-- <my-helper :pretext="activusers"/> --> :ico="'mdi-star-circle'"
<v-row no-gutters class="overflow-auto h-0"> >
<v-col class="d-flex flex-column"> <!-- <template v-slot:filling>
<v-chip
color="light-blue-darken-4"
label
class="text-center text-center text-cyan-darken-4 rounded-0 text-subtitle-1 font-weight-medium"
>
<v-icon start icon="mdi-account-circle-outline"/>
Самые активные пользователи
</v-chip>
<v-divider/>
<v-data-table <v-data-table
v-model:expanded="expanded" v-model:expanded="expanded"
:headers="dessertHeaders" :headers="dessertHeaders"
@@ -99,10 +90,8 @@
</template> </template>
</v-data-table> </v-data-table>
</template> -->
</v-col> </pattern-card>
</v-row>
</v-card>
</template> </template>
<script> <script>
@@ -110,10 +99,12 @@ import { ref } from 'vue'
import { spravURL } from '@/utils/axios-api' import { spravURL } from '@/utils/axios-api'
import {checkremote} from '@/utils/universal_functions' import {checkremote} from '@/utils/universal_functions'
import listUser from '@/components/UI//fiousercard/listUser.vue' import listUser from '@/components/UI//fiousercard/listUser.vue'
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
export default { export default {
components: { components: {
listUser listUser,
PatternCard
}, },
props: { props: {