Обратная связь
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="text-center"> на {{pages_count.title.today}} </th>
|
<th class="text-center"> сегодня </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"> на {{pages_count.title.today}} </th>
|
||||||
|
<th class="text-center">с {{pages_count.title.year.start}} по {{pages_count.title.year.end}}</th> -->
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
<v-row no-gutters class="h-100 gap">
|
<v-row no-gutters class="h-100 gap">
|
||||||
<v-col lg=2 class="bg-green">
|
<v-col lg=2 class="bg-green">
|
||||||
visiting- (все данные)
|
visiting- (все данные)
|
||||||
|
{{dataIndicators}}
|
||||||
<my-helper :pretext="for_formulas"/>
|
<my-helper :pretext="feedback"/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=4 class="d-flex flex-column">
|
<v-col lg=4 class="d-flex flex-column">
|
||||||
<rating-page :pages_count=pages_count />
|
<rating-page :pages_count=pages_count />
|
||||||
@@ -77,6 +77,7 @@ setup(){
|
|||||||
const dataLineChart = ref({})
|
const dataLineChart = ref({})
|
||||||
const dataActivusers = ref([])
|
const dataActivusers = ref([])
|
||||||
const dataAttendance = ref({})
|
const dataAttendance = ref({})
|
||||||
|
const dataIndicators = ref({})
|
||||||
|
|
||||||
const unicuser = ref([])
|
const unicuser = ref([])
|
||||||
|
|
||||||
@@ -92,6 +93,7 @@ setup(){
|
|||||||
for_formulas.value = result.data.for_formulas
|
for_formulas.value = result.data.for_formulas
|
||||||
visiting.value = result.data.result
|
visiting.value = result.data.result
|
||||||
feedback.value = result.data.feedback
|
feedback.value = result.data.feedback
|
||||||
|
dataIndicators.value = result.data.indicators
|
||||||
|
|
||||||
|
|
||||||
visitionreduce()
|
visitionreduce()
|
||||||
@@ -210,14 +212,17 @@ setup(){
|
|||||||
const data_collection = (data, obj) => {
|
const data_collection = (data, obj) => {
|
||||||
let attendance = {
|
let attendance = {
|
||||||
today: {
|
today: {
|
||||||
|
title: 'сегодня',
|
||||||
user: [],
|
user: [],
|
||||||
proc: 0
|
proc: 0
|
||||||
},
|
},
|
||||||
period: {
|
period: {
|
||||||
|
title: 'за период',
|
||||||
user: [],
|
user: [],
|
||||||
proc: 0,
|
proc: 0,
|
||||||
previos: 0
|
previos: 0
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +317,9 @@ setup(){
|
|||||||
format1,
|
format1,
|
||||||
selected_days,
|
selected_days,
|
||||||
for_formulas,
|
for_formulas,
|
||||||
dataAttendance
|
dataAttendance,
|
||||||
|
dataIndicators,
|
||||||
|
feedback
|
||||||
// countgrupp,
|
// countgrupp,
|
||||||
// activuser,
|
// activuser,
|
||||||
|
|
||||||
|
|||||||
+16
-4
@@ -45,14 +45,26 @@ class Counter(ListAPIView):
|
|||||||
# PPV
|
# PPV
|
||||||
ppv = perioddata.count()
|
ppv = perioddata.count()
|
||||||
|
|
||||||
|
|
||||||
print(ppv, '+++++++++++++++++++++++++++++++++++++')
|
|
||||||
# Обратная связь
|
# Обратная связь
|
||||||
feed = RatingStatus.objects.all()
|
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,
|
return Response({'result':CountSerializer(res, many=True).data,
|
||||||
# 'today':CountSerializer(nowdate, 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': {
|
'for_formulas': {
|
||||||
'staff': DictEmployee.objects.filter(deleted=0).count(),
|
'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(),
|
'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': {
|
'indicators': {
|
||||||
'crr': round(((crr_end - crr_per)/crr_start)*100, 2),
|
'crr': round(((crr_end - crr_per)/crr_start)*100, 2),
|
||||||
'br': round((br/crr_per)*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