Оценка сайта
This commit is contained in:
1 parent
aa68c50534
commit
800e7f88aa
12 files changed
+140
-87
No files matched your search
@@ -1,10 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<pattern-card-feed
|
<pattern-card-feed
|
||||||
:title="'Самый активный критик'"
|
:title="'Самый активный критик'"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<template v-slot:filling_feedback>
|
<template v-slot:filling_feedback>
|
||||||
|
|
||||||
|
|
||||||
@@ -29,13 +26,7 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<v-card max-width='400' density="compact" class="bg-transparent">
|
<card-comment :comment=top.comment[0] />
|
||||||
<v-card-text class="pb-0">Оставлено комментариев</v-card-text>
|
|
||||||
|
|
||||||
|
|
||||||
<v-card-subtitle>Последний комментарий оставлен {{formaComaTime(top.comment[0].time_create)}}</v-card-subtitle>
|
|
||||||
<v-card-title>{{top.comment[0].comment}}</v-card-title>
|
|
||||||
</v-card>
|
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
</th>
|
</th>
|
||||||
<th class="text-center text-caption font-weight-medium">
|
<th class="text-center text-caption font-weight-medium">
|
||||||
@@ -88,13 +79,14 @@
|
|||||||
import PatternCardFeed from '@/components/UI/aboutportal/pattern-card-feed.vue'
|
import PatternCardFeed from '@/components/UI/aboutportal/pattern-card-feed.vue'
|
||||||
import ListUser from '@/components/UI/fiousercard/listUser.vue'
|
import ListUser from '@/components/UI/fiousercard/listUser.vue'
|
||||||
import TooltipText from '@/components/UI/tooltip-text.vue'
|
import TooltipText from '@/components/UI/tooltip-text.vue'
|
||||||
import {formaComaTime} from '@/utils/universal_functions'
|
import CardComment from './card_top_comment/card-comment.vue'
|
||||||
// import CardFeedback from '@/components/UI/aboutportal/card-feedback.vue'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
PatternCardFeed,
|
PatternCardFeed,
|
||||||
ListUser,
|
ListUser,
|
||||||
TooltipText
|
TooltipText,
|
||||||
|
CardComment
|
||||||
},
|
},
|
||||||
|
|
||||||
props:
|
props:
|
||||||
@@ -106,12 +98,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props) {
|
|
||||||
// console.log(props.top.comment, 'top.comment');
|
|
||||||
return {
|
|
||||||
formaComaTime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<v-card max-width='400' density="compact" class="bg-transparent">
|
||||||
|
<v-card-text class="pb-0">Оставлено комментариев</v-card-text>
|
||||||
|
<v-card-subtitle>Последний комментарий оставлен {{formaComaTime(comment.time_create)}}</v-card-subtitle>
|
||||||
|
<v-card-title>{{comment.comment}}</v-card-title>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {formaComaTime} from '@/utils/universal_functions'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
props: {
|
||||||
|
comment: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
|
||||||
|
return {
|
||||||
|
formaComaTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
|
||||||
<pattern-card
|
<pattern-card
|
||||||
:title="'Обратная связь'"
|
:title="'Обратная связь'"
|
||||||
:ico="'mdi-comment-multiple-outline'"
|
:ico="'mdi-comment-multiple-outline'"
|
||||||
>
|
>
|
||||||
<template v-slot:filling>
|
<template v-slot:filling>
|
||||||
|
|
||||||
<v-row no-gutters class="flex-column gap">
|
<v-row no-gutters class="flex-column gap">
|
||||||
<v-col lg=1 class="w100">
|
<v-col lg=1 class="w100">
|
||||||
<v-card variant="flat" class="text-subtitle-1 font-weight-regular cursor-default">
|
<v-card variant="flat" class="text-subtitle-1 font-weight-regular cursor-default">
|
||||||
@@ -14,6 +11,7 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=2 class="w100">
|
<v-col lg=2 class="w100">
|
||||||
|
|
||||||
<star-like
|
<star-like
|
||||||
:criteria=feedback.criteria
|
:criteria=feedback.criteria
|
||||||
:ratings=feedback.criteria
|
:ratings=feedback.criteria
|
||||||
@@ -24,7 +22,6 @@
|
|||||||
v-for=" x in feedback.data"
|
v-for=" x in feedback.data"
|
||||||
:key=x
|
:key=x
|
||||||
>
|
>
|
||||||
|
|
||||||
<card-feedback :data="x"/>
|
<card-feedback :data="x"/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
@@ -35,9 +32,7 @@
|
|||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<!--
|
{{avgcriteria}}
|
||||||
-->
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</pattern-card>
|
</pattern-card>
|
||||||
|
|
||||||
@@ -84,6 +79,8 @@ export default {
|
|||||||
|
|
||||||
props.feedback.feed.forEach((e) => {
|
props.feedback.feed.forEach((e) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!ob[e.author.id]) {
|
if (!ob[e.author.id]) {
|
||||||
ob[e.author.id] = 0
|
ob[e.author.id] = 0
|
||||||
}
|
}
|
||||||
@@ -110,11 +107,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const avgcriteria = computed({
|
||||||
|
get() {
|
||||||
|
let avgcrit = 0
|
||||||
|
props.feedback.criteria.forEach((e)=> {
|
||||||
|
avgcrit += e.ratings
|
||||||
|
})
|
||||||
|
return parseFloat(avgcrit/props.feedback.criteria.length).toFixed(2)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
formaComaTime,
|
formaComaTime,
|
||||||
dataTopUser
|
dataTopUser,
|
||||||
|
avgcriteria
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,14 +159,14 @@ export default {
|
|||||||
res.datasets.forEach((e) => {
|
res.datasets.forEach((e) => {
|
||||||
e.data.push(e.func(val,key))
|
e.data.push(e.func(val,key))
|
||||||
|
|
||||||
// e.data = [10,20,30]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
res.labels.push(formatComa(key))
|
res.labels.push(formatComa(key))
|
||||||
}
|
}
|
||||||
// console.log(res.labels,"datat");
|
|
||||||
}
|
}
|
||||||
// res.datasets[1].data=[]
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
}})
|
}})
|
||||||
@@ -282,30 +282,6 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const arrforline=() => {
|
|
||||||
// console.log(props.dataLineChart);
|
|
||||||
// for (let [key, val] of Object.entries) {}
|
|
||||||
// // Object.entries(props.dataLineChart).forEach(e => {
|
|
||||||
// // const [key, value] = e
|
|
||||||
// // arrlines.value.datasets[0].data.push(value.count)
|
|
||||||
// // arrlines.value.datasets[1].data.push(value.unic.length)
|
|
||||||
// // arrlines.value.datasets[2].data.push(value.crr)
|
|
||||||
// // arrlines.value.datasets[3].data.push(value.br)
|
|
||||||
// // arrlines.value.datasets[4].data.push(value.ppv)
|
|
||||||
// // arrlines.value.labels.push(formatComa(key))
|
|
||||||
// // arrlines.value.datasets[1].customlabel.push(props.dataLineChart[key].unic)
|
|
||||||
// // })
|
|
||||||
|
|
||||||
// // console.log(props.dataLineChart,'dataYear2 -------------');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// watch(()=>props.dataLineChart,(newValue, oldValue)=>{
|
|
||||||
// if (linear.value!==null) {
|
|
||||||
// renderChart(data.value, options)
|
|
||||||
// }
|
|
||||||
// linear.value.chart.datasets =data.value.datasets
|
|
||||||
|
|
||||||
// },{deep:true})
|
|
||||||
return {
|
return {
|
||||||
data,
|
data,
|
||||||
options,
|
options,
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<v-card class="h-100 d-flex" variant="flat">
|
<v-card class="h-100 d-flex" variant="flat">
|
||||||
|
|
||||||
<v-row no-gutters class="flex-column gap">
|
<v-row no-gutters class="flex-column gap">
|
||||||
<v-col lg=1 class="bg-teal-lighten-5 w100">
|
<v-col class="flex-grow-0 bg-teal-lighten-5 pa-0 w100">
|
||||||
<span class="font-weight-medium text-button text-teal-darken-4 cursor-default">
|
<span class="font-weight-medium text-button text-teal-darken-4 cursor-default">
|
||||||
{{title}}
|
{{title}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex flex-column pt-1">
|
<v-col class="d-flex flex-column pa-0">
|
||||||
<slot name="filling_feedback"></slot>
|
<slot name="filling_feedback"></slot>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default {
|
|||||||
unic: 1
|
unic: 1
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
console.log(res, 'ind----------------------')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export default {
|
|||||||
function f_generalvacation() {
|
function f_generalvacation() {
|
||||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(data.data,'----------------------');
|
|
||||||
|
|
||||||
for (let x in data.data) {
|
for (let x in data.data) {
|
||||||
|
|
||||||
@@ -165,9 +165,6 @@ export default {
|
|||||||
mess = `${d.getDate()} число`
|
mess = `${d.getDate()} число`
|
||||||
}
|
}
|
||||||
|
|
||||||
// if d.getFullYear() == '1970': {
|
|
||||||
// console.log(d, 'ddddddddddddddddddddddd');
|
|
||||||
// }
|
|
||||||
|
|
||||||
return mess
|
return mess
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-row
|
||||||
|
v-for="(x, key) in rating.basecrit"
|
||||||
|
:key = key
|
||||||
|
class="align-center"
|
||||||
|
>
|
||||||
|
<v-col
|
||||||
|
class="pl-5"
|
||||||
|
lg=5
|
||||||
|
>
|
||||||
|
<v-icon
|
||||||
|
size="large"
|
||||||
|
:color="x.color"
|
||||||
|
:icon="x.ico"
|
||||||
|
/>
|
||||||
|
{{x.name}}
|
||||||
|
</v-col>
|
||||||
|
<v-col lg=6 class="pa-0">
|
||||||
|
<v-rating
|
||||||
|
v-model="message[key].rating"
|
||||||
|
:hover="typeof(key) == 'number'"
|
||||||
|
half-increments
|
||||||
|
color="yellow"
|
||||||
|
:density="'comfortable'"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-divider/>
|
||||||
|
</v-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { computed } from 'vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
props: {
|
||||||
|
rating: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { emit }) {
|
||||||
|
|
||||||
|
|
||||||
|
const message = computed({
|
||||||
|
get: () => props.rating.nowrating,
|
||||||
|
set: (value) => emit('update:ratings', value)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
message
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -40,23 +40,15 @@
|
|||||||
|
|
||||||
<div v-if="criteria.length!=0" class="pt-1">
|
<div v-if="criteria.length!=0" class="pt-1">
|
||||||
<v-row
|
<v-row
|
||||||
|
|
||||||
class="align-center flex-column scoreheight"
|
class="align-center flex-column scoreheight"
|
||||||
no-gutters
|
no-gutters
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="flex-column d-flex pa-0"
|
<div class="flex-column d-flex pa-0"
|
||||||
|
|
||||||
v-for="(x, key) in criteria"
|
v-for="(x, key) in criteria"
|
||||||
:key = key
|
:key = key
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0">
|
||||||
|
|
||||||
|
|
||||||
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0"
|
|
||||||
>
|
|
||||||
|
|
||||||
<v-icon
|
<v-icon
|
||||||
size="small"
|
size="small"
|
||||||
:color="x.color"
|
:color="x.color"
|
||||||
@@ -64,7 +56,7 @@
|
|||||||
/>
|
/>
|
||||||
{{x.name}}
|
{{x.name}}
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=2 class=" w100 pa-1 ">
|
<v-col lg=2 class=" w100 pa-0 ">
|
||||||
|
|
||||||
<v-rating
|
<v-rating
|
||||||
v-model="message[key].ratings"
|
v-model="message[key].ratings"
|
||||||
@@ -138,6 +130,8 @@ export default {
|
|||||||
set: (value) => emit('update:ratings', value)
|
set: (value) => emit('update:ratings', value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
message
|
message
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<!-- <v-list-item class="h-100 text-left pa-2" @click="open=true"> -->
|
|
||||||
|
|
||||||
<v-img
|
<v-img
|
||||||
v-if="from_which=='top_comment'"
|
v-if="from_which=='top_comment'"
|
||||||
@@ -44,7 +44,6 @@
|
|||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:src="checkremote(`${spravURL}${author.login}.jpg`)"
|
:src="checkremote(`${spravURL}${author.login}.jpg`)"
|
||||||
/>
|
/>
|
||||||
<!-- </v-list-item> -->
|
|
||||||
|
|
||||||
<info-user-card
|
<info-user-card
|
||||||
:opendialog = open
|
:opendialog = open
|
||||||
@@ -79,11 +78,6 @@ export default {
|
|||||||
|
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
|
|
||||||
// const countcomment = () => {
|
|
||||||
// console.log(props.top);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// countcomment()
|
|
||||||
|
|
||||||
const style_item_title = () => {
|
const style_item_title = () => {
|
||||||
if (props.from_which=="top-user") {
|
if (props.from_which=="top-user") {
|
||||||
|
|||||||
@@ -10,13 +10,10 @@
|
|||||||
Оцените сайт
|
Оцените сайт
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-divider/>
|
<v-divider class="pb-3"/>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<feedstar-like
|
||||||
<star-like
|
:rating=feedbackdata
|
||||||
:criteria=feedbackdata.basecrit
|
|
||||||
:ratings=feedbackdata.nowrating
|
|
||||||
how="modal"
|
|
||||||
@update:rating="feedbackdata.nowrating = $event"
|
@update:rating="feedbackdata.nowrating = $event"
|
||||||
/>
|
/>
|
||||||
<v-row class="mt-6">
|
<v-row class="mt-6">
|
||||||
@@ -62,9 +59,10 @@
|
|||||||
import { ref, onMounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import starLike from '@/components/UI/feedback/star-like.vue'
|
import starLike from '@/components/UI/feedback/star-like.vue'
|
||||||
|
import FeedstarLike from '@/components/UI/feedback/feedstar-like.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { starLike },
|
components: { starLike, FeedstarLike },
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
LikeDialog: {
|
LikeDialog: {
|
||||||
@@ -84,7 +82,7 @@ export default {
|
|||||||
feedbackdata.value = data.data
|
feedbackdata.value = data.data
|
||||||
if (feedbackdata.value.nowrating.length == 0) {
|
if (feedbackdata.value.nowrating.length == 0) {
|
||||||
for (let x of feedbackdata.value.basecrit) {
|
for (let x of feedbackdata.value.basecrit) {
|
||||||
feedbackdata.value.nowrating.push({ratings: x.rating, crit: x.id, id: null})
|
feedbackdata.value.nowrating.push({rating: x.rating, crit: x.id, id: null})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (feedbackdata.value.nowcomment === null) {
|
if (feedbackdata.value.nowcomment === null) {
|
||||||
@@ -122,6 +120,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function feedSend() {
|
function feedSend() {
|
||||||
|
|
||||||
axiosApiInstance.post(`api/feedback/feedbackdata/`, {nowrating : feedbackdata.value.nowrating, nowcomment: feedbackdata.value.nowcomment} ).then(data => {})
|
axiosApiInstance.post(`api/feedback/feedbackdata/`, {nowrating : feedbackdata.value.nowrating, nowcomment: feedbackdata.value.nowcomment} ).then(data => {})
|
||||||
menusCloses()
|
menusCloses()
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
Reference in new issue
Block a user