This commit is contained in:
Nukeap committed 2025-02-05 07:56:25 +03:00
1 parent 6a826f14bb
commit 8b9532dfa7
125 files changed
+2668 -11

No files matched your search

@@ -0,0 +1,74 @@
# line-chart
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `dataLineChart` | `Object` | `() => {` |
## Описание переменных
| Переменная | Значение | Описание |
|------------|----------|----------|
| `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) => {
let arrnew =[]
arr.forEach(e => arrnew.push(...e.user) )
return new Set(arrnew)
}
const data=computed({get() {
return JSON.parse(JSON.stringify(dataf.value))
}
})
const linear=ref(null)
const options = {
plugins: {
datalabels: {
color: 'grey',
align: 'top',
display: 'auto'
},
legend: {
onHover: (event, chartElement) => {
event.native.target.style.cursor ='pointer'` | <pre>Расчет значения crr, и передача в<br>родительский компонент значения, на<br>последнюю дату в периоде для компонента<br>card-total<br>
@constructor<br>
@param {object} date - по каждому<br>дню, в указанном периоде (пример -<br>2024-03-22)<br>
@description Для расчетного<br>периода с 04<br></pre> |
## Пример использования
```vue
import line-chart from '@/components/components\UI\aboutportal\line-chart';
```
```vue
<line-chart />
```
---
> Документация сгенерирована автоматически.