Обратная связь
This commit is contained in:
1 parent
7412e8793f
commit
97e0eeb701
3 files changed
+31
-10
No files matched your search
@@ -28,8 +28,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="text-center"> на {{pages_count.title.today}} </th>
|
||||
<th class="text-center">с {{pages_count.title.year.start}} по {{pages_count.title.year.end}}</th>
|
||||
<th class="text-center"> сегодня </th>
|
||||
<th class="text-center"> за период </th>
|
||||
<!-- <th class="text-center"> на {{pages_count.title.today}} </th>
|
||||
<th class="text-center">с {{pages_count.title.year.start}} по {{pages_count.title.year.end}}</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<v-row no-gutters class="h-100 gap">
|
||||
<v-col lg=2 class="bg-green">
|
||||
visiting- (все данные)
|
||||
|
||||
<my-helper :pretext="for_formulas"/>
|
||||
{{dataIndicators}}
|
||||
<my-helper :pretext="feedback"/>
|
||||
</v-col>
|
||||
<v-col lg=4 class="d-flex flex-column">
|
||||
<rating-page :pages_count=pages_count />
|
||||
@@ -77,6 +77,7 @@ setup(){
|
||||
const dataLineChart = ref({})
|
||||
const dataActivusers = ref([])
|
||||
const dataAttendance = ref({})
|
||||
const dataIndicators = ref({})
|
||||
|
||||
const unicuser = ref([])
|
||||
|
||||
@@ -92,6 +93,7 @@ setup(){
|
||||
for_formulas.value = result.data.for_formulas
|
||||
visiting.value = result.data.result
|
||||
feedback.value = result.data.feedback
|
||||
dataIndicators.value = result.data.indicators
|
||||
|
||||
|
||||
visitionreduce()
|
||||
@@ -210,14 +212,17 @@ setup(){
|
||||
const data_collection = (data, obj) => {
|
||||
let attendance = {
|
||||
today: {
|
||||
title: 'сегодня',
|
||||
user: [],
|
||||
proc: 0
|
||||
},
|
||||
period: {
|
||||
title: 'за период',
|
||||
user: [],
|
||||
proc: 0,
|
||||
previos: 0
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -312,7 +317,9 @@ setup(){
|
||||
format1,
|
||||
selected_days,
|
||||
for_formulas,
|
||||
dataAttendance
|
||||
dataAttendance,
|
||||
dataIndicators,
|
||||
feedback
|
||||
// countgrupp,
|
||||
// activuser,
|
||||
|
||||
|
||||
+16
-4
@@ -45,14 +45,26 @@ class Counter(ListAPIView):
|
||||
# PPV
|
||||
ppv = perioddata.count()
|
||||
|
||||
|
||||
print(ppv, '+++++++++++++++++++++++++++++++++++++')
|
||||
# Обратная связь
|
||||
feed = RatingStatus.objects.all()
|
||||
k = feed.values_list('usercom__comment', flat=True).filter(Q(usercom__time_create__range=[request.GET.get("start"), request.GET.get("end")]) & ~Q(usercom__comment='')).distinct().count()
|
||||
print(k, '------------------------------------------------')
|
||||
|
||||
return Response({'result':CountSerializer(res, many=True).data,
|
||||
# 'today':CountSerializer(nowdate, many=True).data,
|
||||
'feedback': RatingStatusStatSerializer(feed, many=True).data,
|
||||
'feedback': {
|
||||
'criteria': {},
|
||||
'data': {
|
||||
'score': {
|
||||
'all': 0,
|
||||
'period': 0
|
||||
},
|
||||
'comment': {
|
||||
'all': 0,
|
||||
'period': 0
|
||||
}
|
||||
}
|
||||
},
|
||||
'for_formulas': {
|
||||
'staff': DictEmployee.objects.filter(deleted=0).count(),
|
||||
'attendance': CountVisitor.objects.values_list('user', flat=True).filter(visitdate__range=[new_date_start, new_date_end]).distinct().count(),
|
||||
@@ -61,7 +73,7 @@ class Counter(ListAPIView):
|
||||
'indicators': {
|
||||
'crr': round(((crr_end - crr_per)/crr_start)*100, 2),
|
||||
'br': round((br/crr_per)*100, 2),
|
||||
'ppv': ppv/crr_per
|
||||
'ppv': round(ppv/crr_per, 2)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user