реф результатов

This commit is contained in:
Denzel committed 2025-01-24 14:07:19 +03:00
1 parent 12150e738a
commit 59eb528db8
2 files changed
+12 -11

No files matched your search

+5 -1
View File
@@ -35,7 +35,10 @@
v-for="(winner, department) in getWinnersByDepartment(question).winnersByDepartment"
:key="department"
>
<v-card class="cursor-pointer" @click="opendialogWinn(department, getWinnersByDepartment(question).groupedByDepartment[department])" style="max-height: 50vh; overflow-y: auto;">
<v-card
class="cursor-pointer"
@click="opendialogWinn(department, getWinnersByDepartment(question).groupedByDepartment[department])"
style="max-height: 50vh; overflow-y: auto;">
<v-card-title>
<strong class="text-teal-darken-4">{{ department }}</strong>
</v-card-title>
@@ -181,6 +184,7 @@
@click.stop="opendialog(answer)"/>
<strong class="ml-4">{{ answer.employee ? answer.employee.fio : answer.name }}</strong>:
{{ answer.count }}
{{ voteCount(answer.count) }}
<template v-if="answer.employee">
<br/>
<small>Отдел: {{ answer.employee ? answer.employee.department : '' }}</small>
+7 -10
View File
@@ -7,12 +7,12 @@
align="center">
<v-tab v-for="x in tabs" :key="x.value" :value="x.value">{{ x.text }}</v-tab>
<v-tab v-if="accountStore.user.is_staff" value="constructor">Создать новое голосование</v-tab>
</v-tabs>
</v-col>
<v-col class="pa-0 overflow-hidden">
<v-window v-model="currentTab" class="h-100">
<!-- Текущие голосования -->
<v-tabs-window-item v-for="x in ['active','completed']" :value="x" class="h-100 overflow-auto">
@@ -40,7 +40,7 @@
<VoteConstructor @updating="updating" ref="constructor"/>
</v-tabs-window-item>
</v-window>
<!-- Модальные окна -->
<v-dialog v-model="voteModal" @click:outside="closeModal">
<CurrentVote :data="res" @closer="closeModal"/>
@@ -49,9 +49,6 @@
<v-dialog v-model="resultsModal" max-width="1200px" @click:outside="closeModal">
<v-card>
<VoteResult :data="result" @closer="closeModal" />
<v-card-actions>
<v-btn @click="closeModal">Закрыть</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-col>
@@ -82,7 +79,7 @@ export default {
const tabs = [
{value: "active", text: 'Текущие голосования'},
{value: "completed", text: 'Завершенные голосования'},
]
const currentTab = ref("active");
@@ -115,7 +112,7 @@ export default {
} catch (error) {
console.error("Ошибка при загрузке данных голосования:", error);
// res.value = {};
throw error;
}
};
@@ -173,7 +170,7 @@ export default {
if (constructor.value !== null) {
constructor.value.resetForm()
}
}
}
})
watch(