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

This commit is contained in:
iriska-gri committed 2024-02-15 12:14:59 +03:00
1 parent 4035b220fb
commit 7ae944d109
5 files changed
+103 -69

No files matched your search

@@ -1,5 +1,9 @@
<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-row no-gutters class="flex-grow-0 ">
<v-col class="text-h5 font-weight-bold pl-5">
{{indicator.title}}
<v-tooltip width="250"> <v-tooltip width="250">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
<v-icon <v-icon
@@ -7,24 +11,22 @@
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,33 +1,27 @@
<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"
hide-details
density="comfortable"
:label="modelrating?'уникальные':'всего'"
/>
</v-col>
<v-col class="ml-n7 pt-2">
Рейтинг посещаемости страниц портала
<!-- <v-icon size="small" icon="mdi-menu-down" class="pa-0"/> -->
</v-col>
</v-row>
</v-card-title>
<v-divider/>
<v-row class="overflow-auto h-0">
<v-col class="d-flex flex-column">
<v-table <v-table
fixed-header fixed-header
height="0" density="compact"
hover hover
class="cursor-default" class="cursor-default h-0"
> >
<thead> <thead>
<tr> <tr>
<th></th> <th class="pl-1">
<v-switch
v-model="modelrating"
hide-details
:label="modelrating?'Уникальные':'Всего'"
color="teal-darken-4"
/>
</th>
<th class="text-center"> сегодня </th> <th class="text-center"> сегодня </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>
@@ -39,7 +33,7 @@
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"
@@ -60,7 +54,7 @@
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"
@@ -80,28 +74,68 @@
<span v-else> <span v-else>
0 0
</span> </span>
<!-- <tooltip-number
:number = modelrating?val.year.unique.length:val.year.countall
:tooltip = val.year.unique
/> -->
</td> </td>
</tr> </tr>
<tr
</tbody> v-for="(val, key) in pages_count.data"
</v-table> :key="key"
>
<td class="text-left">{{key}}</td>
<td>
<tooltip-text
v-if="val.now.unique.length>0"
:text="modelrating?val.now.unique.length:val.now.countall"
>
<template v-slot:tooltip>
<v-row
no-gutters v-for="n in val.now.unique"
:key="n"
>
<v-col>
{{n}}
</v-col> </v-col>
</v-row> </v-row>
</v-card> </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">
<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"/> <!-- <template v-slot:filling>
Самые активные пользователи
</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: {