таблица
This commit is contained in:
1 parent
39e04e6841
commit
a1b30448ad
4 files changed
+32
-32
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
<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 class="">
|
<v-row no-gutters>
|
||||||
<v-col lg=2>
|
<v-col lg=2>
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="modelrating"
|
v-model="modelrating"
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
Рейтинг посещаемости страниц портала
|
Рейтинг посещаемости страниц портала
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
<v-row class="overflow-auto h-0">
|
<v-row class="overflow-auto h-0">
|
||||||
@@ -24,36 +23,31 @@
|
|||||||
>
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="text-uppercase">
|
<tr class="text-uppercase">
|
||||||
<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>
|
||||||
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(val, key) in pages_count.data" :key="key">
|
<tr
|
||||||
|
v-for="(val, key) in pages_count.data"
|
||||||
|
:key="key"
|
||||||
|
>
|
||||||
<td>{{key}}</td>
|
<td>{{key}}</td>
|
||||||
|
<td-tooltip
|
||||||
<td-tooltip :lines = val.now.unique />
|
: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>
|
||||||
|
|
||||||
<!-- <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>
|
</tbody>
|
||||||
</v-table>
|
</v-table>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -2,16 +2,17 @@
|
|||||||
<td>
|
<td>
|
||||||
<v-tooltip
|
<v-tooltip
|
||||||
location="bottom"
|
location="bottom"
|
||||||
v-if="lines.length>0"
|
v-if="number>0"
|
||||||
>
|
>
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<span v-bind="props">
|
<span v-bind="props">
|
||||||
{{lines.length}}
|
{{number}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<v-row
|
<v-row
|
||||||
no-gutters v-for="n in lines"
|
no-gutters v-for="n in tooltip"
|
||||||
:key="n">
|
:key="n"
|
||||||
|
>
|
||||||
<v-col>
|
<v-col>
|
||||||
{{n}}
|
{{n}}
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -24,15 +25,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
lines: {
|
|
||||||
|
tooltip: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
number: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ setup(){
|
|||||||
const dataLineChart = ref({})
|
const dataLineChart = ref({})
|
||||||
|
|
||||||
const previous = ref({start: new Date(), end: new Date()})
|
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 pages_count = ref({data: {}, title: {}})
|
||||||
|
|
||||||
const previous_period =() => {
|
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))
|
checking_for_entry(acc[item.pages].now.unique, splitname(item.author))
|
||||||
acc[item.pages].now.countall += item.count
|
acc[item.pages].now.countall += item.count
|
||||||
}
|
}
|
||||||
@@ -333,10 +333,6 @@ setup(){
|
|||||||
|
|
||||||
|
|
||||||
const title_period = () => {
|
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.start = format1(filterStore.date_period.startdate)
|
||||||
selected_days.value.year.end = format1(filterStore.date_period.enddate)
|
selected_days.value.year.end = format1(filterStore.date_period.enddate)
|
||||||
pages_count.value.title = selected_days.value
|
pages_count.value.title = selected_days.value
|
||||||
|
|||||||
Reference in new issue
Block a user