Статистика

This commit is contained in:
iriska-gri committed 2024-01-10 16:56:58 +03:00
1 parent fa536a0fa4
commit 5a5aceb688
8 files changed
+45 -19

No files matched your search

@@ -1,7 +1,12 @@
<template> <template>
<div> <div>
<div> <div>
{{feedback}} <pre>
<!-- {{feedback}} -->
{{average()}}
</pre>
</div> </div>
</div> </div>
@@ -12,9 +17,32 @@ export default {
props: { props: {
feedback: { feedback: {
type: Array, type: Array,
default: [] default: () => []
}, },
},
setup(props, context) {
const average = () => {
props.feedback.reduce((acc, item) => {
console.log(acc, item);
return acc
}, {}
)
} }
return {
average
}
}
} }
</script> </script>
+1 -1
View File
@@ -136,7 +136,7 @@ export default {
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${props.idpos}`).then(data => { axiosApiInstance.get(`api/general_vacation/dailyload/?id=${props.idpos}`).then(data => {
t_dailyRound.value = data.data.daily t_dailyRound.value = data.data.daily
console.log(data.data.daily,'-------------------------');
+1 -1
View File
@@ -546,7 +546,7 @@ export default {
const openOneImg = (idimg) => { const openOneImg = (idimg) => {
dialogfotoOne.value = true dialogfotoOne.value = true
galleryimges.value = idimg galleryimges.value = idimg
console.log(idimg);
} }
+1 -1
View File
@@ -104,7 +104,7 @@ export default {
const openOneImg = (idimg) => { const openOneImg = (idimg) => {
dialogfotoOne.value = true dialogfotoOne.value = true
galleryimges.value = idimg galleryimges.value = idimg
console.log(idimg);
} }
@@ -17,6 +17,7 @@
/> />
<v-card <v-card
v-if="accountStore.cod2user"
class="bg-transparent py" class="bg-transparent py"
color="black_and_white" color="black_and_white"
density="compact" density="compact"
@@ -101,12 +102,12 @@
<span> Сменить тему</span> <span> Сменить тему</span>
</v-tooltip> </v-tooltip>
<v-tooltip location="bottom"> <!-- <v-tooltip location="bottom">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
<v-btn color="black_and_white" icon="mdi-magnify" v-bind="props"/> <v-btn color="black_and_white" icon="mdi-magnify" v-bind="props"/>
</template> </template>
<span> Поиск </span> <span> Поиск </span>
</v-tooltip> </v-tooltip> -->
<v-tooltip location="bottom"> <v-tooltip location="bottom">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
@@ -365,7 +366,6 @@ export default {
clearAxios.get(`api/navigation/screensaver/`) clearAxios.get(`api/navigation/screensaver/`)
.then(data => { .then(data => {
console.log(data.data, '-------------------------');
scrimg.value = data.data[0].img scrimg.value = data.data[0].img
}) })
} }
+1 -1
View File
@@ -74,7 +74,7 @@ export function pagecounter(){
fullPath: router.currentRoute.value.fullPath, fullPath: router.currentRoute.value.fullPath,
ico: router.currentRoute.value.meta.ico ico: router.currentRoute.value.meta.ico
} }
console.log(postdata, 'postdata');
clearAxios.post(`${baseURL}api/watcher/counter/`, postdata) clearAxios.post(`${baseURL}api/watcher/counter/`, postdata)
.then(result => { .then(result => {
+7 -9
View File
@@ -1,11 +1,11 @@
<template> <template>
<v-row> <v-row>
<v-col <!-- <v-col
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light" class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
> >
О портале О портале
</v-col> </v-col> -->
<!-- <v-col <v-col
class="d-flex flex-column" class="d-flex flex-column"
lg=4 lg=4
> >
@@ -86,7 +86,7 @@
</v-row> </v-row>
</v-col> </v-col>
</v-row> </v-row>
</v-col> --> </v-col>
</v-row> </v-row>
</template> </template>
@@ -160,13 +160,13 @@ setup(){
}, {}) }, {})
for (let key in datas) { for (let key in datas) {
// for (let x in Object.entries(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[0].data.push(datas[key].count)
arrlines.value.datasets[1].data.push(datas[key]['unic'].length) arrlines.value.datasets[1].data.push(datas[key]['unic'].length)
} }
// } // }
console.log(datas, 'datas');
arrlines.value.labels = Object.keys(datas) arrlines.value.labels = Object.keys(datas)
@@ -190,7 +190,6 @@ console.log(datas, 'datas');
const visition = () => { const visition = () => {
axiosApiInstance.get(`api/watcher/counter/`).then(result => { axiosApiInstance.get(`api/watcher/counter/`).then(result => {
console.log(result.data, 'result--------------------------------------');
visiting.value = result.data.result visiting.value = result.data.result
feedback.value = result.data.feedback feedback.value = result.data.feedback
@@ -276,7 +275,6 @@ console.log(datas, 'datas');
return acc return acc
}, {}); }, {});
console.log(groupedData, 'groupedData--------');
@@ -289,7 +287,7 @@ console.log(datas, 'datas');
) )
console.log(sorted, 'groupedDatsorteda');
return sorted return sorted
} }
+1 -1
View File
@@ -24,7 +24,7 @@ class Counter(ListAPIView):
result = CountSerializer(res, many=True).data result = CountSerializer(res, many=True).data
# Обратная связь # Обратная связь
feed = RatingStatus.objects.filter(usercom=1) feed = RatingStatus.objects.all()
feedback = RatingStatusStatSerializer(feed, many=True).data feedback = RatingStatusStatSerializer(feed, many=True).data
# print(feed, '++++++++++++++++++++++++++++++++++++++') # print(feed, '++++++++++++++++++++++++++++++++++++++')
return Response({'result':result, 'feedback':feedback}) return Response({'result':result, 'feedback':feedback})