таблица
This commit is contained in:
1 parent
39e04e6841
commit
a1b30448ad
4 files changed
+64
-64
No files matched your search
@@ -1,59 +1,53 @@
|
||||
<template>
|
||||
<v-card class="text-center h-100 d-flex flex-column" >
|
||||
<v-card-title>
|
||||
<v-row no-gutters class="">
|
||||
<v-col lg=2>
|
||||
<v-switch
|
||||
v-model="modelrating"
|
||||
hide-details
|
||||
density="comfortable"
|
||||
:label="modelrating?'уникальные':'всего'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="ml-n7 pt-2">
|
||||
Рейтинг посещаемости страниц портала
|
||||
</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 fixed-header
|
||||
height="0"
|
||||
>
|
||||
<v-card-title>
|
||||
<v-row no-gutters>
|
||||
<v-col lg=2>
|
||||
<v-switch
|
||||
v-model="modelrating"
|
||||
hide-details
|
||||
density="comfortable"
|
||||
:label="modelrating?'уникальные':'всего'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="ml-n7 pt-2">
|
||||
Рейтинг посещаемости страниц портала
|
||||
</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 fixed-header
|
||||
height="0"
|
||||
>
|
||||
<thead>
|
||||
<tr class="text-uppercase">
|
||||
<th>Имя страницы
|
||||
|
||||
</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>
|
||||
</tr>
|
||||
|
||||
<tr class="text-uppercase">
|
||||
<th>Имя страницы</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(val, key) in pages_count.data" :key="key">
|
||||
<td>{{key}} </td>
|
||||
|
||||
<td-tooltip :lines = val.now.unique />
|
||||
|
||||
|
||||
|
||||
<tr
|
||||
v-for="(val, key) in pages_count.data"
|
||||
:key="key"
|
||||
>
|
||||
<td>{{key}}</td>
|
||||
<td-tooltip
|
||||
:number = modelrating?val.now.unique.length:val.now.countall
|
||||
:tooltip = val.now.unique
|
||||
/>
|
||||
<td-tooltip
|
||||
:number = modelrating?val.year.unique.length:val.year.countall
|
||||
:tooltip = val.year.unique
|
||||
/>
|
||||
</tr>
|
||||
|
||||
<!-- <tr v-for="(val, key) in pages_count" :key = key>
|
||||
<td class="text-left">{{key}}</td> -->
|
||||
<!-- <td class="text-center">{{ modelrating?val.now.unique.size:val.now.countall }} </td>
|
||||
<td class="text-center">{{ modelrating?val.year.unique.size:val.year.countall }}</td> -->
|
||||
<!-- </tr> -->
|
||||
|
||||
</tbody>
|
||||
</v-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
<td>
|
||||
<v-tooltip
|
||||
location="bottom"
|
||||
v-if="lines.length>0"
|
||||
v-if="number>0"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props">
|
||||
{{lines.length}}
|
||||
{{number}}
|
||||
</span>
|
||||
</template>
|
||||
<v-row
|
||||
no-gutters v-for="n in lines"
|
||||
:key="n">
|
||||
no-gutters v-for="n in tooltip"
|
||||
:key="n"
|
||||
>
|
||||
<v-col>
|
||||
{{n}}
|
||||
</v-col>
|
||||
@@ -20,19 +21,28 @@
|
||||
<span v-else>
|
||||
0
|
||||
</span>
|
||||
</td>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
lines: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
|
||||
props: {
|
||||
|
||||
tooltip: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
|
||||
number: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -216,7 +216,7 @@ setup(){
|
||||
const dataLineChart = ref({})
|
||||
|
||||
const previous = ref({start: new Date(), end: new Date()})
|
||||
const selected_days = ref({today: new Date(), year: {start: new Date(), end: new Date()}})
|
||||
const selected_days = ref({today: 'сегодня', year: {start: new Date(), end: new Date()}})
|
||||
const pages_count = ref({data: {}, title: {}})
|
||||
|
||||
const previous_period =() => {
|
||||
@@ -300,7 +300,7 @@ setup(){
|
||||
|
||||
}
|
||||
|
||||
if (item.visitdate == format2(filterStore.date_period.enddate)) {
|
||||
if (item.visitdate == format2(new Date())) {
|
||||
checking_for_entry(acc[item.pages].now.unique, splitname(item.author))
|
||||
acc[item.pages].now.countall += item.count
|
||||
}
|
||||
@@ -333,10 +333,6 @@ setup(){
|
||||
|
||||
|
||||
const title_period = () => {
|
||||
selected_days.value.today = 'сегодня'
|
||||
if (format2(new Date()) != format2(filterStore.date_period.enddate)) {
|
||||
selected_days.value.today = format1(filterStore.date_period.enddate)
|
||||
}
|
||||
selected_days.value.year.start = format1(filterStore.date_period.startdate)
|
||||
selected_days.value.year.end = format1(filterStore.date_period.enddate)
|
||||
pages_count.value.title = selected_days.value
|
||||
|
||||
Reference in new issue
Block a user