feat [X-01]: я тут накоммитил
This commit is contained in:
1 parent
28f6d1ae2d
commit
aa7d224b79
72 files changed
+749
-435
No files matched your search
@@ -2,61 +2,62 @@
|
||||
|
||||
## Описание пропсов
|
||||
|
||||
| Пропс | Тип | Значение по умолчанию |
|
||||
|-------|-----|-----------------------|
|
||||
| `dataLineChart` | `Object` | `() => {` |
|
||||
|
||||
| Пропс | Тип | Значение по умолчанию | Комментарий |
|
||||
|-------|-----|-----------------------|-------------|
|
||||
| `dataLineChart` | `Object` | `() => {` | нет комментария |
|
||||
| `period` | `Object` | `() => {` | нет комментария |
|
||||
| `filter` | `String` | `'d'` | нет комментария |
|
||||
## Описание переменных
|
||||
|
||||
| Переменная | Значение | Описание |
|
||||
|------------|----------|----------|
|
||||
| `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
|
||||
}
|
||||
| `baseunic` | <pre>unicperson(fullper.value.filter(e<br>=> new Date(e.visitdate)<br>>moment(new<br>Date(date)).subtract(between.value*2,<br>'d') && new Date(e.visitdate)<br><= moment(new<br>Date(date)).subtract(between.value,<br>'d')))<br>
|
||||
let crrunic =<br>unicperson(fullper.value.filter(e<br>=> new Date(e.visitdate)<br>>moment(new<br>Date(date)).subtract(between.value,<br>'d') && new Date(e.visitdate)<br><= new Date(date)))<br>
|
||||
let bothuser = new<br>Set([...baseunic].filter(element<br>=> crrunic.has(element)))<br>
|
||||
<br>
|
||||
if (date<br>==formatDash(filterStore.date_period.enddate))<br>{<br>
|
||||
<br>editCRR(bothuser.size*100/baseunic.size)<br>
|
||||
}<br>
|
||||
<br>
|
||||
return baseunic.size<br>==0?0:bothuser.size*100/baseunic.size<br>
|
||||
} <br>
|
||||
|
||||
const editCRR = (val) => {
|
||||
|
||||
emit('getCRR', val)
|
||||
}
|
||||
|
||||
const unicperson = (arr) => {
|
||||
|
||||
let arrnew =[]
|
||||
arr.forEach(e => arrnew.push(...e.user) )
|
||||
return new Set(arrnew)
|
||||
}
|
||||
const editCRR = (val) =><br>{<br>
|
||||
<br>
|
||||
emit('getCRR', val)<br>
|
||||
}<br>
|
||||
<br>
|
||||
const unicperson = (arr)<br>=> {<br>
|
||||
<br>
|
||||
let arrnew =[]<br>
|
||||
arr.forEach(e =><br>arrnew.push(...e.user) )<br>
|
||||
return new Set(arrnew)<br>
|
||||
}<br>
|
||||
|
||||
const data=computed({get() {
|
||||
|
||||
return JSON.parse(JSON.stringify(dataf.value))
|
||||
}
|
||||
})
|
||||
const linear=ref(null)
|
||||
const data=computed({get()<br>{<br>
|
||||
<br>
|
||||
return<br>JSON.parse(JSON.stringify(dataf.value))<br>
|
||||
}<br>
|
||||
})<br>
|
||||
const linear=ref(null)<br>
|
||||
|
||||
|
||||
|
||||
const options = {
|
||||
const options = {<br>
|
||||
|
||||
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>
|
||||
plugins: { <br>
|
||||
<br>
|
||||
datalabels: {<br>
|
||||
color: 'grey',<br>
|
||||
align: 'top',<br>
|
||||
display:<br>'auto'<br>
|
||||
},<br>
|
||||
legend: {<br>
|
||||
onHover:<br>(event, chartElement) => {<br>
|
||||
<br>event.native.target.style.cursor<br>='pointer'<br></pre> | <pre>Расчет значения crr, и передача в<br>родительский компонент значения, на<br>последнюю дату в периоде для<br>компонента card-total<br>
|
||||
@constructor<br>
|
||||
@param {object} date - по каждому<br>дню, в указанном периоде (пример -<br>2024-03-22)<br>
|
||||
@description Для расчетного<br>периода с 04<br></pre> |
|
||||
@param {object} date - по<br>каждому дню, в указанном периоде<br>(пример - 2024-03-22)<br>
|
||||
@description Для расчетного<br>периода с 04<br></pre> |
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user