Календарь для фильтра
This commit is contained in:
1 parent
2c8b0f6b02
commit
f92d7aa6e7
3 files changed
+69
-16
No files matched your search
Generated
+6
-6
@@ -22699,9 +22699,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vuetify": {
|
||||
"version": "3.3.10",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.3.10.tgz",
|
||||
"integrity": "sha512-jV5zA4PMK1ik8j/alPhAR75fzSoAvUgPcoKl+fZ/buDu70vJ3nM6+F3zh78UBs0PMzyLlarwt851QNbYXLbZbQ==",
|
||||
"version": "3.4.10",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.4.10.tgz",
|
||||
"integrity": "sha512-tObGoumCJxuK26OpS/CLZZIJAgDtN2cnd31vJscVhpuf6jeMD7wh8IsgfZownAOXU1FcKWVQwn1RSDsoXk5cJA==",
|
||||
"engines": {
|
||||
"node": "^12.20 || >=14.13"
|
||||
},
|
||||
@@ -22711,10 +22711,10 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.7",
|
||||
"vite-plugin-vuetify": "^1.0.0-alpha.12",
|
||||
"vue": "^3.2.0",
|
||||
"vite-plugin-vuetify": ">=1.0.0-alpha.12",
|
||||
"vue": "^3.3.0",
|
||||
"vue-i18n": "^9.0.0",
|
||||
"webpack-plugin-vuetify": "^2.0.0-alpha.11"
|
||||
"webpack-plugin-vuetify": ">=2.0.0-alpha.11"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
{{total}}
|
||||
{{crit}}
|
||||
</div>
|
||||
<div>{{average()}}</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -35,17 +36,20 @@ export default {
|
||||
let tot = new Set()
|
||||
let us = {}
|
||||
let t = 0
|
||||
|
||||
const avgfeed =
|
||||
props.feedback
|
||||
.reduce((acc, item) => {
|
||||
console.log(item, 'item');
|
||||
|
||||
if (!acc[item.namecrit]) {
|
||||
acc[item.namecrit] = []
|
||||
acc[item.namecrit] = {rating: [], ico: ''}
|
||||
}
|
||||
acc[item.namecrit].push(item.rating)
|
||||
|
||||
|
||||
acc[item.namecrit]['rating'].push(item.rating)
|
||||
acc[item.namecrit]['ico'] = item.ico
|
||||
tot.add(item.usercom)
|
||||
|
||||
if (!us[splitname(item.author)]) {
|
||||
if (!us[splitname(item.author)]) {
|
||||
us[splitname(item.author)] = {max: new Set(), login: 0}
|
||||
}
|
||||
if (item.comment.length > 0) {
|
||||
@@ -53,7 +57,7 @@ export default {
|
||||
us[splitname(item.author)]['login'] = item.author.login
|
||||
|
||||
}
|
||||
|
||||
|
||||
return acc
|
||||
}, {}
|
||||
)
|
||||
@@ -61,11 +65,13 @@ export default {
|
||||
|
||||
for (let [key,val] of Object.entries(avgfeed))
|
||||
{
|
||||
avgfeed[key] = (val.reduce((a,b)=>{
|
||||
|
||||
avgfeed[key]['rating'] = (val.rating.reduce((a,b)=>{
|
||||
return a+b
|
||||
}, 0
|
||||
)/val.length).toFixed(1)
|
||||
)/val.rating.length).toFixed(1)
|
||||
}
|
||||
console.log(avgfeed, 'key,valkey,val');
|
||||
|
||||
for (let [key,val] of Object.entries(us))
|
||||
{
|
||||
@@ -77,9 +83,12 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
crit.value.total = t
|
||||
total.value = tot.size
|
||||
console.log(avgfeed, 'avgfeed');
|
||||
|
||||
|
||||
|
||||
return avgfeed
|
||||
|
||||
}
|
||||
|
||||
@@ -82,8 +82,43 @@
|
||||
</div>
|
||||
<v-card class="d-flex" title="Самые активные пользователи">
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
|
||||
<v-menu
|
||||
v-model="menudate"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
>
|
||||
<template v-slot:activator="{ on, props }">
|
||||
<v-text-field
|
||||
v-model="selectedDate"
|
||||
label="Дата"
|
||||
append-icon="event"
|
||||
readonly
|
||||
v-on="on"
|
||||
v-bind="props"
|
||||
>
|
||||
</v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="selectedDate"
|
||||
@input="menudate=true"
|
||||
show-adjacent-months
|
||||
|
||||
>
|
||||
|
||||
</v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -93,6 +128,7 @@
|
||||
|
||||
<script>
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
import {pagecounter, splitname} from '@/utils/universal_functions'
|
||||
import moment from 'moment'
|
||||
import lineGraph from '@/components/graph/line-graph.vue'
|
||||
@@ -100,6 +136,7 @@ import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import Feedmodul from '@/components/UI/aboutportal/feedmodul.vue'
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
components: { lineGraph,
|
||||
Feedmodul },
|
||||
@@ -110,6 +147,10 @@ setup(){
|
||||
const feedback = ref([])
|
||||
const countvising = ref({now: 0, week: 0, year: 0})
|
||||
const crit = ref([])
|
||||
const menudate = ref(false)
|
||||
const selectedDate = ref(null)
|
||||
|
||||
|
||||
|
||||
const arrlines = {}
|
||||
const data = computed({
|
||||
@@ -323,7 +364,10 @@ setup(){
|
||||
options,
|
||||
feedback,
|
||||
countvising,
|
||||
crit
|
||||
crit,
|
||||
menudate,
|
||||
selectedDate,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user