91 lines
1.7 KiB
Vue
91 lines
1.7 KiB
Vue
<template>
|
|
<!-- <div id="app">
|
|
<a href="#" id="return-top" v-scroll-to="'#top'">Top</a>
|
|
<div ref="top">Hi. I'm #top</div> -->
|
|
<!-- </div> -->
|
|
<v-row>
|
|
<v-col
|
|
class="ma-3"
|
|
>
|
|
|
|
<v-table density="compact" class="mt-3">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-left">
|
|
Страница
|
|
</th>
|
|
<th class="text-left">
|
|
Количество посещений
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr
|
|
v-for="item in visiting.pages"
|
|
:key="item.name"
|
|
>
|
|
<td>{{ item.page }}</td>
|
|
<td>{{ item.count__sum }}</td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
</v-table>
|
|
|
|
<v-table density="compact" class="mt-3">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-left">
|
|
Пользователь
|
|
</th>
|
|
<th class="text-left">
|
|
Страница
|
|
</th>
|
|
<th class="text-left">
|
|
Количество посещений
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr
|
|
v-for="item in visiting.users"
|
|
:key="item.name"
|
|
>
|
|
<td>{{ item.user__username }}</td>
|
|
<td>{{ item.page }}</td>
|
|
<td>{{ item.count__sum }}</td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
</v-table>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { ref } from 'vue'
|
|
import {pagecounter} from '@/utils/universal_functions'
|
|
import {getfromserver} from '@/utils/universal_functions'
|
|
export default {
|
|
setup(){
|
|
pagecounter()
|
|
const visiting = ref({})
|
|
|
|
|
|
|
|
getfromserver(`api/watcher/counter/`, visiting)
|
|
|
|
return {
|
|
visiting
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style> |