Merge branch 'razrab'
This commit is contained in:
commit
65e78e685c
34 files changed
+437
-211
No files matched your search
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "front",
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.41",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "front",
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.41",
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.0.96",
|
||||
"@vuelidate/core": "^2.0.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front",
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.41",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
@@ -53,4 +53,15 @@ import {useAccountStore} from '@/store/AccountStore'
|
||||
background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8));
|
||||
}
|
||||
|
||||
.bgCard {
|
||||
/* #ffffff6b #ffffff8c*/
|
||||
background: #ffffff38 ;
|
||||
}
|
||||
|
||||
.bgText {
|
||||
background: #ffffffb0;
|
||||
line-height: 2.1rem!important;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
{{feedback}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
feedback: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -17,72 +17,7 @@
|
||||
cover
|
||||
@click="openOneImg(news.link)"
|
||||
/>
|
||||
<!-- <v-list-item class="d-flex flex-column w-100 "> -->
|
||||
<!-- <v-row class="bg-red ma-0 d-flex">
|
||||
<v-col>
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
|
||||
<span class="text-caption me-2">
|
||||
{{splitname(news.author)}}
|
||||
</span>
|
||||
</v-col>
|
||||
<v-col>1</v-col>
|
||||
</v-row> -->
|
||||
|
||||
<!-- <div class="justify-self-start mt-1">
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
|
||||
<span class="text-caption me-2">
|
||||
{{splitname(news.author)}}
|
||||
</span>
|
||||
</div>
|
||||
<template v-slot:append>
|
||||
<div class="justify-self-end">
|
||||
<v-icon
|
||||
size="x-small"
|
||||
class="me-1"
|
||||
:icon="news.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
||||
@click="toggleIncrementLike(news.id, true)"
|
||||
/>
|
||||
<span class="subheading me-2">
|
||||
{{news.scores.filter(e=> e.score==true).length}}
|
||||
</span>
|
||||
<span class="me-1">
|
||||
·
|
||||
</span>
|
||||
<v-icon
|
||||
size="x-small"
|
||||
class="me-1"
|
||||
:icon="news.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'"
|
||||
@click="toggleIncrementLike(news.id, false)"
|
||||
/>
|
||||
<span class="subheading me-2">
|
||||
{{news.scores.filter(e=> e.score==false).length}}
|
||||
</span>
|
||||
<span class="me-1">
|
||||
·
|
||||
</span>
|
||||
<v-icon
|
||||
size="x-small"
|
||||
class="me-1"
|
||||
icon="mdi-message-text-outline"
|
||||
/>
|
||||
<span class="subheading">
|
||||
{{ news.comment.length }}
|
||||
</span>
|
||||
<span class="me-1">
|
||||
·
|
||||
</span>
|
||||
<v-icon
|
||||
size="x-small"
|
||||
class="me-1 mb-1"
|
||||
icon="mdi-image"
|
||||
/>
|
||||
<span class="subheading">
|
||||
{{ news.gallery.length }}
|
||||
</span>
|
||||
</div>
|
||||
</template> -->
|
||||
<!-- </v-list-item> -->
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider/>
|
||||
@@ -93,6 +28,12 @@
|
||||
md=12
|
||||
sm=12
|
||||
>
|
||||
<!-- <div class="d-flex">
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
|
||||
<p class="text-caption me-2">
|
||||
{{splitname(news.author)}}
|
||||
</p>
|
||||
</div> -->
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
|
||||
<span class="text-caption me-2">
|
||||
{{splitname(news.author)}}
|
||||
@@ -166,7 +107,7 @@
|
||||
</v-row>
|
||||
<v-divider/>
|
||||
<v-row class="flex-grow-0 ma-0">
|
||||
<v-col>
|
||||
<v-col class="d-flex justify-space-between">
|
||||
<v-btn
|
||||
color="more_details_btn"
|
||||
variant="text"
|
||||
@@ -174,8 +115,9 @@
|
||||
size="small"
|
||||
append-icon="mdi-step-forward-2"
|
||||
>
|
||||
Подробнее
|
||||
Подробнее
|
||||
</v-btn>
|
||||
<span class="text-caption align-self-center">{{formatDate(news.cdate)}}</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
@@ -187,7 +129,7 @@ import { baseURL } from '@/utils/axios-api'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import {splitname} from '@/utils/universal_functions'
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -229,13 +171,18 @@ export default {
|
||||
emit('openOneImg')
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
return moment(date).format('DD.MM.YYYY')
|
||||
}
|
||||
|
||||
return {
|
||||
accountStore,
|
||||
burl,
|
||||
limitText,
|
||||
splitname,
|
||||
toggleIncrementLike,
|
||||
openOneImg
|
||||
openOneImg,
|
||||
formatDate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<v-img
|
||||
class="h-100"
|
||||
cover
|
||||
max-height="250px"
|
||||
max-height="280px"
|
||||
:src="checkremote( `${spravURL}${userlinks.login}.jpg`)"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
@@ -103,16 +103,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bgCard {
|
||||
/* #ffffff6b #ffffff8c*/
|
||||
background: #ffffff38 ;
|
||||
}
|
||||
|
||||
.bgText {
|
||||
background: #ffffffb0;
|
||||
line-height: 2.1rem!important;
|
||||
|
||||
}
|
||||
|
||||
.titles {
|
||||
font-family: cursive !important;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
export const data = {
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Data One',
|
||||
backgroundColor: '#f87979',
|
||||
data: [40, 39, 10, 40, 39, 80, 40]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export const options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
<template>
|
||||
<Line :data="data" :options="options" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
} from 'chart.js'
|
||||
import { Line } from 'vue-chartjs'
|
||||
import * as chartConfig from './chartConfig.js'
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
)
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
Line
|
||||
},
|
||||
data() {
|
||||
return chartConfig
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -14,7 +14,7 @@
|
||||
class="d-flex pa-1 flex-column "
|
||||
>
|
||||
<news-card :news="x"/>
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 ">
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="py-0 pl-0 flex-grow-0 text-end align-self-center text-caption font-weight-bold text-no-wrap">
|
||||
Всего новостей: {{countetnews}}
|
||||
Всего новостей: {{countetnews}}
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
{{x.title}}
|
||||
|
||||
</v-card-title>
|
||||
|
||||
<!-- :to='`/news?id=${x.id}`' -->
|
||||
<v-btn
|
||||
color="more_details_btn"
|
||||
@@ -29,6 +30,7 @@
|
||||
>
|
||||
Подробнее
|
||||
</v-btn>
|
||||
|
||||
<v-img
|
||||
:src="`${burl}${x.link}`"
|
||||
height="350px"
|
||||
|
||||
@@ -272,17 +272,35 @@
|
||||
<router-view />
|
||||
|
||||
</v-main>
|
||||
<v-main v-else class="d-flex justify-center align-center text-h3 bg-teal-lighten-2">
|
||||
<v-main v-else class="d-flex align-center text-h3 bg-teal-lighten-2">
|
||||
|
||||
<v-card
|
||||
class="h-100 w-100 d-flex justify-center rounded-0 flex-column"
|
||||
:image="`${burl}/media/newsimage/ng.png`"
|
||||
class="h-100 w-100 d-flex justify-center rounded-0 flex-column"
|
||||
:image="`${burl}${scrimg}`"
|
||||
>
|
||||
<v-card-text class="justify-center bgCard h-100 ma-3 d-flex flex-column">
|
||||
<v-row class="bgText flex-grow-0">
|
||||
<v-col class="text-center textcolor font-weight-black text-h3 pb-0">
|
||||
Добро пожаловать на портал МИ ФНС России по ЦОД № 2
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="bgText flex-grow-0">
|
||||
<v-col class="text-subtitle-1 text-center textcolor pt-0">
|
||||
Авторизуйтесь для получения доступа к контенту портала
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<!-- <div class=" bgCard h-100 ma-3">
|
||||
|
||||
|
||||
|
||||
</div> -->
|
||||
<!-- <p class="text-center textcolor font-weight-black">Добро пожаловать на портал МИ ФНС России по ЦОД № 2</p>
|
||||
<p class="mt-3 text-subtitle-1 text-center textcolor">Авторизуйтесь для получения доступа к контенту портала</p> -->
|
||||
</v-card>
|
||||
<!-- <div
|
||||
> :image="`${burl}/media/newsimage/hello.png`"
|
||||
:image="`${burl}${scrimg}`"
|
||||
>
|
||||
<p class="text-center">Добро пожаловать на портал МИ ФНС России по ЦОД № 2</p>
|
||||
<p class="mt-3 text-subtitle-1 text-center">Авторизуйтесь для получения доступа к контенту портала</p>
|
||||
|
||||
@@ -316,7 +334,7 @@ import AuthForm from '@/components/UI/Auth-form.vue'
|
||||
import OnlineUsers from '@/components/onlineUsers.vue'
|
||||
import CardUsers from '@/components/cardUsers.vue'
|
||||
import CardLike from '@/components/cardLike.vue'
|
||||
// import { pagecounter } from '@/utils/universal_functions'
|
||||
import { clearAxios } from '@/utils/axios-api'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
export default {
|
||||
@@ -340,7 +358,19 @@ export default {
|
||||
const showTooltip = ref(false)
|
||||
const alert = ref(false)
|
||||
const burl = baseURL.slice(0,-1)
|
||||
|
||||
const scrimg = ref([])
|
||||
|
||||
const screenimg = () => {
|
||||
|
||||
|
||||
clearAxios.get(`api/navigation/screensaver/`)
|
||||
.then(data => {
|
||||
console.log(data.data[0].img, '-------------------------');
|
||||
scrimg.value = data.data[0].img
|
||||
})
|
||||
}
|
||||
|
||||
screenimg()
|
||||
|
||||
const menuTruncated = (menus) => {
|
||||
return menus.slice(0,2).toUpperCase()
|
||||
@@ -427,6 +457,8 @@ export default {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
theme,
|
||||
mainmenuStore,
|
||||
@@ -439,7 +471,7 @@ export default {
|
||||
getcard,
|
||||
menuGetUserDialog,
|
||||
LikeDialog,
|
||||
// userlinks,
|
||||
scrimg,
|
||||
appStore,
|
||||
rail,
|
||||
showTooltip,
|
||||
@@ -474,6 +506,12 @@ export default {
|
||||
}
|
||||
|
||||
.textcolor {
|
||||
color: #00b9f3;
|
||||
color: #2f535e
|
||||
}
|
||||
|
||||
#tr-popup {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -5,14 +5,45 @@
|
||||
>
|
||||
Об инспекции
|
||||
</v-col>
|
||||
|
||||
<!-- <v-col>
|
||||
<line-graph :data="data" :options="options"/>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {pagecounter} from '@/utils/universal_functions'
|
||||
import lineGraph from '@/components/graph/line-graph.vue'
|
||||
|
||||
export default {
|
||||
|
||||
components: { lineGraph },
|
||||
|
||||
setup(){
|
||||
const data = {
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Data One',
|
||||
backgroundColor: '#f87979',
|
||||
data: [40, 39, 10, 40, 39, 80, 40]
|
||||
}
|
||||
]
|
||||
}
|
||||
const options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
pagecounter()
|
||||
|
||||
return {
|
||||
data,
|
||||
options
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col
|
||||
<v-col
|
||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
||||
>
|
||||
О портале
|
||||
</v-col>
|
||||
<!-- <v-col
|
||||
class="d-flex flex-column"
|
||||
lg=4
|
||||
>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col>
|
||||
<!-- {{ countvis() }} -->
|
||||
<v-col class="bg-orange">
|
||||
|
||||
<v-card
|
||||
class="d-flex flex-column my-2 ml-3 text-center"
|
||||
title="Количество посещений">
|
||||
<!-- <div class="mb-3 pl-3 d-flex flex-column align-start text-subtitle-1">
|
||||
<p class="pb-1">
|
||||
Посетителей сегодня: {{ countvis()['now'] }}
|
||||
</p>
|
||||
<p class="pb-1">
|
||||
Посетителей на прошлой неделе: {{ countvis()['week'] }}
|
||||
</p>
|
||||
<p>
|
||||
Посетителей с начала года {{ countvis()['year'] }}
|
||||
</p>
|
||||
</div> -->
|
||||
|
||||
<v-list class="d-flex flex-column align-start text-subtitle-1">
|
||||
<v-list-item>
|
||||
Посетителей сегодня: {{ countvis()['now'] }}
|
||||
@@ -36,29 +31,26 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col >
|
||||
|
||||
<v-col class="bg-red">
|
||||
<feedmodul :feedback="feedback"/>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column ">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0 pb-2">
|
||||
|
||||
<v-col >
|
||||
<line-graph :data="data" :options="options"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="d-flex flex-column ">
|
||||
<v-row>
|
||||
<v-col
|
||||
lg=9
|
||||
lg=8
|
||||
>
|
||||
<!-- <v-card class="text-center" title="Рейтинг посещаемости страниц портала">
|
||||
<div v-for="(val, key) in countgrupp()" :key = key>
|
||||
{{key}} : {{ val.now }} {{ val.week }} {{ val.year }}
|
||||
|
||||
</div>
|
||||
</v-card> -->
|
||||
|
||||
<v-card class="pt-3 text-center" title="Рейтинг посещаемости страниц портала">
|
||||
<v-table class="pt-3 ma-0">
|
||||
<thead>
|
||||
@@ -80,76 +72,111 @@
|
||||
</v-table>
|
||||
</v-card>
|
||||
|
||||
<!-- <div v-for="(val, key) in countgrupp()" :key = key>
|
||||
{{key}} : {{ val.now }} {{ val.week }} {{ val.year }}
|
||||
|
||||
</div> -->
|
||||
|
||||
</v-col>
|
||||
<!-- <v-col class="bg-black">
|
||||
<v-col class="bg-black">
|
||||
<div v-for="(val, key) in activuser()" :key = key>
|
||||
{{key}} : {{ val.count }} {{ val.login }}
|
||||
|
||||
</div>
|
||||
|
||||
</v-col> -->
|
||||
<v-card class="d-flex" title="Самые активные пользователи">
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import {getfromserver, pagecounter, splitname} from '@/utils/universal_functions'
|
||||
import moment from 'moment'
|
||||
// import {
|
||||
// Chart as ChartJS,
|
||||
// CategoryScale,
|
||||
// LinearScale,
|
||||
// PointElement,
|
||||
// LineElement,
|
||||
// Title,
|
||||
// Tooltip,
|
||||
// Legend
|
||||
// } from 'chart.js'
|
||||
// import { Line } from 'vue-chartjs'
|
||||
// import * as chartConfig from './chartConfig.js'
|
||||
import lineGraph from '@/components/graph/line-graph.vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import Feedmodul from '@/components/UI/aboutportal/feedmodul.vue'
|
||||
|
||||
// ChartJS.register(
|
||||
// CategoryScale,
|
||||
// LinearScale,
|
||||
// PointElement,
|
||||
// LineElement,
|
||||
// Title,
|
||||
// Tooltip,
|
||||
// Legend
|
||||
// )
|
||||
|
||||
export default {
|
||||
// components: {
|
||||
// Line
|
||||
// },
|
||||
components: { lineGraph,
|
||||
Feedmodul },
|
||||
|
||||
|
||||
setup(){
|
||||
const visiting = ref([])
|
||||
const feedback = ref([])
|
||||
|
||||
// const data = {
|
||||
// labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
// datasets: [
|
||||
// {
|
||||
// label: 'Data One',
|
||||
// backgroundColor: '#f87979',
|
||||
// data: [40, 39, 10, 40, 39, 80, 40]
|
||||
// }
|
||||
// ]
|
||||
const arrlines = {}
|
||||
const data = computed({
|
||||
get() {
|
||||
arrlines.value = {
|
||||
labels: [],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Посещений всего',
|
||||
backgroundColor: '#f87979',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
label: 'Уникальные посещения',
|
||||
backgroundColor: '#f87975',
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
arrforline()
|
||||
return arrlines.value
|
||||
}
|
||||
|
||||
})
|
||||
const options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
|
||||
|
||||
const arrforline=() => {
|
||||
|
||||
|
||||
let datas =
|
||||
visiting.value.reduce((acc, item) => {
|
||||
//
|
||||
|
||||
if (!acc[item.visitdate]) {
|
||||
acc[item.visitdate] = {unic: [], count: 0}
|
||||
}
|
||||
acc[item.visitdate]['count'] += item.count
|
||||
if (!acc[item.visitdate]['unic'].includes(item.author.id))
|
||||
{
|
||||
acc[item.visitdate]['unic'].push(item.author.id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return acc
|
||||
}, {})
|
||||
for (let key in datas) {
|
||||
// for (let x in Object.entries(datas)) {
|
||||
console.log(datas[key]['unic'].length, 'datas');
|
||||
arrlines.value.datasets[0].data.push(datas[key].count)
|
||||
arrlines.value.datasets[1].data.push(datas[key]['unic'].length)
|
||||
}
|
||||
|
||||
// }
|
||||
console.log(datas, 'datas');
|
||||
|
||||
arrlines.value.labels = Object.keys(datas)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// const options = {
|
||||
// responsive: true,
|
||||
// maintainAspectRatio: false
|
||||
// }
|
||||
|
||||
const visiting = ref([])
|
||||
|
||||
const previousWeekStart = moment().subtract(1, 'weeks').startOf('week'); // начало предыдущей недели
|
||||
const previousWeekEnd = moment().subtract(1, 'weeks').endOf('week'); // конец предыдущей недели
|
||||
|
||||
@@ -160,8 +187,18 @@ setup(){
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
const visition = () => {
|
||||
axiosApiInstance.get(`api/watcher/counter/`).then(result => {
|
||||
console.log(result.data, 'result--------------------------------------');
|
||||
visiting.value = result.data.result
|
||||
feedback.value = result.data.feedback
|
||||
|
||||
getfromserver(`api/watcher/counter/`, visiting)
|
||||
})}
|
||||
|
||||
|
||||
|
||||
//
|
||||
pagecounter()
|
||||
|
||||
const countvis = () => {
|
||||
@@ -221,8 +258,6 @@ setup(){
|
||||
|
||||
const groupedData =
|
||||
visiting.value.reduce((acc, item) => {
|
||||
console.log(Object.keys(acc).length, 'item------------');
|
||||
|
||||
|
||||
if (Object.keys(acc).length <4) {
|
||||
|
||||
@@ -253,36 +288,23 @@ setup(){
|
||||
|
||||
)
|
||||
|
||||
// .reduce((acc, item) => ({
|
||||
|
||||
// ...acc, [item]: groupedData[item]
|
||||
// }), {})
|
||||
|
||||
|
||||
|
||||
// Object.values(groupedData).sort(function(a, b) {
|
||||
// console.log(a, b);
|
||||
// return parseFloat(a.splitname(item.author)) - parseFloat(b.splitname(item.author));
|
||||
// });
|
||||
// groupedData.sort(function(a, b) { console.log(a,b, 'groupedData')})
|
||||
// groupedData.sort((a, b) => parseFloat(b.price) - parseFloat(a.price));
|
||||
console.log(sorted, 'groupedDatsorteda');
|
||||
|
||||
// const sortedValues = Object.values(groupedData).sort((a,b)=>b[1]-a[1])
|
||||
// topUser.value = sortedValues.slice(0, 1)
|
||||
// console.log(topUser.value, 'groupedData');
|
||||
|
||||
return sorted
|
||||
}
|
||||
|
||||
visition()
|
||||
|
||||
return {
|
||||
visiting,
|
||||
countvis,
|
||||
countgrupp,
|
||||
activuser,
|
||||
// chartConfig,
|
||||
// data,
|
||||
// options
|
||||
data,
|
||||
options,
|
||||
feedback
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +207,15 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.bgCard {
|
||||
/* #ffffff6b #ffffff8c*/
|
||||
background: #ffffff38 ;
|
||||
}
|
||||
|
||||
.bgText {
|
||||
background: #ffffffb0;
|
||||
line-height: 2.1rem!important;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user