До бновления vuetyfy

This commit is contained in:
iriska-gri committed 2024-02-06 08:05:49 +03:00
1 parent 8fd7e98e7e
commit 40b686182b
8 files changed
+87 -106

No files matched your search

@@ -1,7 +1,6 @@
<template> <template>
<v-card class="text-center h-100 d-flex flex-column" > <v-card class="text-center h-100 d-flex flex-column" >
<v-card-title> <v-card-title>
<v-row no-gutters> <v-row no-gutters>
<v-col lg=2> <v-col lg=2>
<v-switch <v-switch
@@ -18,13 +17,18 @@
</v-card-title> </v-card-title>
<v-divider/> <v-divider/>
<v-row class="overflow-auto h-0"> <v-row class="overflow-auto h-0">
<v-col class="d-flex flex-column"> <v-col class="d-flex flex-column">
<v-table fixed-header <v-table
fixed-header
height="0" height="0"
hover
class="pointer"
> >
<thead> <thead>
<tr class="text-uppercase"> <tr>
<th>Имя страницы</th> <th></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>
@@ -36,16 +40,53 @@
> >
<td>{{key}}</td> <td>{{key}}</td>
<td> <td>
<tooltip-number <tooltip-text
:number = modelrating?val.now.unique.length:val.now.countall v-if="val.now.unique.length>0"
:tooltip = val.now.unique :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-row>
</template>
</tooltip-text>
<span v-else>
0
</span>
</td> </td>
<td> <td>
<tooltip-number
<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>
<!-- <tooltip-number
:number = modelrating?val.year.unique.length:val.year.countall :number = modelrating?val.year.unique.length:val.year.countall
:tooltip = val.year.unique :tooltip = val.year.unique
/> /> -->
</td> </td>
</tr> </tr>
@@ -59,11 +100,11 @@
<script> <script>
import { ref } from 'vue' import { ref } from 'vue'
import tooltipNumber from '@/components/UI/tooltip-number.vue'
import TooltipText from '@/components/UI/tooltip-text.vue'
export default { export default {
components: { tooltipNumber }, components: { TooltipText },
props: { props: {
pages_count: { pages_count: {
@@ -1,13 +1,19 @@
<template> <template>
<v-table> <v-card class="text-center h-100 d-flex flex-column" >
<v-row no-gutters class="overflow-auto h-0">
<v-col>
<v-table hover>
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th v-for="(n, key) in th_text" :key="key"> <th v-for="(n, key) in th_text" :key="key">
<tooltip-text <tooltip-text
:text="key" :text="key"
:tooltip="n" >
/> <template v-slot:tooltip>
{{n}}
</template>
</tooltip-text>
</th> </th>
</tr> </tr>
</thead> </thead>
@@ -15,25 +21,22 @@
<tr <tr
v-for="(user, key) in activusers" v-for="(user, key) in activusers"
:key="key" :key="key"
style="height:100px" style="height:75px"
> >
<td> <td class="pa-0 pl-1">
<list-user <list-user
:author=user.user :author=user.user
:from_which = "'top-user'" :from_which = "'top-user'"
/> />
</td> </td>
<td <td
v-for="(val, key) in user.info" v-for="(val, key) in user.info"
:key="key" :key="key"
class="text-center subheading pa-0 text-subtitle-2 font-weight-medium" class="text-center subheading pa-0 text-subtitle-2 font-weight-medium"
> >
<span v-if="(key!='session')"> <span v-if="(key!='session')">
{{val}} {{val}}
</span> </span>
<tooltip-text <tooltip-text
v-if="(key=='session')" v-if="(key=='session')"
:text = val :text = val
@@ -43,10 +46,8 @@
density="compact" density="compact"
style="background:transparent; color:white" style="background:transparent; color:white"
> >
<thead> <thead class="font-italic">
Количество посещенных страниц за выбранный период (всего/уникальные)
Сколько было посещено раз страниц за выбранный период (всего/уникальные)
</thead> </thead>
<tbody> <tbody>
<tr <tr
@@ -61,76 +62,32 @@
{{n.unic}} {{n.unic}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</v-table> </v-table>
<!-- <v-row
no-gutters v-for="(n, key) in user.tooltip.namepages"
:key="key"
>
<v-col>
{{key}}
{{n.count}}/{{n.unic}}
</v-col>
</v-row> -->
</template> </template>
</tooltip-text> </tooltip-text>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</v-table> </v-table>
<!-- <v-card class="text-center h-100">
<my-helper :pretext="activusers"/>
<v-btn density="comfortable" icon="$vuetify" @click="$emit('sortcount')"></v-btn>
<v-btn density="comfortable" icon="$vuetify"></v-btn>
<div v-for="(user, key) in activusers" :key="key" >
<v-card
class="mx-auto"
height="100px"
>
<v-divider/>
<v-card-text class="pa-0 d-flex flex-column h-100">
<v-row no-gutters>
<v-col lg=8 class="align-self-center">
<list-user :author=user.user />
</v-col>
<v-col class="pt-8 text-center">
<span class="subheading text-h6" v-for="(x, key) in user.info" :key="key">
{{x}}
</span>
</v-col> </v-col>
</v-row> </v-row>
</v-card-text>
</v-card> </v-card>
</div>
</v-card> -->
</template> </template>
<script> <script>
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 TooltipNumber from '@/components/UI/tooltip-number.vue'
import TooltipText from '@/components/UI/tooltip-text.vue'
export default { export default {
components: { components: {
listUser, listUser
TooltipNumber,
TooltipText
}, },
props: { props: {
activusers: { activusers: {
type: Object, type: Object,
default: {} default: {}
@@ -138,7 +95,7 @@ export default {
}, },
setup(props) { setup() {
const th_text = { const th_text = {
"Просмотры": "Сколько было открыто страниц за период", "Просмотры": "Сколько было открыто страниц за период",
@@ -146,16 +103,12 @@ export default {
"Страницы": "Общее количество посещенных уникальных страниц за период", "Страницы": "Общее количество посещенных уникальных страниц за период",
} }
return { return {
checkremote, checkremote,
spravURL, spravURL,
th_text th_text
} }
} }
} }
</script> </script>
@@ -1,12 +1,10 @@
<template> <template>
<div style="height:68%"> <div>
<v-list-item class="pl-4 h-100 text-left pa-2" @click="open=true">
<v-list-item class="pl-4 h-100 pointer text-left" @click="open=true">
<template v-slot:prepend> <template v-slot:prepend>
<v-avatar <v-avatar
color="grey-darken-3" color="grey-darken-3"
:image="checkremote( `${spravURL}${author.login}.jpg`)" :image="checkremote( `${spravURL}${author.login}.jpg`)"
/> />
</template> </template>
<v-list-item-title :class="style_item_title()"> <v-list-item-title :class="style_item_title()">
@@ -14,10 +12,8 @@
</v-list-item-title> </v-list-item-title>
<v-list-item-subtitle :class="style_item_subtitle()"> <v-list-item-subtitle :class="style_item_subtitle()">
{{author.post}} {{author.post}}
</v-list-item-subtitle> </v-list-item-subtitle>
</v-list-item> </v-list-item>
<info-user-card <info-user-card
:opendialog = open :opendialog = open
:loging="author.login" :loging="author.login"
@@ -51,7 +47,7 @@ export default {
const style_item_title = () => { const style_item_title = () => {
if (props.from_which=="top-user") { if (props.from_which=="top-user") {
return "text-caption font-weight-medium" return "text-body-1 font-weight-medium"
} }
else else
return "text-body-1 font-weight-medium pt-2" return "text-body-1 font-weight-medium pt-2"
+2 -1
View File
@@ -1,4 +1,5 @@
import myHelper from '@/components/UI/my-helper'; import myHelper from '@/components/UI/my-helper';
import InfoUserCard from '@/components/UI/infoUserCard.vue'; import InfoUserCard from '@/components/UI/infoUserCard.vue';
import TooltipText from '@/components/UI/tooltip-text.vue'
export default [myHelper, InfoUserCard,] export default [myHelper, InfoUserCard, TooltipText, ]
+1 -2
View File
@@ -39,8 +39,7 @@ export default {
props: { props: {
pretext: { pretext: {
type:Object,
default:()=>{}
} }
}, },
@@ -1,5 +1,4 @@
<template> <template>
<v-tooltip <v-tooltip
location="bottom" location="bottom"
v-if="number>0" v-if="number>0"
@@ -21,7 +20,6 @@
<span v-else> <span v-else>
0 0
</span> </span>
</template> </template>
<script> <script>
+2 -8
View File
@@ -20,17 +20,11 @@
<script> <script>
export default { export default {
name: "TooltipText",
props: { props: {
tooltip: {
type: Object,
default: () => {}
},
text: { text: {
type: String,
default:''
}, },
}, },
+10 -11
View File
@@ -1,35 +1,34 @@
<template> <template>
<v-row no-gutters class="flex-column"> <v-row no-gutters class="flex-column gap ma-1">
<toolbar-filter/> <toolbar-filter/>
<v-col lg=3 class="w100 pa-1"> <v-col lg=3 class="w100 ">
<v-row no-gutters class="h-100"> <v-row no-gutters class="h-100 gap">
<v-col lg=2 class="bg-blue"> <v-col lg=2 class="bg-blue">
{{format1(previous.start)}} - {{format1(previous.end)}} {{format1(previous.start)}} - {{format1(previous.end)}}
</v-col> </v-col>
<v-col class="bg-yellow "> <v-col>
<line-chart :dataLineChart="dataLineChart"/> <line-chart :dataLineChart="dataLineChart"/>
</v-col> </v-col>
</v-row> </v-row>
</v-col> </v-col>
<v-col class="w100 "> <v-col class="w100 ">
<v-row no-gutters class="h-100"> <v-row no-gutters class="h-100 gap">
<v-col lg=2 class="bg-green"> <v-col lg=2 class="bg-green">
visiting- (все данные) visiting- (все данные)
<my-helper :pretext="visiting"/> <my-helper :pretext="visiting"/>
</v-col> </v-col>
<v-col lg=4 class="bg-red d-flex flex-column"> <v-col lg=4 class="d-flex flex-column">
<rating-page :pages_count=pages_count /> <rating-page :pages_count=pages_count />
</v-col> </v-col>
<v-col lg=4 class="d-flex flex-column bg-yellow"> <v-col lg=4 class="d-flex flex-column ">
<v-row no-gutters class=" overflow-auto h-0">
<v-col>
<top-user <top-user
:activusers = dataTopUser :activusers = dataTopUser
@sortcount=sortcount @sortcount=sortcount
/> />
</v-col>
</v-row>
<!-- --> <!-- -->
<!-- <!--
> --> > -->