Отрисовка
This commit is contained in:
1 parent
1542b1e28f
commit
39cd38e187
4 files changed
+41
-86
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card class="text-center h-100 d-flex flex-column">
|
||||
<v-card class="text-center h-100 d-flex flex-column ">
|
||||
<v-row no-gutters class="flex-grow-0">
|
||||
<v-col class="d-flex flex-column pa-1">
|
||||
<v-chip
|
||||
@@ -18,7 +18,7 @@
|
||||
<v-col class="flex-column d-flex">
|
||||
|
||||
|
||||
<v-card-text class="px-3 py-1 flex-column d-flex h-0">
|
||||
<v-card-text class="px-3 py-1 flex-column d-flex h-0 overflow-x-auto overflow-x-hidden">
|
||||
<slot name="filling"></slot>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<template v-slot:filling>
|
||||
<v-table
|
||||
fixed-header
|
||||
density="compact"
|
||||
density="comfortable"
|
||||
hover
|
||||
class="cursor-default h-0"
|
||||
class="cursor-default h-0 "
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -32,9 +32,10 @@
|
||||
<tr
|
||||
v-for="(val, key) in pages_count.data"
|
||||
:key="key"
|
||||
|
||||
>
|
||||
<td class="text-left">{{key}}</td>
|
||||
<td>
|
||||
<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"
|
||||
@@ -54,7 +55,7 @@
|
||||
0
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<td >
|
||||
<tooltip-text
|
||||
v-if="val.year.unique.length>0"
|
||||
:text="modelrating?val.year.unique.length:val.year.countall"
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
:ico="'mdi-star-circle'"
|
||||
>
|
||||
<template v-slot:filling>
|
||||
<v-data-table
|
||||
<v-data-table-virtual
|
||||
v-model:expanded="expanded"
|
||||
:headers="dessertHeaders"
|
||||
:items="activusers"
|
||||
item-value="user.fio"
|
||||
show-expand
|
||||
items-per-page-text=""
|
||||
:items-per-page-options=perpage
|
||||
show-current-page
|
||||
fixed-header
|
||||
class="h-0 table_top_user"
|
||||
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
||||
density="compact"
|
||||
>
|
||||
@@ -26,27 +25,31 @@
|
||||
<template v-slot:expanded-row="{ columns, item }">
|
||||
<tr>
|
||||
<td :colspan="columns.length">
|
||||
<v-card class="my-2 elevation-5" >
|
||||
<v-chip
|
||||
<v-card class="my-2 elevation-0" color='grey'>
|
||||
<!-- <v-chip
|
||||
prepend-icon="mdi-script"
|
||||
size="small"
|
||||
class="font-italic my-2"
|
||||
text="Количество посещенных страниц за выбранный период (всего/уникальные)"
|
||||
variant="text"
|
||||
color="grey"
|
||||
/>
|
||||
/> -->
|
||||
<v-divider/>
|
||||
<v-data-table
|
||||
|
||||
:headers="subtable"
|
||||
:items="item.tooltip"
|
||||
items-per-page=-1
|
||||
class="subtable"
|
||||
class="subtable cursor-default px-3 bg-indigo-lighten-5"
|
||||
density="compact"
|
||||
:sort-by="[{ key: 'count', order: 'desc' }]"
|
||||
>
|
||||
|
||||
<template v-slot:header.count="{ column, isSorted, getSortIcon }">
|
||||
<v-tooltip location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn
|
||||
v-bind="props"
|
||||
max-width="50px"
|
||||
prepend-icon="mdi-folder-multiple-outline"
|
||||
variant="text"
|
||||
@@ -54,8 +57,12 @@
|
||||
<v-icon
|
||||
v-if="isSorted(column)"
|
||||
:icon="getSortIcon(column)"
|
||||
size="x-small"
|
||||
/>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Сколько раз посетили страницу в течение заданного периода</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-slot:header.unic="{ column, isSorted, getSortIcon }">
|
||||
@@ -65,7 +72,7 @@
|
||||
<v-icon v-if="isSorted(column)" :icon="getSortIcon(column)"/>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Сколько раз посетили в течение заданного периода (1 раз = 1 день)</span>
|
||||
<span>Сколько раз посетили страницу в течение заданного периода (1 раз = 1 день)</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -90,7 +97,7 @@
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-data-table-virtual>
|
||||
</template>
|
||||
</pattern-card>
|
||||
</template>
|
||||
@@ -125,14 +132,14 @@ export default {
|
||||
const dessertHeaders = [
|
||||
{
|
||||
title: '',
|
||||
align: 'start',
|
||||
align: '',
|
||||
sortable: false,
|
||||
key: 'user',
|
||||
},
|
||||
|
||||
{ title: 'Просмотры', align: 'start', key: 'info.count', maxWidth: '10' },
|
||||
{ title: 'Сессии', align: 'start', key: 'info.session', maxWidth: '10' },
|
||||
{ title: 'Страницы', align: 'start', key: 'info.pages', maxWidth: '10' },
|
||||
{ title: 'просмотры', align: 'start', key: 'info.count', maxWidth: '10' },
|
||||
{ title: 'сессии', align: 'start', key: 'info.session', maxWidth: '10' },
|
||||
{ title: 'страницы', align: 'start', key: 'info.pages', maxWidth: '10' },
|
||||
|
||||
|
||||
]
|
||||
@@ -155,59 +162,6 @@ export default {
|
||||
|
||||
]
|
||||
|
||||
const desserts = [
|
||||
|
||||
|
||||
{
|
||||
user: {
|
||||
login: "9966-00-001",
|
||||
post: "Начальник инспекции",
|
||||
fio: "Толоко Б.Б."
|
||||
},
|
||||
info: {
|
||||
count: 253,
|
||||
session: 4,
|
||||
pages: 5
|
||||
},
|
||||
tooltip: [
|
||||
{
|
||||
namepages: "О портале",
|
||||
count: 241,
|
||||
unic: 3
|
||||
}],
|
||||
|
||||
},
|
||||
{
|
||||
user: {
|
||||
login: "9966-00-107",
|
||||
post: "Старший специалист 1 разряда",
|
||||
fio: "Гришина И.С."
|
||||
},
|
||||
info: {
|
||||
count: 6010,
|
||||
session: 21,
|
||||
pages: 56
|
||||
},
|
||||
tooltip: [
|
||||
{
|
||||
namepages: "О портале",
|
||||
count: 241,
|
||||
unic: 3
|
||||
},
|
||||
{
|
||||
namepages: "Портал МИ ФНС России по ЦОД №2",
|
||||
count: 120,
|
||||
unic: 27
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -223,14 +177,6 @@ export default {
|
||||
else return 'red'
|
||||
}
|
||||
|
||||
const perpage =
|
||||
[
|
||||
{value: 10, title: '10'},
|
||||
{value: 25, title: '25'},
|
||||
{value: 50, title: '50'},
|
||||
{value: 100, title: '100'},
|
||||
{value: -1, title: 'лох'}
|
||||
]
|
||||
|
||||
|
||||
return {
|
||||
@@ -238,11 +184,11 @@ export default {
|
||||
spravURL,
|
||||
expanded,
|
||||
dessertHeaders,
|
||||
desserts,
|
||||
|
||||
subtable,
|
||||
getColor,
|
||||
getColor2,
|
||||
perpage
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,4 +198,12 @@ export default {
|
||||
.subtable .v-data-table-footer {
|
||||
display: none
|
||||
}
|
||||
|
||||
.subtable tbody {
|
||||
text-align: start!important;
|
||||
}
|
||||
|
||||
.table_top_user .v-data-table__td {
|
||||
padding: 0!important;
|
||||
}
|
||||
</style>
|
||||
@@ -23,7 +23,7 @@
|
||||
</v-col>
|
||||
<v-col class="w100 ">
|
||||
<v-row no-gutters class="h-100 gap">
|
||||
<v-col lg=2 class="flex-column d-flex">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row no-gutters class="flex-column gap" >
|
||||
<v-col v-for="x in dataIndicators" :key=x>
|
||||
<card-total :indicator=x />
|
||||
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column">
|
||||
<v-col lg=2 class="d-flex flex-column">
|
||||
<feedmodul
|
||||
:feedback="feedback"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user