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

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