данные выведены

This commit is contained in:
iriska-gri committed 2024-03-04 10:51:07 +03:00
1 parent 309b44a0e5
commit f5b7b1d10d
4 files changed
+43 -23

No files matched your search

@@ -6,9 +6,11 @@
>
<template v-slot:filling_feedback>
<v-row no-gutters>
<v-col class="bg-teal-lighten-4 align-self-center">
<!-- <list-user :author= "top.author" :from_which="'top_comment'"/> -->
<v-col lg=5 class="bg-teal-lighten-4 align-self-center">
<list-user :author= "top.author" :from_which="'top_comment'"/>
</v-col>
<v-col class="align-self-center pl-0">
<v-table density="compact" class="pa-0">
@@ -28,8 +30,8 @@
</template>
<v-card max-width='400' density="compact" class="bg-transparent">
<v-card-title>Оставлено комментариев</v-card-title>
<v-card-subtitle>Последний комментарий оставлен {{top.comment.data}}</v-card-subtitle>
<v-card-text>{{top.comment.text}}</v-card-text>
<!-- <v-card-subtitle>Последний комментарий оставлен {{top.comment.data}}</v-card-subtitle>
<v-card-text>{{top.comment.text}}</v-card-text> -->
</v-card>
</v-tooltip>
</th>
@@ -52,9 +54,9 @@
</thead>
<tbody >
<tr >
<th class="text-center">{{top.comment}}</th>
<th class="text-center">{{top.comment.length}}</th>
<th class="text-center">{{top.score}}</th>
</tr>
</tbody>
</v-table>
@@ -83,8 +85,15 @@ export default {
top: {
type: Object,
default: () => {}
}
},
},
setup(props) {
console.log(props.top, 'gggggggggggggg')
return {}
}
}
</script>
@@ -9,14 +9,14 @@
<v-row no-gutters class="flex-column gap">
<v-col lg=1 class="w100">
<v-card variant="flat" class="text-caption">
<!-- Последний комментарий оставлен <span class="text-body-1 font-weight-bold">{{formaComaTime(feedback.last_comment.time_create)}}</span> -->
Последний комментарий оставлен <span class="text-body-1 font-weight-bold">{{formaComaTime(feedback.last_comment.time_create)}}</span>
</v-card>
</v-col>
<v-col lg=3 class="w100">
<!-- <star-like
<v-col lg=2 class="w100">
<star-like
:criteria=feedback.criteria
:ratings=feedback.criteria
/> -->
/>
</v-col>
<v-col
lg=2 class="w100"
@@ -26,10 +26,10 @@
<!-- <my-helper :pretext="x"/> -->
<card-feedback :data="x"/>
</v-col>
<v-col class="d-flex flex-column">
<my-helper :pretext="dataTopUser"/>
<v-col class="d-flex flex-column">
<!-- <card-top-comment :top=dataTopUser /> -->
<card-top-comment :top=dataTopUser />
</v-col>
</v-row>
@@ -73,10 +73,13 @@ export default {
},
setup(props) {
const dataTopUser = computed({
get() {
let ob = {}
let tuser = {}
let tuser = {comment:[], score: 0}
props.feedback.feed.forEach((e) => {
@@ -96,8 +99,6 @@ export default {
tuser.fio=splitname(tuser.author)
tuser.score = puser.length
tuser.comment = puser.filter(e=>e.comment.length>0).sort((a,b)=> {return a.id-b.id})
console.log(tuser, 'e');
}
@@ -106,6 +107,7 @@ export default {
}
})
const top_comment = () => {
let topUser = props.feedback.feed.reduce((acc, item)=> {
@@ -34,13 +34,16 @@
</v-list-item>
<v-list-item v-if="from_which=='top_comment'" class="h-100 text-left pa-2" @click="open=true">
<!-- <v-list-item class="h-100 text-left pa-2" @click="open=true"> -->
<v-img
v-if="from_which=='top_comment'"
@click="open=true"
cover
sizes="x-small"
:src="checkremote(`${spravURL}${author.login}.jpg`)"
/>
</v-list-item>
<!-- </v-list-item> -->
<info-user-card
:opendialog = open
@@ -75,6 +78,12 @@ export default {
const open = ref(false)
// const countcomment = () => {
// console.log(props.top);
// }
// countcomment()
const style_item_title = () => {
if (props.from_which=="top-user") {
return "text-body-1 font-weight-medium"
+3 -3
View File
@@ -31,7 +31,7 @@
</v-col>
<v-col class="w100 ">
<!-- -------------------------------------------------------------- -->
<my-helper :pretext="alldata.feedback"/>
<!-- <my-helper :pretext="alldata.feedback"/> -->
<!-- -------------------------------------------------------------- -->
<v-row no-gutters class="h-100 gap">
<v-col class="flex-column d-flex">
@@ -52,7 +52,7 @@
/>
</v-col>
<v-col lg=2 class="d-flex flex-column">
<v-col class="d-flex flex-column">
<feedmodul
:feedback="alldata.feedback"
/>
@@ -130,7 +130,7 @@ setup(){
const filterStore = usePortalFilterStore()
const alldata =ref({period: [], staff: 0, beforperiod: [], feedback: {criteria: [], feed: []}})
const alldata =ref({period: [], staff: 0, beforperiod: [], feedback: {criteria: [], feed: [], last_comment:{time_create:'2024-01-01'}}})
const visition = () => {
axiosApiInstance.get(`api/watcher/testwatcher/?start=${formatDash(filterStore.date_period.startdate)}&end=${formatDash(filterStore.date_period.enddate)}`).then(result => {