Merge pull request '24_statistic' (#26) from 24_statistic into develop

Reviewed-on: http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2/pulls/26
Reviewed-by: aphilippov <philippov129@gmail.com>
This commit is contained in:
Nukeap committed 2024-03-22 09:18:58 +00:00
commit 42777b2a5d
24 files changed
+342 -232

No files matched your search

+1 -4
View File
@@ -1,9 +1,6 @@
### Шаблон страницы
- [ ] Создать примерный макет и разброс информации на странице.
Отрисовать шаблон.
Использовать методику отрисовки приведенной в примере src/front/src/views/AboutInspectionPage.vue. Код закомментировать
Пример использования верстки
```
<v-row no-gutters class="gap flex-column">
+1 -8
View File
@@ -68,7 +68,6 @@ class CustomAuth(ModelBackend):
# try:
user = DictEmployee.objects.get(login=username)
# print(user)
if user.deleted!=1:
homeuser, created = User.objects.get_or_create(username=username)
@@ -92,10 +91,4 @@ class CustomAuth(ModelBackend):
return homeuser
# except Exception as e:
# print (e)
# elif status_code==403:
# print('loh')
# return None
+3 -7
View File
@@ -162,7 +162,7 @@ class roundExcel():
def excelvacation(self):
print('helooooooooooooooooooooooooooooooooooooo')
pass
class loadExcel():
@@ -232,10 +232,6 @@ class loadExcel():
df3['d'] = df3['d'].astype(int)
for ind in df3.index:
# print(df3['login'][ind])
#
GeneralVacation.objects.create(login=df3['login'][ind], planned_date=df3['c'][ind], count_days=df3['d'][ind], type_of_vacation=df3['e'][ind], start_work_period=df3['f'][ind])
# DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
# user=df3['login'][ind], defaults={'position':base})
+1 -1
View File
@@ -47,7 +47,7 @@ class DailyRoundUpAPIView(APIView):
re = roundExcel(user)
print( request.GET.get("excel"), '-------------------------------')
file_path = getattr(re, request.GET.get("excel"))()
# if request.GET.get("excel") == 'round':
# file_path = re.excround()
+2 -10
View File
@@ -22,11 +22,6 @@ class Counter(ListAPIView):
def get(self, request):
"""Не используется"""
# data = UserComment.objects.filter(Q(time_create__range=['2024-01-01', '2024-03-01']), ~Q(comment='')). \
# values().order_by('-time_create')
# print(data,'---------------------------------------------------------')
return Response('Не используется')
@@ -86,13 +81,11 @@ class DataForStatisticsAPIView(ListAPIView):
#
res = CountVisitor.objects.filter(visitdate__lt = request.GET.get("start"), visitdate__gte=data_start - beetween*2).distinct().values('visitdate','user__user_id')
# .annotate(total=Count('user', distinct=True)).order_by('visitdate')
per = CountVisitor.objects.filter(Q(visitdate__lte = request.GET.get("end"), visitdate__gte =request.GET.get("start")) | Q(visitdate=date.today()))
# Обратная связь
feed = UserComment.objects.all()
rating = RatingStatus.objects.values('crit__name', 'crit__ico', 'crit__color', 'rating').filter(usercom__time_create__range=[request.GET.get("start"), data_rating])
d = feed.filter(time_create__range=[request.GET.get("start"), data_rating])
return Response({
@@ -115,8 +108,7 @@ class DataForStatisticsAPIView(ListAPIView):
'period': feed.filter(Q(time_create__range=[request.GET.get("start"), request.GET.get("end")]) & ~Q(comment='')).count()
}
},
'last_comment': feed.values('time_create').filter(~Q(comment='')).latest('time_create'),
'last_comment': feed.values('time_create').filter(~Q(comment='')).latest('time_create'),
},
})
+1 -17
View File
@@ -41,20 +41,7 @@ export default {
},
firstDay:'1',
events: [],
// eventDidMount: function(info) {
// const dayEl = info.el.closest('.fc-daygrid-day')
// dayEl.style.backgroundColor = 'red'
// },
// datesRender: function(info) {
// const start = info.view.activeStart
// const end = info.view.activeEnd
// let daysEls = document.querySelectorAll('.fc-daygrid-day')
// console.log(daysEls , ' info-------------');
// },
editable: true,
headerToolbar: {
@@ -88,9 +75,6 @@ export default {
noEventsContent: 'На сегодня событий нет',
selectable: true,
dateClick: (arg) => {
console.log(arg.date);
}
})
function f_generalvacation() {
@@ -7,7 +7,10 @@
<v-row no-gutters v-if="top.comment[0].time_create != '1990-01-01'">
<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 class="align-self-center pl-0">
@@ -77,14 +80,12 @@
<script>
import PatternCardFeed from '@/components/UI/aboutportal/pattern-card-feed.vue'
import ListUser from '@/components/UI/fiousercard/listUser.vue'
import TooltipText from '@/components/UI/tooltip-text.vue'
import CardComment from './card_top_comment/card-comment.vue'
export default {
components: {
PatternCardFeed,
ListUser,
TooltipText,
CardComment
},
@@ -1,18 +1,20 @@
<template>
<v-card class="h-100 ">
<!-- <line-graph v-if="data!==null" :data="data" ref ='linear' :options="options"/> -->
<Line v-if="data!==null" :data="data" ref ='linear' :options="options" />
<Line
v-if="data!==null"
:data="data"
ref ='linear'
:options="options"
/>
</v-card>
</template>
<script>
// import lineGraph from '@/components/graph/line-graph.vue'
import moment from 'moment'
import {computed, onMounted, ref, watch } from 'vue'
import {computed,ref} from 'vue'
import { usePortalFilterStore } from '@/store/AboutPortalFilter'
import {formatComa, splitname} from '@/utils/universal_functions'
import {formatComa, formatDash} from '@/utils/universal_functions'
import {
Chart as ChartJS,
CategoryScale,
@@ -25,7 +27,6 @@ import {
TimeScale
} from 'chart.js'
import { Line } from 'vue-chartjs'
import ChartDataLabels from 'chartjs-plugin-datalabels'
import 'chartjs-adapter-moment'
ChartJS.register(
@@ -39,12 +40,15 @@ ChartJS.register(
Legend,
TimeScale
)
export default {
components: {
Line,
},
props: {
dataLineChart: {
type: Object,
default: () => {}
@@ -59,151 +63,153 @@ export default {
type: String,
default: 'd'
}
},
setup(props, {emit}) {
const filterStore = usePortalFilterStore()
const between = ref(0)
const arrlines = {
// labels: [''],
datasets: [
{
label: 'Открыто страниц',
backgroundColor: '#C62828',
borderColor: '#C62828',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return val.count},
datakey: "count",
tooltips: false ,
yAxisID: 'y'
},
{
label: 'Активные пользователи',
backgroundColor: 'teal',
borderColor: 'teal',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return val.unic.length},
datakey: "unic",
customlabel: [],
tooltips: true,
yAxisID: 'y'
}
,
{
label: 'CRR',
backgroundColor: '#673AB7',
borderColor: '#673AB7',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))
},
hidden: true,
datakey: "crr",
customlabel: [],
tooltips: true,
yAxisID: 'y1'
}
,
{
label: 'BR',
backgroundColor: '#283593',
borderColor: '#283593',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return parseFloat((val.br/val.unic.length*100).toFixed(2))},
datakey: "br",
hidden: true,
customlabel: [],
tooltips: true,
yAxisID: 'y1'
}
,
{
label: 'PPV',
backgroundColor: '#EF9A9A',
borderColor: '#EF9A9A',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return parseFloat((val.pages/val.unic.length).toFixed(2))},
datakey: "ppv",
hidden: true,
customlabel: [],
tooltips: true,
yAxisID: 'y'
}
]
}
const dataf=computed({get() {
fullpercreate()
let data1 = moment(filterStore.date_period.enddate)
let data2 = moment(filterStore.date_period.startdate)
between.value = data1.diff(data2, 'days') + 1
let res = null
if (Object.keys(props.dataLineChart).length>0){
res = arrlines
res.labels=[]
for(let [key,val] of Object.entries(props.dataLineChart))
datasets: [
{
label: 'Открыто страниц',
backgroundColor: '#C62828',
borderColor: '#C62828',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return val.count},
datakey: "count",
tooltips: false ,
hidden: true,
yAxisID: 'y'
},
{
label: 'Активные пользователи',
backgroundColor: 'teal',
borderColor: 'teal',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return val.unic.length},
datakey: "unic",
customlabel: [],
tooltips: true,
yAxisID: 'y'
}
,
{
label: 'CRR',
backgroundColor: '#673AB7',
borderColor: '#673AB7',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))},
hidden: true,
datakey: "crr",
customlabel: [],
tooltips: true,
yAxisID: 'y1'
}
,
{
label: 'BR',
backgroundColor: '#283593',
borderColor: '#283593',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return parseFloat((val.br/val.unic.length*100).toFixed(2))},
datakey: "br",
hidden: true,
customlabel: [],
tooltips: true,
yAxisID: 'y1'
}
,
{
label: 'PPV',
backgroundColor: '#EF9A9A',
borderColor: '#EF9A9A',
borderWidth: 3,
cubicInterpolationMode: 'monotone',
data: [],
func: (val)=>{return parseFloat((val.pages/val.unic.length).toFixed(2))},
datakey: "ppv",
hidden: true,
customlabel: [],
tooltips: true,
yAxisID: 'y'
}
]
}
const dataf=computed({get() {
fullpercreate()
let data1 = moment(filterStore.date_period.enddate)
let data2 = moment(filterStore.date_period.startdate)
between.value = data1.diff(data2, 'days') + 1
let res = null
if (Object.keys(props.dataLineChart).length>0){
res = arrlines
res.labels=[]
res.datasets.forEach((e) => {e.data =[]})
for(let [key,val] of Object.entries(props.dataLineChart)) {
res.datasets.forEach((e) => {
e.data.push(e.func(val,key))
});
res.labels.push(formatComa(key))
e.data.push(e.func(val,key))
});
res.labels.push(formatComa(key))
}
}
return res
}})
return res
}})
const fullper = ref([])
const fullpercreate = () => {
let arr = []
props.period.period.forEach((e) => {
let ind = arr.findIndex(el => el.visitdate == e.visitdate)
if (ind ==-1) {
arr.push({visitdate: e.visitdate, user: Array.from(new Set([e.user.id]))})
}
else {
arr[ind].user = Array.from(new Set(arr[ind].user).add(e.user.id))
}
})
})
fullper.value= [...props.period.before, ...arr]
}
const crrfunc = (date)=>{
let baseunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value*2, 'd') && new Date(e.visitdate) <= moment(new Date(date)).subtract(between.value, 'd')))
let crrunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value, 'd') && new Date(e.visitdate) <= new Date(date)))
/**
* Расчет значения crr, и передача в родительский компонент значения, на последнюю дату в периоде для компонента card-total
* @constructor
* @param {object} date - по каждому дню, в указанном периоде (пример - 2024-03-22)
* @description Для расчетного периода с 04.03.2024 по 20.03.2024 выбирается три периода:
* 30.01.2024 - 16.02.2024 - baseunic
* 17.02.2024 - 03.03.2024 - crrunic
* 04.03.2024 - 20.03.2024 - отсюда даты для расчета
* bothuser - Пользователи которые были в baseunic и crrunic
*/
let baseunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >moment(new Date(date)).subtract(between.value*2, 'd') && new Date(e.visitdate) <= moment(new Date(date)).subtract(between.value, 'd')))
let crrunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >moment(new Date(date)).subtract(between.value, 'd') && new Date(e.visitdate) <= new Date(date)))
let bothuser = new Set([...baseunic].filter(element => crrunic.has(element)))
if (date ==formatDash(filterStore.date_period.enddate)) {
editCRR(bothuser.size*100/baseunic.size)
}
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
}
const editCRR = (val) => {
emit('getCRR', val)
}
const unicperson = (arr) => {
@@ -213,7 +219,7 @@ export default {
}
const data=computed({get() {
return JSON.parse(JSON.stringify(dataf.value))
}
})
@@ -231,16 +237,27 @@ export default {
display: 'auto'
},
legend: {
onHover: (event, chartElement) => {
event.native.target.style.cursor ='pointer' ;
},
onLeave: (event, chartElement) => {
event.native.target.style.cursor ='default' ;
},
position: 'bottom',
labels: {
color: 'grey',
align: 'right',
}
},
},
layout: {
padding: {
@@ -296,4 +313,8 @@ export default {
canvas {
flex: 1!important
}
.chartjs-legend {
cursor: pointer
}
</style>
@@ -142,7 +142,7 @@ let res = {
// res.before.user=res.period.user
res.proc.today = parseFloat(((res.user.today.length * 100) / props.alldata.staff).toFixed(2))
res.proc.period = parseFloat(((res.user.period.length * 100) / props.alldata.staff).toFixed(2))
res.proc.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
// res.proc.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
let data1 = moment(filterStore.date_period.enddate)
let data2 = moment(filterStore.date_period.startdate)
let between = data1.diff(data2, 'days') + 1
@@ -22,6 +22,9 @@
:datedefault = "filterStore.date_period.enddate"
/>
</div>
<div class="text-caption font-weight-regular">
({{nStaff}} человек в штате)
</div>
</v-toolbar>
</template>
@@ -34,6 +37,16 @@ export default {
DateSelect
},
props: {
nStaff: {
type: Number,
default: 0
}
// alldata: {
// type: Object,
// default: () => {return {period: [], staff: 0}}
// },
},
setup(){
const filterStore = usePortalFilterStore()
@@ -127,12 +127,10 @@
import { ref, computed } from 'vue'
import { spravURL } from '@/utils/axios-api'
import {checkremote} from '@/utils/universal_functions'
import listUser from '@/components/UI//fiousercard/listUser.vue'
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
export default {
components: {
listUser,
PatternCard
},
@@ -5,7 +5,7 @@
<template v-slot:filling_feedback>
<div v-if="rating.length!=0" class="pt-1">
<v-row no-gutters>
<v-col class="text-subtitle-1 bg-blue-grey-lighten-5 font-weight-bold">
<v-col class="text-h4 font-weight-medium">
{{avgcriteria}}
</v-col>
</v-row>
@@ -18,14 +18,23 @@
:key = key
>
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0">
<v-icon
size="small"
:color="x.color"
:icon="x.ico"
/>
{{x.name}}
</v-col>
<v-col lg=2 class=" w100 pa-0 ">
<v-tooltip
:text=x.name
location="left"
>
<template v-slot:activator="{ props }">
<v-icon
class="pb-4 pr-3"
v-bind="props"
size="small"
:color="x.color"
:icon="x.ico"
/>
</template>
</v-tooltip>
<!-- {{x.name}} -->
<v-rating
v-model="x.ratings"
:hover="typeof(key) == 'number'"
@@ -0,0 +1,45 @@
# listUser
Компонент отображает фотографию заглушку, если ведется разработка, и подтягивает фотографию сотрудника, если подключается к серверу. По клику открывает карточка информация о сотруднике
*InfoUserCard from '@/components/UI/infoUserCard.vue'* (является глобальным компонентом, прописан в src/front/src/components/UI/index.js)
```
props: {
author: {
type: Object,
default: {}
},
from_which: {
type: String,
default: "dialog-search"
}
```
## author
Содержит информацию по сотруднику
```
{
"familyname": "Гришина",
"name": "Ирина",
"parentname": "Сергеевна",
"id": 107,
"login": "9966-00-107",
"post": "Старший специалист 1 разряда",
"department": "Отдел контроля технологических процессов"
}
```
## from_which
Указать из какого компонента вызывается, чтобы написать новое отображение, на случай, если не подходит ни одна из имеющихся
### Пример использования компонента
` <list-user
:author= "top.author"
:from_which="'top_comment'"
/>`
@@ -1,5 +1,6 @@
<template>
<div>
<v-list-item v-if="from_which=='dialog-search'" class="pl-4 h-100 text-left pa-2" @click="open=true">
<template v-slot:prepend>
<v-avatar
@@ -45,6 +46,8 @@
:src="checkremote(`${spravURL}${author.login}.jpg`)"
/>
<info-user-card
:opendialog = open
:loging="author.login"
@@ -61,6 +64,7 @@ import { spravURL } from '@/utils/axios-api'
import {splitname} from '@/utils/universal_functions'
export default {
name: "list-user",
props: {
author: {
type: Object,
+2 -1
View File
@@ -2,5 +2,6 @@ import myHelper from '@/components/UI/my-helper';
import InfoUserCard from '@/components/UI/infoUserCard.vue';
import TooltipText from '@/components/UI/tooltip-text.vue'
import AlertDefault from '@/layouts/default/alertDefault.vue'
import listUser from '@/components/UI/fiousercard/listUser.vue';
export default [myHelper, InfoUserCard, TooltipText, AlertDefault]
export default [myHelper, InfoUserCard, TooltipText, AlertDefault, listUser]
+3 -4
View File
@@ -79,17 +79,16 @@ class="px-3 ddd" >
</template>
<script>
import { ref,watch, onMounted, computed } from 'vue'
import { ref, onMounted, computed } from 'vue'
import {checkremote} from '@/utils/universal_functions'
import { spravURL } from '@/utils/axios-api'
import { axiosApiInstance } from '@/utils/axios-api'
import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
import listUser from '@/components/UI//fiousercard/listUser.vue'
export default {
components: {
VcardUser,listUser
VcardUser
},
props: {
-1
View File
@@ -112,7 +112,6 @@ export default {
const onPickFile = (ex) => {
console.log(ex)
const sdata = new FormData()
sdata.append('dailyfiles', dailyfiles.value[0])
+24 -26
View File
@@ -215,26 +215,14 @@
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
<v-col>
<v-list nav density active-class="noneoutline">
<v-list-item v-for="(x, key) in supperuser"
:key="key"
:title="x.name"
:value="x.name"
:href="x.link"
:target="x.link?'_blank':''"
slim
class="text-blue-grey-lighten-1"
>
<template v-slot:prepend>
<v-icon :icon="x.ico" size="x_small"/>
<v-tooltip
v-if="rail"
activator="parent"
location="top"
>
{{ x.name }}
</v-tooltip>
</template>
</v-list-item>
<default-portal-menu-list :aMenuItem="supperuser"/>
<div v-if="getDevelopment()">
<default-portal-menu-list :aMenuItem="oRasrab"/>
</div>
</v-list>
</v-col>
</v-row>
@@ -308,8 +296,9 @@ import { clearAxios } from '@/utils/axios-api'
import { baseURL } from '@/utils/axios-api'
import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
import PageCounter from '../../components/UI/defaultportal/page-counter.vue'
import PageCounter from '@/components/UI/defaultportal/page-counter.vue'
import DefaultPortalMenuList from '@/layouts/default/DefaultPortalMenuList.vue'
import {getDevelopment} from '@/utils/universal_functions'
export default {
components: {
@@ -317,7 +306,8 @@ export default {
OnlineUsers,
CardLike,
VcardUser,
PageCounter
PageCounter,
DefaultPortalMenuList
},
mixins: [uf],
@@ -374,7 +364,10 @@ export default {
ico: 'mdi-wrench',
link: baseURL+'admin'
},
},
]
const oRasrab = [
{
name: 'Gitt',
ico: 'mdi-github',
@@ -387,6 +380,9 @@ export default {
}
]
// ]
const navigations = [
{
@@ -482,7 +478,7 @@ export default {
imageSrc,
LikeDialog,
scrimg,
oRasrab,
rail,
showTooltip,
menuTruncated,
@@ -490,7 +486,9 @@ export default {
alert,
burl,
supperuser,
closeinfo
closeinfo,
baseURL,
getDevelopment
}
}
@@ -0,0 +1,40 @@
<template>
<div>
<v-list-item
v-for="(x, key) in aMenuItem"
:key="key"
:title="x.name"
:value="x.name"
:href="x.link"
:target="x.link?'_blank':''"
slim
class="text-blue-grey-lighten-1"
>
<template v-slot:prepend>
<v-icon :icon="x.ico" size="x_small"/>
<v-tooltip
v-if="rail"
activator="parent"
location="top"
>
{{ x.name }}
</v-tooltip>
</template>
</v-list-item>
</div>
</template>
<script>
export default {
props: {
aMenuItem: {
type: Array,
default: () => []
},
}
}
</script>
<style>
</style>
@@ -0,0 +1,7 @@
# alertDefault
Компонент для отображения информации о выполненном действии/оповещении/предупреждения
Импорт глобальный, прописан в src/front/src/components/UI/index.js
*Описание входящих параметров в useAlertStore.md*
+8 -7
View File
@@ -46,12 +46,9 @@ export function getfromserver(path, reactive){
}
}
// export function bgimage(filecheck){
// const h = new URL(`@assets/bg-for-number-carousel.png`, import.meta.url).href
// return h
// }
// bg-for-number-carousel.png
export function checkremote(filecheck){
@@ -61,6 +58,8 @@ export function checkremote(filecheck){
export default str;
export function splitname (name) {
@@ -85,11 +84,13 @@ export function pagecounter(){
.then(result => {
appStore.countvisitor = result.data
console.log(result.data, 'result.dataresult.dataresult.dataresult.dataresult.data');
})
}
export function getDevelopment() {
return process.env.NODE_ENV == 'development'?true:false
}
+8 -2
View File
@@ -1,6 +1,8 @@
# Назначение
# Универсальные функции
Содержит в себе часто использумые однотивные функции
> import {} from '@/utils/universal_functions'
#### formatComa - DD.MM.YYYY, formatDash - YYYY-MM-DD, formaComaTime - DD.MM.YYYY H:mm изменять формат времени
Принимает параметр date? в формате new Date()
@@ -45,7 +47,8 @@ userlinks.login - 9966-00-107
"department": "Отдел контроля технологических процессов" }
Данный пример объекта содержит большее количество данных, главное чтобы были ключи **familyname**, **name**, **parentname**
#### pagecounter счетчик для страницы
#### pagecounter
Cчетчик для страницы
Записывает данные посещений на страницу
@@ -56,3 +59,6 @@ accountStore - информация о пользователе из DictEmploye
appStore - данные о посещенных страницах
postdata - объект для записи информации о странице из бд по умолчанию данные подгружаются из router и пользователе из стора
#### getDevelopment
Возвращает true если в разработке and false если на сервере запускается
+10 -4
View File
@@ -11,7 +11,8 @@
</v-row>
<v-row v-else no-gutters class="gap ma-1 flex-column">
<v-col class="d-flex flex-column w100 pa-0 flex-grow-0">
<toolbar-filter/>
<toolbar-filter :nStaff=alldata.staff />
</v-col>
<v-col class="d-flex " >
<v-row no-gutters class="gap" >
@@ -37,6 +38,7 @@
:dataLineChart="dataLineChart"
:period="{before:alldata.beforperiod,period:alldata.period}"
:filter = filter
@getCRR = "getCRR"
/>
</v-col>
<v-col class=" d-flex flex-column">
@@ -211,12 +213,16 @@ setup(){
}
let bothuser = new Set([...periodusers].filter(element => beforperiodusers.has(element)))
cardtotal.value.crr.data = bothuser.size*100/beforperiodusers.size
sumtraffic(traffic)
dataLineChart.value = traffic
}
const getCRR = (val) => {
cardtotal.value.crr.data = val
}
const sumtraffic= (data) => {
let ob = {brtot:0, ppvtot: 0, unictot: 0, pagetot: 0}
@@ -251,7 +257,7 @@ setup(){
cardtotal,
dataLineChart,
filterStore,
getCRR,
filter: ref('d'),
@@ -119,7 +119,7 @@
</template>
<script setup>
import listUser from '@/components/UI/fiousercard/listUser.vue';
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
import { ref } from 'vue';